JDK-8027543 : Turn off symbol table scan if not class unloading in G1 remark phase
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs25,8
  • Priority: P3
  • Status: Closed
  • Resolution: Other
  • Submitted: 2013-10-30
  • Updated: 2020-09-24
  • Resolved: 2020-09-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdResolved
Related Reports
Relates :  
Description
Symbol table scan is the most time consuming part of some pauses, particularly the G1 remark phase. Measurements show that over a large range of applications it takes ~50% of the pause time.

At the same time, with the current G1 implementation of concurrent marking there does not seem to be any actual freeing of symbols since it does not do class unloading.

Consider not doing symbol table scan at all in this case, i.e. when there is no class unloading during G1 remark. Investigate whether it is true that there is no symbol freeing (or almost none) in this case, and possibly investigate other applications of this method. (i.e. turn of symbol table scan when no class unloading is done)

This is sort of a short-term "solution" for the issue as long as G1 does not support class unloading during G1 concurrent mark.

There is a related JDK-8027455 that is about improving the actual scan if it needs to be done
Comments
SymbolTable cleaning has been moved to a concurrent phase outside of the GC.
24-09-2020

Symbol table scan could be triggered on activity, i.e. how much symbols were added/classes were unloaded depending on some heuristics given e.g. the following sources: - class (un-)loading - temporary symbol creation (e.g. class.forName())
30-10-2013

It may not be so simple to just skip this step: code like Class.forName() may create "temporary" symbols.
30-10-2013