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.
|
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.
|