JDK-6962947 : shared TaskQueue statistics
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs19
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2010-06-22
  • Updated: 2010-09-24
  • Resolved: 2010-08-04
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.
JDK 6 JDK 7 Other
6u21pFixed 7Fixed hs19Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
Code to keep some basic statistics on TaskQueue operations like pushes, overflow pushes, steals, etc., exists in the PSPromotionManager class.  It should be moved to TaskQueue directly so it is more widely available and made easier to use.

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/a93a9eda13f7
25-07-2010

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot/hotspot/rev/a93a9eda13f7
23-07-2010

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/a93a9eda13f7
17-07-2010

EVALUATION Must also fix some fragile padding declarations in ParNew and CMS which assumed sizeof(TaskQueue) < 64 and underflowed when the TaskQueue size changed. Add a PADDING_SIZE macro to compute the correct length for a padding array, avoiding 0 (which is disallowed by the c++ standard, although it is accepted by some compilers). Also add a template class, Padded<>, to easily create a subclass of a given type padded to the correct size.
12-07-2010

SUGGESTED FIX See attached 6962747-taskqueue-stats.zip.
02-07-2010

EVALUATION Add class TaskQueueStats, used by TaskQueue, to track pushes, pops, steals, overflows, etc. Enable the code by default in debug builds to prevent bit rot and make it easy to enable in product builds (with gmake ... EXTRA_CFLAGS=-DTASKQUEUE_STATS=1). Change PSPromotionManager to use TaskQueueStats, guard compilation with TASKQUEUE_STATS instead of PS_PM_STATS, make the output conditional (PrintGCDetails && ParallelGCVerbose) and format it as a table.
02-07-2010

EVALUATION Yes. The statistics can be useful for performance evaluation & diagnosis.
22-06-2010