JDK-8025813 : G1: Code root marking unbalanced
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs25
  • Priority: P3
  • Status: Closed
  • Resolution: Won't Fix
  • Submitted: 2013-10-02
  • Updated: 2016-12-15
  • Resolved: 2014-04-17
Related Reports
Relates :  
Relates :  
Description
The fix for JDK-7145569 introduced work distribution of nmethod scanning on a per region basis: nmethods are "attached" to the regions they have references into.

While the fix helps lowering the maximum scan time, in large applications code root marking is very unbalanced: a few regions contain most of the nmethods that need to be scanned (see nmethod_distribution.png), and as the work is distributed on a per-region basis typically one or two threads take much longer than the others.

See maximum/avg times for code root marking in the attached figure (code_root_marking_avg_max.png).

This still negatively impacts overall gc pause times significantly.
Comments
Latest changeset available at http://cr.openjdk.java.net/~tschatzl/8025813/webrev.1/
30-04-2014

This functionality will be obsolete with class unloading. This phase will completely go away if class unloading is enabled. If class unloading is disabled with these chagnes, the CLDG scan during ext root scan will mark all references from nmethods. As both changes are targeted for 8u40 now, there is no point in keeping this change.
17-04-2014

Added log file
25-10-2013

Reproduction steps to find per region imbalance in nmethods: use -XX:+G1PrintRegionLivenessInfo , and -XX:+PrintGCDetails to enable the general logging that shows the resulting timings.
02-10-2013