9 • jcmd <pid> VM.log output="file=gc-%p-%t.log" what="gc=debug,gc*,age*=trace,safepoint" decorators="time,level" output_options="filecount=10,filesize=10M" • Mode plus avancé (et verbeux) : -Xlog:gc*=debug,gc+ergo*=trace,gc+age*=trace,safepoint*,pagesize,os* • Un paquet de tags disponibles : add, age, alloc, annotation, aot, arguments, attach, barrier, biasedlocking, blocks, bot, breakpoint, bytecode, cds, census, class, classhisto, cleanup, codecache, compaction, compilation, constantpool, constraints, container, coops, cpu, cset, data, datacreation, dcmd, decoder, defaultmethods, director, dump, ergo, event, exceptions, exit, fingerprint, free, freelist, gc, handshake, hashtables, heap, humongous, ihop, iklass, init, inlining, interpreter, itables, jfr, jit, jni, jvmti, liveness, load, loader, logging, malloc, mark, marking, membername, memops, metadata, metaspace, methodcomparator, mirror, mmu, module, monitorinflation, monitormismatch, nestmates, nmethod, normalize, objecttagging, obsolete, oldobject, oom, oopmap, oops, oopstorage, os, pagesize, parser, patch, path, perf, phases, plab, preorder, preview, promotion, protectiondomain, purge, redefine, ref, refine, region, reloc, remset, resolve, safepoint, sampling, scavenge, setting, smr, stackmap, stacktrace, stackwalk, start, startuptime, state, stats, stringdedup, stringtable, subclass, survivor, sweep, system, table, task, thread, time, timer, tlab, tracking, unload, unshareable, update, verification, verify, vmoperation, vmthread, vtables, vtablestubs, workgang • Via jcmd <pid> PerfCounter.print | egrep 'safepointTime|applicationTime' • % de temps dans des safepoint, pour la plupart du GC : 100 * safepointTime / safepointTime + applicationTime