Pls review 7023931 (S)
paul.hohensee at oracle.com
Fri Mar 11 12:14:53 PST 2011
7023931: PcDescCache::find_pc_desc should not write _last_pc_desc
The nmethod PcDescCache cached the last looked-up descriptor in a shared
field called _last_pc_desc. This is fine in a single-threaded environment,
but in a multi-threaded, multi-socket enviroment, frequent writes cause
"block bouncing". I.e., the cache line containing _last_pc_desc is
being moved among the caches on different sockets. This process hurts
stack walking performance, especially on multi-socket Intel systems.
The fix is to eliminate _last_pc_desc and use _pcdescs instead. The
is written only once when it's added to the cache, avoiding the block
bouncing issue. Use of _pcdescs instead of _last_pc_desc means that
there are slightly few "hits", but that doesn't seem to affect performance.
Tested using SPECjvm2008's serial sub-benchmark and full nsks.
More information about the hotspot-compiler-dev