RFR: JDK-8153187: Convert TraceWorkGang to use unified logging
Bengt Rutisson
bengt.rutisson at oracle.com
Thu Mar 31 12:54:52 UTC 2016
Hi Mikael,
On 2016-03-31 14:47, Mikael Gerdin wrote:
> Hi Bengt,
>
> On 2016-03-31 14:30, Bengt Rutisson wrote:
>>
>> Hi everyone,
>>
>> Could I have a couple of reviews for this change?
>>
>> http://cr.openjdk.java.net/~brutisso/8153187/webrev.00/
>
> 312 log_develop_trace(gc, workgang)("Finished work gang: %s task:
> %s worker: %u thread: " PTR_FORMAT,
> 313 name(), data._task->name(), data._worker_id,
> p2i(Thread::current()));
> 314 }
>
> Shouldn't the parameters on line 313 be aligned with the opening brace?
Right. I changed it to:
log_develop_trace(gc, workgang)("Finished work gang: %s task: %s
worker: %u thread: " PTR_FORMAT,
name(), data._task->name(),
data._worker_id, p2i(Thread::current()));
>
> Otherwise looks good. There is no possibility of the code entering
> print_task_done from the VM thread so I agree that the code to handle
> that should be removed.
Thanks for the review!
Bengt
>
> /Mikael
>
>> https://bugs.openjdk.java.net/browse/JDK-8153187
>>
>> The logging guarded by TraceWorkGang should be converted to use the
>> unified logging framework.
>>
>> The logging now has this format:
>>
>> [0,509s][trace][gc,workgang] GC(0) Running work gang: GC Thread#1 task:
>> ParPreserveCMReferents worker: 0
>> [0,509s][trace][gc,workgang] GC(0) Running work gang: GC Thread#0 task:
>> ParPreserveCMReferents worker: 1
>> [0,509s][trace][gc,workgang] GC(0) Running work gang: GC Thread#3 task:
>> ParPreserveCMReferents worker: 3
>> [0,509s][trace][gc,workgang] GC(0) Running work gang: GC Thread#2 task:
>> ParPreserveCMReferents worker: 2
>> [0,510s][trace][gc,workgang] GC(0) Finished work gang: GC Thread#2 task:
>> ParPreserveCMReferents worker: 2 thread: 0x00007f161c039800
>> [0,510s][trace][gc,workgang] GC(0) Finished work gang: GC Thread#1 task:
>> ParPreserveCMReferents worker: 0 thread: 0x00007f161c037800
>> [0,510s][trace][gc,workgang] GC(0) Finished work gang: GC Thread#3 task:
>> ParPreserveCMReferents worker: 3 thread: 0x00007f161c03b800
>> [0,510s][trace][gc,workgang] GC(0) Finished work gang: GC Thread#0 task:
>> ParPreserveCMReferents worker: 1 thread: 0x00007f161c035800
>>
>> The "finished" log line has a slightly different format comapred to
>> before. It used to be two lines, like this:
>>
>> Finished work gang GC Thread#1 task Parallel verify task worker 0
>> T: 0x00007f39c4038800 VM_thread: 0
>>
>> The second line contained the thread pointer and an int that was always
>> 0 since GangWorkers are never VM threads. I skipped the VM_thread info
>> and moved the thread pointer to the first line.
>>
>> Note that TraceWorkGang was a develop flag so there should be no tools
>> out there that rely on this format.
>>
>> Thanks,
>> Bengt
>>
More information about the hotspot-gc-dev
mailing list