7012505: BreakpointWithFullGC.sh fails with Internal Error (src/share/vm/oops/methodOop.cpp:220)

Rebuild breakpoint cache at gc_epilogue instead of during oops_do

Reviewed-by: dcubed, ysr, coleenp
This commit is contained in:
Keith McGuigan 2011-01-19 13:51:53 -08:00
parent f028816786
commit 272d7eaffc
11 changed files with 50 additions and 14 deletions

View file

@ -212,7 +212,13 @@ void GrowableCache::oops_do(OopClosure* f) {
for (int i=0; i<len; i++) {
GrowableElement *e = _elements->at(i);
e->oops_do(f);
_cache[i] = e->getCacheValue();
}
}
void GrowableCache::gc_epilogue() {
int len = _elements->length();
for (int i=0; i<len; i++) {
_cache[i] = _elements->at(i)->getCacheValue();
}
}
@ -394,6 +400,10 @@ void JvmtiBreakpoints::oops_do(OopClosure* f) {
_bps.oops_do(f);
}
void JvmtiBreakpoints::gc_epilogue() {
_bps.gc_epilogue();
}
void JvmtiBreakpoints::print() {
#ifndef PRODUCT
ResourceMark rm;
@ -523,6 +533,12 @@ void JvmtiCurrentBreakpoints::oops_do(OopClosure* f) {
}
}
void JvmtiCurrentBreakpoints::gc_epilogue() {
if (_jvmti_breakpoints != NULL) {
_jvmti_breakpoints->gc_epilogue();
}
}
///////////////////////////////////////////////////////////////
//
// class VM_GetOrSetLocal