Details
-
Enhancement
-
Resolution: Unresolved
-
P4
-
22
Description
Another improvement has been bulk nmethod unregistering during class unloading: instead of unregistering nmethod by nmethod, g1 now bulk removes dead nmethods from the code root sets in parallel on a per remembered set (region) basis.
However it happens that if code root sets are unbalanced, so lots of efficiency can be lost.
The following log snippet (additional augmentations) shows how long each thread of the task in G1CollectedHeap::remove_dead_entries_from_code_root_sets() takes for doing this bulk unregistering:
[725,544s][gc ] GC(140) clean_code_root_sets task worker 3 time 0,42
[725,544s][gc ] GC(140) clean_code_root_sets task worker 1 time 0,45
[725,544s][gc ] GC(140) clean_code_root_sets task worker 5 time 0,49
[725,544s][gc ] GC(140) clean_code_root_sets task worker 13 time 0,52
[725,545s][gc ] GC(140) clean_code_root_sets task worker 12 time 0,56
[725,545s][gc ] GC(140) clean_code_root_sets task worker 9 time 0,67
[725,545s][gc ] GC(140) clean_code_root_sets task worker 15 time 0,70
[725,545s][gc ] GC(140) clean_code_root_sets task worker 11 time 0,96
[725,545s][gc ] GC(140) clean_code_root_sets task worker 2 time 0,97
[725,545s][gc ] GC(140) clean_code_root_sets task worker 7 time 1,24
[725,545s][gc ] GC(140) clean_code_root_sets task worker 8 time 1,35
[725,546s][gc ] GC(140) clean_code_root_sets task worker 4 time 1,71
[725,546s][gc ] GC(140) clean_code_root_sets task worker 0 time 1,93
[725,546s][gc ] GC(140) clean_code_root_sets task worker 6 time 2,35
[725,555s][gc ] GC(140) clean_code_root_sets task worker 14 time 11,41
[725,555s][gc ] GC(140) clean_code_root_sets task worker 10 time 11,42
[725,555s][gc,phases ] GC(140) Clean CodeRoots 11,515ms
(times in ms)
on the reproducer from