Details
-
Enhancement
-
Resolution: Fixed
-
P4
-
14, 15
-
b25
Description
1) Make ShenandoahEvacOOMScope inlineable
2) Avoid calling Shenandoah::heap() and Thread::current() when possible.
AfterJDK-8245240, nesting scope is very lightweight and should be inlined. It shows performance benefit, mainly during concurrent code root processing, although not as noticeable as JDK-8245240 and JDK-8245288, but the gain appears consistent.
Baseline:
Concurrent Class Unloading = 0.138 s (a = 2414 us) (n = 57) (lvls, us = 1680, 1797, 2246, 2988, 3234)
Unlink Stale = 0.120 s (a = 2114 us) (n = 57) (lvls, us = 1465, 1504, 1914, 2695, 2928)
System Dictionary = 0.001 s (a = 12 us) (n = 57) (lvls, us = 10, 11, 12, 13, 19)
Weak Class Links = 0.000 s (a = 0 us) (n = 57) (lvls, us = 0, 0, 0, 0, 1)
Code Roots = 0.120 s (a = 2100 us) (n = 57) (lvls, us = 1445, 1484, 1895, 2676, 2914)
Rendezvous = 0.007 s (a = 119 us) (n = 57) (lvls, us = 64, 102, 115, 117, 215)
Purge Unlinked = 0.008 s (a = 146 us) (n = 57) (lvls, us = 92, 123, 145, 150, 243)
Code Roots = 0.008 s (a = 145 us) (n = 57) (lvls, us = 91, 121, 145, 150, 242)
CLDG = 0.000 s (a = 0 us) (n = 57) (lvls, us = 0, 0, 0, 0, 1)
Exception Caches = 0.000 s (a = 0 us) (n = 57) (lvls, us = 0, 0, 0, 0, 0)
Patched:
Concurrent Class Unloading = 0.136 s (a = 2384 us) (n = 57) (lvls, us = 1699, 1836, 2305, 2852, 3168)
Unlink Stale = 0.118 s (a = 2076 us) (n = 57) (lvls, us = 1465, 1523, 1992, 2559, 2698)
System Dictionary = 0.001 s (a = 13 us) (n = 57) (lvls, us = 10, 12, 13, 13, 17)
Weak Class Links = 0.000 s (a = 0 us) (n = 57) (lvls, us = 0, 0, 0, 0, 1)
Code Roots = 0.118 s (a = 2062 us) (n = 57) (lvls, us = 1445, 1523, 1973, 2539, 2682)
Rendezvous = 0.007 s (a = 125 us) (n = 57) (lvls, us = 70, 107, 117, 119, 220)
Purge Unlinked = 0.008 s (a = 147 us) (n = 57) (lvls, us = 93, 133, 146, 148, 256)
Code Roots = 0.008 s (a = 146 us) (n = 57) (lvls, us = 92, 133, 145, 148, 255)
CLDG = 0.000 s (a = 0 us) (n = 57) (lvls, us = 0, 0, 0, 0, 1)
Exception Caches = 0.000 s (a = 0 us) (n = 57) (lvls, us = 0, 0, 0, 0, 1)
2) Avoid calling Shenandoah::heap() and Thread::current() when possible.
After
Baseline:
Concurrent Class Unloading = 0.138 s (a = 2414 us) (n = 57) (lvls, us = 1680, 1797, 2246, 2988, 3234)
Unlink Stale = 0.120 s (a = 2114 us) (n = 57) (lvls, us = 1465, 1504, 1914, 2695, 2928)
System Dictionary = 0.001 s (a = 12 us) (n = 57) (lvls, us = 10, 11, 12, 13, 19)
Weak Class Links = 0.000 s (a = 0 us) (n = 57) (lvls, us = 0, 0, 0, 0, 1)
Code Roots = 0.120 s (a = 2100 us) (n = 57) (lvls, us = 1445, 1484, 1895, 2676, 2914)
Rendezvous = 0.007 s (a = 119 us) (n = 57) (lvls, us = 64, 102, 115, 117, 215)
Purge Unlinked = 0.008 s (a = 146 us) (n = 57) (lvls, us = 92, 123, 145, 150, 243)
Code Roots = 0.008 s (a = 145 us) (n = 57) (lvls, us = 91, 121, 145, 150, 242)
CLDG = 0.000 s (a = 0 us) (n = 57) (lvls, us = 0, 0, 0, 0, 1)
Exception Caches = 0.000 s (a = 0 us) (n = 57) (lvls, us = 0, 0, 0, 0, 0)
Patched:
Concurrent Class Unloading = 0.136 s (a = 2384 us) (n = 57) (lvls, us = 1699, 1836, 2305, 2852, 3168)
Unlink Stale = 0.118 s (a = 2076 us) (n = 57) (lvls, us = 1465, 1523, 1992, 2559, 2698)
System Dictionary = 0.001 s (a = 13 us) (n = 57) (lvls, us = 10, 12, 13, 13, 17)
Weak Class Links = 0.000 s (a = 0 us) (n = 57) (lvls, us = 0, 0, 0, 0, 1)
Code Roots = 0.118 s (a = 2062 us) (n = 57) (lvls, us = 1445, 1523, 1973, 2539, 2682)
Rendezvous = 0.007 s (a = 125 us) (n = 57) (lvls, us = 70, 107, 117, 119, 220)
Purge Unlinked = 0.008 s (a = 147 us) (n = 57) (lvls, us = 93, 133, 146, 148, 256)
Code Roots = 0.008 s (a = 146 us) (n = 57) (lvls, us = 92, 133, 145, 148, 255)
CLDG = 0.000 s (a = 0 us) (n = 57) (lvls, us = 0, 0, 0, 0, 1)
Exception Caches = 0.000 s (a = 0 us) (n = 57) (lvls, us = 0, 0, 0, 0, 1)