New VM logging mechanism introduced in JDK9 supports tags. There should be a test checking that tags are preserved from build to build.
For the time of bug filing the following tags are available:
alloc, age, barrier, bot, census, classhisto, classresolve, classinit, comp, compaction, cpu, cset, defaultmethods, ergo, exceptions, exit, freelist, gc, heap, humongous, ihop, itables, jni, liveness, logging, marking, metaspace, monitorinflation, phases, plab, promotion, ref, refine, region, remset, rt, safepoint, scavenge, scrub, start, state, stats, stringdedup, survivor, svc, sweep, task, tlab, time, verify, vmoperation, vtables
(quoted from output of java -Xlog:help -version)
A test could:
- parse output of: java -Xlog:help -version
- search for section of available tags
- check that all GC specific tags are there (list of such tags is a property of the test)