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

Coleen Phillimore coleen.phillimore at oracle.com
Mon Apr 8 08:11:59 PDT 2013


On 04/08/2013 09:44 AM, Roland Westrelin wrote:
>> Thanks for pointing those out. For the issue with AdvancedThresholdPolicy::update_rate() and  InterpreterRuntime::exception_handler_for_exception(), how about checking and clearing the pending exception in the private Method::get_method_counters()?
>>
>>
>>    MethodCounters* get_method_counters(TRAPS) {
>>      if (_method_counters == NULL) {
>>        build_method_counters(this,
>> CHECK_AND_CLEAR_NULL
>> );
>>      }
>>      return _method_counters;
>>    }
>>
>>
>> For ciMethod::ensure_method_counters() and ciReplay::initialize(), change the calls build_method_counters() to also use the CHECK_AND_CLEAR_* variations?
>>
>>     mcs = Method::build_method_counters(method, CHECK_AND_CLEAR);
> That sounds good. Maybe also asserting that there's no pending exception before the calls that can throw an OOM exception would be safer.

I think you can get an OOM but you just won't create the counters and 
not update them.

Coleen
>
> Roland.



More information about the hotspot-runtime-dev mailing list