Mercurial > hg > graal-compiler
changeset 14578:d927132f45a4
update comments on BenchmarkCounters (-XX options instead of preprocessor defs)
author | Lukas Stadler <lukas.stadler@oracle.com> |
---|---|
date | Tue, 18 Mar 2014 09:59:33 +0100 |
parents | 532d9b78c7d4 |
children | c98fa2ed91d9 |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/debug/BenchmarkCounters.java |
diffstat | 1 files changed, 9 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/debug/BenchmarkCounters.java Tue Mar 18 09:57:40 2014 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/debug/BenchmarkCounters.java Tue Mar 18 09:59:33 2014 +0100 @@ -50,10 +50,10 @@ * infrastructure is enabled by specifying either the GenericDynamicCounters or * BenchmarkDynamicCounters option.<br/> * - * The counters are kept in a special area in the native JavaThread object, and the number of - * counters is configured in {@code thread.hpp (GRAAL_COUNTERS_SIZE)}. This file also contains an - * option to exclude compiler threads ({@code GRAAL_COUNTERS_EXCLUDE_COMPILER_THREADS}, which - * defaults to true). + * The counters are kept in a special area allocated for each native JavaThread object, and the + * number of counters is configured using {@code -XX:GraalCounterSize=value}. + * {@code -XX:+/-GraalCountersExcludeCompiler} configures whether to exclude compiler threads + * (defaults to true). * * The subsystems that use the logging need to have their own options to turn on the counters, and * insert DynamicCounterNodes when they're enabled. @@ -64,12 +64,10 @@ * <h1>Example</h1> In order to create statistics about allocations within the DaCapo pmd benchmark * the following steps are necessary: * <ul> - * <li>Modify {@code thread.hpp}: increase GRAAL_COUNTER_SIZE. The actual required value depends on - * the granularity of the profiling, 10000 should be enough for most cases. This will increase the - * JavaThread structure by 80kb.</li> - * <li>Also in {@code thread.hpp}: GRAAL_COUNTERS_EXCLUDE_COMPILER_THREADS specifies whether the - * numbers generated by compiler threads should be excluded (default: true).</li> - * <li>Build the Graal VM.</li> + * <li>Set {@code -XX:GraalCounterSize=value}. The actual required value depends on the granularity + * of the profiling, 10000 should be enough for most cases.</li> + * <li>Also: {@code -XX:+/-GraalCountersExcludeCompiler} specifies whether the numbers generated by + * compiler threads should be excluded (default: true).</li> * <li>Start the DaCapo pmd benchmark with * {@code "-G:BenchmarkDynamicCounters=err, starting ====, PASSED in "} and * {@code -G:+ProfileAllocations}.</li> @@ -330,7 +328,7 @@ int index = BenchmarkCounters.getIndex(counter); if (index >= config.graalCountersSize) { - throw new GraalInternalError("too many counters, reduce number of counters or increase GRAAL_COUNTERS_SIZE (current value: " + config.graalCountersSize + ")"); + throw new GraalInternalError("too many counters, reduce number of counters or increase -XX:GraalCounterSize=... (current value: " + config.graalCountersSize + ")"); } ConstantLocationNode arrayLocation = ConstantLocationNode.create(LocationIdentity.ANY_LOCATION, Kind.Long, config.graalCountersThreadOffset, graph); ReadNode readArray = graph.add(new ReadNode(thread, arrayLocation, StampFactory.forKind(wordKind), BarrierType.NONE, false));