1 Turn on the benchmark counters, and listen for specific patterns on System.out/System.err. 2 The format of this option is: 3 4 (err|out),start pattern,end pattern 5 6 You can use "~" to match 1 or more digits. 7 Examples: 8 9 err, starting =====, PASSED in 10 out,Iteration ~ (~s) begins:,Iteration ~ (~s) ends: 11 12 The first pattern matches DaCapo output and the second matches SPECjvm2008 output. 13 14 As a more detailed example, here are the options to use for getting statistics 15 about allocations within the DaCapo pmd benchmark: 16 17 -XX:JVMCICounterSize=<value> -XX:-JVMCICountersExcludeCompiler \ 18 -Dgraal.BenchmarkDynamicCounters="err, starting ====, PASSED in " \ 19 -Dgraal.ProfileAllocations=true 20 21 The JVMCICounterSize value depends on the granularity of the profiling - 22 10000 should be sufficient. Omit JVMCICountersExcludeCompiler to exclude 23 counting allocations on the compiler threads. 24 The counters can be further configured by the ProfileAllocationsContext option.