Click here to load reader

Debugging Habits

  • View
    689

  • Download
    2

Embed Size (px)

Text of Debugging Habits

  1. 1. Debug WordCamphttp://skanev.com/ 25 [email protected]
  2. 2. ,
  3. 3. 031 0x1911001
  4. 4.
  5. 5.
  6. 6.
  7. 7.
  8. 8. This slide has beenintentionally left blank
  9. 9. Debug WordCamphttp://skanev.com/ 25 [email protected]
  10. 10. Debug WordCamphttp://skanev.com/ 25 [email protected]
  11. 11.
  12. 12.
  13. 13.
  14. 14. self-help
  15. 15. .
  16. 16. ?
  17. 17. static u64 sched_clock_local(struct sched_clock_data *scd){ u64 now, clock, old_clock, min_clock, max_clock; s64 delta;again: now = sched_clock(); delta = now - scd->tick_raw; if (unlikely(delta < 0))delta = 0; old_clock = scd->clock; /** scd->clock = clamp(scd->tick_gtod + delta,*max(scd->tick_gtod, scd->clock),*scd->tick_gtod + TICK_NSEC);*/ clock = scd->tick_gtod + delta; min_clock = wrap_max(scd->tick_gtod, old_clock); max_clock = wrap_max(old_clock, scd->tick_gtod + TICK_NSEC); clock = wrap_max(clock, min_clock); clock = wrap_min(clock, max_clock); if (cmpxchg64(&scd->clock, old_clock, clock) != old_clock)goto again; return clock;}
  18. 18.
  19. 19. =
  20. 20. =
  21. 21. -
  22. 22. =?
  23. 23. =
  24. 24. Meta
  25. 25. =
  26. 26. knowledge worker
  27. 27. Im not a great programmer,Im just a good programmerwith great habits. Kent Beck
  28. 28. We are what we repeatedly do.Excellence, then, is not an act,but a habit. Aristotle
  29. 29. =
  30. 30. =
  31. 31. =
  32. 32. . ...
  33. 33.
  34. 34.
  35. 35.
  36. 36.
  37. 37. (highly personal)
  38. 38.
  39. 39. , .
  40. 40. No Instant Messengers
  41. 41. 1 25
  42. 42. 1 25 5
  43. 43. 1 25 5 2 25
  44. 44. 1 25 5 2 25 5
  45. 45. 1 25 5 2 25 5 3 25
  46. 46. 1 25 5 2 25 5 3 25 5
  47. 47. 1 25 5 2 25 5 3 25 5 4 25
  48. 48. 1 25 5 2 25 5 3 25 5 4 25 15
  49. 49. 25
  50. 50. I have found Jesus!
  51. 51.
  52. 52. ,
  53. 53. -
  54. 54. 2
  55. 55.
  56. 56. , ,
  57. 57. RSI ;(
  58. 58. 1 25 5 2 25 5 3 25 5 4 25 15
  59. 59. !
  60. 60. Yak Shaving
  61. 61. http://xkcd.com/349/
  62. 62. -,
  63. 63. 25,
  64. 64. ,
  65. 65.
  66. 66. 25
  67. 67. estimation
  68. 68.
  69. 69.
  70. 70.
  71. 71. ,
  72. 72.
  73. 73. The ToDo list
  74. 74. ,
  75. 75. ,
  76. 76.
  77. 77. ,
  78. 78. weight loss
  79. 79.
  80. 80. ,
  81. 81.
  82. 82. !
  83. 83. Seinfeld Calendar
  84. 84. continuity (?)
  85. 85. Before: After:
  86. 86.
  87. 87. , , !
  88. 88. , , ! ? WordPress?!
  89. 89. ... ...
  90. 90. ,
  91. 91. Refactoring!
  92. 92. Refactoring!
  93. 93.
  94. 94. Kaizen
  95. 95.
  96. 96. Meta
  97. 97. mind mapping
  98. 98.
  99. 99. ;
  100. 100.
  101. 101. note keeping
  102. 102. wiki
  103. 103.
  104. 104.
  105. 105. , ,
  106. 106.
  107. 107. 10
  108. 108.
  109. 109. shghoti[f] [f]
  110. 110. shghoti[f] [f] tough [tf]
  111. 111. sh ghoti[f][f] tough [tf] women [wmn]
  112. 112. shghoti[f] [f] tough [tf] women [wmn] nation [nen]
  113. 113.
  114. 114.
  115. 115. !
  116. 116. ? [email protected]
  117. 117. ?