~/talk

Java Code Coverage mechanics

Talkat Joker 2017 · 2017-11-03..11-04· [java, compilers-and-language-design]
links:none on file
slides:none on file

Explains how JaCoCo measures coverage by bytecode instrumentation rather than profiling, inserting boolean array probes per method edge and storing execution hits in an execution-data file; shows the on-the-fly approach via a Java agent transformer that rewrites classes at load time, the tiny four-instruction probes, and deterministic probe indexing so report generation replays analysis. Covers synthetic-member handling, bad static-initialization cycles (classes and interfaces) and the runtime workarounds (init helper, injected Object field), the ASM-version workaround for Java 9 class files, and real bug reports filed against OpenJDK.

AI-written summary · about

  1. 0:00Intro
  2. 2:04Real Disclaimer
  3. 4:58Observer Effect
  4. 5:49Code Coverage
  5. 8:03JaCoCo Works on Class Files
  6. 10:48Java Byte Code Instrumentation
  7. 12:02Probe Strategies
  8. 14:16JaCoCo Validation Test Suite
  9. 19:33How to get probes[] ?
  10. 21:05Bytecode of Assertions
  11. 24:25Bridge Methods
  12. 26:16Methods in Enums
  13. 27:18Lambdas
  14. 33:49Java Virtual Machine Specification
  15. 36:26Java Language Specification
  16. 42:06Bad Cycle with Interfaces - Solution
  17. 43:46Runtime Access - Problem
  18. 44:51Runtime Access - Solution
  19. 47:21ASM and Java 9
  20. 50:41Future Bytecode Versions
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.