Code Review for 6996747

Prepared by:never on Thu May 12 16:30:53 PDT 2011
Workspace:/net/smite.us.oracle.com/export/ws/sweep
Compare against: ssh://hg.openjdk.java.net/jdk7/hotspot-comp-gate/hotspot
Summary of changes: 159 lines changed: 158 ins; 0 del; 1 mod; 10536 unchg
Patch of changes: 6996747.patch
Author comments:
6996747: SIGSEGV in nmethod::cleanup_inline_caches / CompiledIC::verify
Reviewed-by:

When the sweeper is processing an nmethod it's possible for a
safepoint to occur while acquiring locks to clean the inline caches.
This can allow the nmethod to be unloaded in the middle of processing
it which can result in assertion failures or crashes. I considered
modifying the locks to skip the safepoint check but it would require
changing CompiledIC_lock, InlineCacheBuffer_lock and VtableStubs_lock
which seems risky. Instead I keep track of the currently nmethod in
the CompiledThread and scan it when a GC occurs. I also included some
sweeper logging code that I wrote while debugging this. Tested with
failing test from report though we'll need big apps runs to confirm
that there aren't other issues.

Bug id: 6996747 SIGSEGV in nmethod::cleanup_inline_caches / CompiledIC::verify
Legend: Modified file
Deleted file
New file

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/runtime/globals.hpp

6 lines changed: 6 ins; 0 del; 0 mod; 3815 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/runtime/sweeper.hpp

7 lines changed: 7 ins; 0 del; 0 mod; 78 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/runtime/sweeper.cpp

122 lines changed: 122 ins; 0 del; 0 mod; 455 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/runtime/thread.hpp

14 lines changed: 13 ins; 0 del; 1 mod; 1858 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/share/vm/runtime/thread.cpp

10 lines changed: 10 ins; 0 del; 0 mod; 4330 unchg

This code review page was prepared using /never/bin/webrev (vers 23.18-hg-never).