Pls review 7023931 (S)
    Daniel D. Daugherty 
    daniel.daugherty at oracle.com
       
    Fri Mar 11 12:37:36 PST 2011
    
    
  
On 3/11/2011 1:14 PM, Paul Hohensee wrote:
> 7023931: PcDescCache::find_pc_desc should not write _last_pc_desc
>
> http://cr.openjdk.java.net/~phh/7023931/webrev.00/
Thumbs up.
src/share/vm/code/nmethod.hpp
    No comments.
src/share/vm/code/nmethod.cpp
    No code comments.
    line 329 (new): Did you mean to change that ':' to '.'
Dan
>
> 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 
> constantly
> 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[0] instead.  
> The latter
> is written only once when it's added to the cache, avoiding the block
> bouncing issue.  Use of _pcdescs[0] 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.
>
> Thanks,
>
> Paul
>
    
    
More information about the hotspot-runtime-dev
mailing list