RFR: JDK-8153187: Convert TraceWorkGang to use unified logging

Bengt Rutisson bengt.rutisson at oracle.com
Thu Mar 31 12:30:44 UTC 2016


Hi everyone,

Could I have a couple of reviews for this change?

http://cr.openjdk.java.net/~brutisso/8153187/webrev.00/
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