~/talk

Java Code Coverage Mechanics

slides:none on file

Deep dive into JaCoCo internals: instrumentation via a JVM agent that inserts boolean probe arrays (4–7 bytes per probe) into class files, validated across five JDK major versions and early builds, which surfaces real OpenJDK bugs (JaCoCo ranks among top five external reporters). Implementation uses the ASM library, synthetic static fields to cache probes (and a synthetic init accessor to avoid init-cycle NPEs), a Java 9 bytecode version trick, and an OSGi hack using a java.lang-held object and equals() to return probe arrays.

AI-written summary · about

  1. 0:00Start
  2. 4:31Observer Effect
  3. 5:41Code Coverage
  4. 7:07JaCoCo works on class files only
  5. 8:31As easy as setting an arg for the JVM
  6. 9:17Java Byte Code Instrumentation
  7. 10:19Probe Strategies
  8. 11:29JaCoCo Validation Test Suite
  9. 12:27Tested on 5 major JDK versions
  10. 18:16Bytecode of Assertions
  11. 23:30Bridge Methods
  12. 24:06Methods in Enums
  13. 32:55Bad Cycles in JaCoCo
  14. 34:16Java Virtual Machine Specification
  15. 35:57Java Language Specification
  16. 40:31Runtime Access (Problem)
  17. 40:57Runtime Access (Solution)
~/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.