webrev: thread id in G1GCParPhaseTimesTracker

Bengt Rutisson bengt.rutisson at oracle.com
Mon Mar 23 09:18:07 UTC 2015

On 2015-03-23 10:18, Mikael Gerdin wrote:
> Hi Eric,
> On 2015-03-20 21:16, Eric Caspole wrote:
>> Hi everybody,
>> Yesterday I was chatting with Bengt about trying to encapsulate the GC
>> worker thread id so it does not have to be explicitly passed in in so
>> many GC methods just to record the timing stats. I made a first cut at
>> this here:
>> http://cr.openjdk.java.net/~ecaspole/phase_time_thread/01/webrev/
> Thread::current() is not a particularly cheap operation.
> I think it's worth it to keep the worker_id to keep the overhead of 
> timing measurements to a minimum.

I agree.

The current way of passing worker ids around in the code is a bit 
annoying, but it is very light weight. If we want to replace it we need 
something similarly light weight.


> /Mikael
>> More could be done here but I wanted to see if everyone thought it was
>> worth continuing with it.
>> Thanks,
>> Eric

More information about the hotspot-gc-dev mailing list