A pc descriptor cache is maintained for each nmethod. The lookup method find_pc_desc(0 is heavily used during stack walking, and maintains the last looked-up value in _last_pc_desc. Unfortunately, _last_pc_desc is a shared variable, so writes to it can cause the cache line it's in to bounce between cores and chips, resulting in very high overhead. On the SPECjvm2008 serial sub-benchmark, eliminating the write results in a factor of 10 drop in last- level-cache misses, resulting in a 10% score improvement on some platforms. This is a useful generic improvement, as stack walking is pervasive during jvm excecution.
|