ThreadSanitizer and Heap Sampling
summary
Integrates ThreadSanitizer into the JVM so the runtime sees Java and JNI synchronization, uses vector clocks to report no false positives, tracks field accesses by instrumenting interpreter and JDK (partial C1 JIT support, C2 pending), and suppresses thousands of legacy races to avoid noisy default enabling. Adds a Heap Sampler used in production for over a decade that gives stacktraces of live and garbage samples, targets 1–2% overhead, uses a 512KB default sampling and exports data for tooling (JEP/JDK-8171119).
AI-written summary · about
chapters (22)
- 0:00Intro
- 0:16Outline
- 8:55Happens Before: No False Positives
- 10:11Vector Clocks by Thread Sanitizer
- 10:58Thread Sanitizer and JDK Together
- 12:55Tell TSan everything
- 15:36Tell TSan almost everything
- 16:43Nice Stack Reports - How?
- 18:27Reporting a Data Race
- 19:40Impact of Java Tsan
- 21:16Ongoing and Future Work
- 22:34Heap Sampling Introduction
- 24:10Preamble 2 What about as a JFR event?
- 25:12Preamble 3 Heap Sampling
- 25:47Tentative JVMTI API
- 28:26Heap Sampling Overview
- 30:58Tools on Top
- 32:07Compiler Implementation
- 35:32Internal Implementation Details
- 36:09Where is the webrev up to?
- 37:14Future Potential Items
- 39:03Heap Sampling Conclusion
related talks
30mThread Sanitizing for Java
32mMaTSa: Race Detection in Java
33mWriting a Java Profiler in Pure Java
40mA Glance At The Java Performance Toolbox
01h 14mNovel but practical uses of Java
35mJava at Speed: Building a Better JVM
19mRuntime Detection of Data Races in OCaml with ThreadSanitizer
44mJava at Speed: Building a Better JVM.
