~/talk

From Bytecode to Native Code in HotSpot JVM

Talkat Voxxed Days Bucharest 2016 · on Friday, 2016-03-11· [java]
slides:none on file

Explains how HotSpot moves Java bytecode through interpreter → C1 → C2 with client threshold ~1.5k invocations, tiered compilation to C2 for heavy methods, shows that JIT inlining removes direct vs getter/setter penalty (native-compiled runs converge around ~64–68 ns per iteration while interpreted run is much slower), demonstrates monomorphic → bimorphic → megamorphic behavior (single-impl runs ~5 ns, three-impls stop inlining and stabilize ~8–9 ns), and uses hsdis + -XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly and JITWatch to inspect generated assembly.

AI-written summary · about

  1. 0:00Introduction to HotSpot JVM
  2. 1:46What is the JVM
  3. 3:10Java C and bytecode basics
  4. 5:21Class file format
  5. 7:32Bytecode instruction families
  6. 10:14Stack frames and local variables
  7. 13:08Runtime constant pool
  8. 16:01Exception handling at bytecode level
  9. 18:29Quiz on bytecode ambiguities
  10. 22:47Default methods and lambdas in interfaces
  11. 25:39HotSpot execution engine
  12. 29:10Just-In-Time compilation process
  13. 32:06Dynamic optimizations in JIT
  14. 34:24Intrinsics and method inlining
  15. 35:50JVM arguments for JIT control
  16. 36:37Viewing native code from bytecode
  17. 37:20Demo: Direct vs getter/setter access
  18. 41:24Demo: Virtual method call types
  19. 47:29JIT Watch tool overview
  20. 48:54Microbenchmarking advice
~/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.