~/talk

Instrument to Remove: Using Java agents for fun and profit

Talkat Voxxed Days Zürich 2024 · on Thursday, 2024-03-07· [java, security]
slides:none on file

A small Java agent prototype instruments classes by inserting a static initializer via javassist bytecode insertion to record class usage, then appends a runtime jar into the bootstrap loader with appendToBootstrap runtime jar so instrumented code can call back into the agent. Running on Spring PetClinic (56 MB jar, ~30,000 classes) it observes ~12,000 loaded and ~9,000 actually initialized (PetClinic: 56MB → 9,000 used classes), writes usage lists for manual removal or pre-instrumented jar rewriting, and exposes an agent control port for inspection.

AI-written summary · about

  1. 0:00Java agents and de-bloating
  2. 4:16Limitations of existing tools
  3. 8:11Nerd sniping and new tool
  4. 10:15Unused classes for de-bloating
  5. 16:17Java agent basics
  6. 20:38Java agent implementation
  7. 24:49Class loader challenges
  8. 26:57Agent startup timing
  9. 28:20Bytecode libraries and techniques
  10. 30:05Demo and results
  11. 32:10Debugging Mockito
  12. 33:54Agent design patterns
  13. 36:21Summary and resources
  14. 37:26Q&A on agents
~/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.