Request for review: 8010862: The Method counter fields used for profiling can be allocated lazily

Jiangli Zhou jiangli.zhou at oracle.com
Wed Mar 27 12:44:50 PDT 2013


Hi,

Please review the following change for 8010862.

   http://cr.openjdk.java.net/~jiangli/8010862/webrev.00/

The following 7 fields in method.hpp are used for interpreter/tiered 
compilation profiling (the profileing data are used by the compiler). 
Profiling are only done for Java method that's being executed. For 
method that's never executed, these fields are never used. During the 
execution of a Java application, only small fraction of loaded Java 
methods are executed. Eliminating the profiling related fields for 
unexecuted methods and only allocating them when needed would yield 
large runtime memory saving. The change in the webrev moves the 7 fields 
into a separate MethodCounters object. The MethodCounters is allocated 
upon the first time when any of the fields is modified.

   int _interpreter_invocation_count;
   u2 _interpreter_throwout_count;
   u2 _number_of_breakpoints;
   InvocationCounter _invocation_counter;
   InvocationCounter _backedge_counter;
#ifdef TIERED
   float _rate;
   jlong _prev_time;
#endif

No measurable performance impact with the change. For runtime memory 
saving and performance measurements, please see more details in the bug 
report.

Tested with JPRT, 
vm.quick.testlist/nsk.sajdi.testlist/nsk.stress.testlist on x86 and 
vm.quick.testlist on Sparc.

Thanks,
Jiangli


More information about the hotspot-runtime-dev mailing list