While developing JDK-8340827 it has been very useful to have some regular information on the cpu usage of the different thread groups used by the G1 collector, like:
[604.423s][debug][gc,cpu ] GC(197) GC worker threads CPU time: 735795.00
[604.423s][debug][gc,cpu ] GC(197) Marking worker threads CPU time: 295592.69
[604.423s][debug][gc,cpu ] GC(197) Refinement worker thread CPU time: 337.47
Not only for comparison after changes, but also to determine whether there has been significant cpu usage in a particular component and rule out issues in that component (i.e. some heuristics going wild).
Add such messages separately from that other change, prettifying them a little (add unit, maybe add number of worker threads in use etc).
[604.423s][debug][gc,cpu ] GC(197) GC worker threads CPU time: 735795.00
[604.423s][debug][gc,cpu ] GC(197) Marking worker threads CPU time: 295592.69
[604.423s][debug][gc,cpu ] GC(197) Refinement worker thread CPU time: 337.47
Not only for comparison after changes, but also to determine whether there has been significant cpu usage in a particular component and rule out issues in that component (i.e. some heuristics going wild).
Add such messages separately from that other change, prettifying them a little (add unit, maybe add number of worker threads in use etc).
- links to
-
Review(master) openjdk/jdk/23585