Download
michael bond katherine coons kathryn mckinley university of texas at austin n.
Skip this Video
Loading SlideShow in 5 Seconds..
Pacer: Proportional Detection of Data Races PowerPoint Presentation
Download Presentation
Pacer: Proportional Detection of Data Races

Pacer: Proportional Detection of Data Races

107 Vues Download Presentation
Télécharger la présentation

Pacer: Proportional Detection of Data Races

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Michael Bond Katherine Coons Kathryn McKinley University ofTexas at Austin Pacer: Proportional Detection of Data Races

  2. Detecting data races in production

  3. Number of threads

  4. Problem today Problem in future

  5. Sampling rate

  6. Sampling periods Non-sampling periods

  7. Detect race  first access sampled

  8. Thread A Thread B Non-sampling period Sampling period Non-sampling period Sampling period Non-sampling period

  9. Thread A Thread B write x read y write y read x

  10. Insight #1: • Stop tracking variable after • non-sampled access

  11. Thread A write x unlock m Thread B

  12. Thread A write x unlock m Thread B lock m

  13. Thread A write x unlock m Thread B lock m write x

  14. Thread A write x unlock m read x Thread B lock m write x

  15. Thread A write x unlock m read x Thread B lock m write x Race!

  16. Thread A write x unlock m read x Thread B lock m write x Race!

  17. Thread A write x unlock m read x Thread B lock m write x A B A B Vector clocks 5 2 3 4

  18. Thread A write x unlock m read x Thread B lock m write x A B A B Vector clocks 5 2 3 4

  19. Thread A write x unlock m read x Thread B lock m write x A B A B Vector clocks 5 2 3 4

  20. Thread A write x unlock m read x Thread B lock m write x A B A B 5 2 3 4

  21. Thread A write x unlock m read x Thread B lock m write x A B A B 5@A 5 2 3 4

  22. Thread A write x unlock m read x Thread B lock m write x A B A B 5@A 5 2 3 4 5 2

  23. Thread A write x unlock m read x Thread B lock m write x A B A B 5@A 5 2 3 4 Increment clock 6 5 2 2

  24. Thread A write x unlock m read x Thread B lock m write x A B A B 5@A 5 2 3 5 4 4 Join clocks 6 5 2 2

  25. Thread A write x unlock m read x Thread B lock m write x A B A B 5@A 5 2 5 3 4 4 Happens before? 6 5 2 2

  26. Thread A write x unlock m read x Thread B lock m write x A B A B 5@A 5 2 5 3 4 4 5 6 2 2

  27. Thread A write x unlock m read x Thread B lock m write x A B A B 5@A 5 2 5 3 4 4 5 6 2 2

  28. Thread A write x unlock m read x Thread B lock m write x A B A B 5@A 5 2 5 3 4 4 5 6 2 2 No work performed

  29. Thread A write x unlock m read x Thread B lock m write x A B A B 5@A 5 2 5 3 4 4 5 6 2 2 Race uncaught

  30. Thread A write x unlock m read x Thread B lock m write x A B A B 5 2 3 5 4 4 6 5 2 2 4@B

  31. Thread A write x unlock m read x Thread B lock m write x A B A B 5 2 3 5 4 4 5 6 2 2 4@B Race! Happens before?

  32. Insight #2: We only care whether “A happens before B” if A is sampled

  33. Thread A Thread B Do these events happen before other events? We don’t care!

  34. Thread A Thread B Don’t increment clocks Increment clocks Do these events happen before other events? We don’t care! Don’t increment clocks Increment clocks Don’t increment clocks

  35. Thread A unlock m1 … unlock m2 Thread B lock m1 … lock m2 A B A B 5 2 3 4

  36. Thread A unlock m1 … unlock m2 Thread B lock m1 … lock m2 A B A B No clock increment 5 2 5 3 5 4 4 4 5 2

  37. Thread A unlock m1 … unlock m2 Thread B lock m1 … lock m2 A B A B 5 2 5 5 3 4 4 4 5 5 2 2

  38. Thread A unlock m1 … unlock m2 Thread B lock m1 … lock m2 A B A B 5 2 3 5 5 4 4 4 5 5 2 2 Unnecessary join

  39. Thread A unlock m1 … unlock m2 Thread B lock m1 … lock m2 A B A B 5 2 3 5 5 4 4 4 5 5 2 2 O(n) O(1)

  40. Implementation http://jikesrvm.org/Research+Archive

  41. Performance 1

  42. Performance Qualitative improvement in time & space

  43. Accuracy Probability (detecting any race) = r ?

  44. Per-Race Accuracy(eclipse, r = 1%)

  45. Related Work LiteRace[Marino et al. ’09] Cold-region hypothesis[Chilimbi & Hauswirth ’04] Full analysis at synchronization operations

  46. Deployable Race Detection Accuracy, time, space  sampling rate Detect race  first access sampled

  47. Deployable Race Detection Accuracy, time, space  sampling rate Detect race  first access sampled Qualitative improvement

  48. Deployable Race Detection Accuracy, time, space  sampling rate Detect race  first access sampled Qualitative improvement Help developers fix difficult-to-reproduce bugs