~/talk

Write your own Java Profiler in 240 lines of pure Java

Talkat J-Fall 2023 · on Thursday, 2023-11-09· [java]
slides:none on file

Claims a usable Java profiler fits in 240 lines of pure Java and the published version is 251 lines after fixes. It runs as a Java agent, samples every ~10–20 ms via Thread.getAllStackTraces(), aggregates samples into a simple tree and emits flame graphs, and ships under the MIT license. The implementation actually runs in production for some users, integrates with JFR/JDK Mission Control and an IntelliJ plugin, and trades precision for low overhead and simplicity.

AI-written summary · about

  1. 0:00Introduction and story
  2. 6:25Why profiling matters
  3. 11:29Types of profilers
  4. 13:57Building a tiny profiler
  5. 23:17Sampling profiler details
  6. 27:11Obtaining real profiles
  7. 31:29Custom events with JFR
  8. 33:37Visualizing profiles
  9. 36:07Performance impact
  10. 37:32Continuous profiling
  11. 38:58Closing and resources
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.