Birth, life and death of a class
summary
Covers concrete lifecycle steps: classfile internals starting with cafe babe and the constant pool, how javac vs ECJ create different synthetic classes, lambdas appearing as VM-anonymous classes visible with -XX:+ShowHiddenFrames or dumped to disk, and tools used (javap, jps, Serviceability Agent, jcmd, ASM). Demonstrates JIT inlining then deoptimization after loading B (20,000-call warmup), shows instrumentation via java.lang.instrument creating 10 versions of a class by retransformation, and explains when classes actually unload and how finalize/GC affect it.
AI-written summary · about
chapters (11)
- 0:00Introduction to class lifecycle
- 2:39Class file format deep dive
- 7:25Nested and inner classes
- 9:34VM anonymous classes
- 15:51Class identity and loaders
- 18:58Class loading and JIT optimization
- 29:11Class instrumentation and redefinition
- 38:48Class redefinition behavior
- 44:01Class unloading mechanics
- 51:37Finalization and resurrection
- 56:19Q&A session
