Mercurial > hg > truffle
diff src/share/vm/prims/jvmtiImpl.cpp @ 2147:9afee0b9fc1d
7012505: BreakpointWithFullGC.sh fails with Internal Error (src/share/vm/oops/methodOop.cpp:220)
Summary: Rebuild breakpoint cache at gc_epilogue instead of during oops_do
Reviewed-by: dcubed, ysr, coleenp
author | kamg |
---|---|
date | Wed, 19 Jan 2011 13:51:53 -0800 |
parents | 7246a374a9f2 |
children | 3582bf76420e |
line wrap: on
line diff
--- a/src/share/vm/prims/jvmtiImpl.cpp Wed Jan 19 08:16:45 2011 -0800 +++ b/src/share/vm/prims/jvmtiImpl.cpp Wed Jan 19 13:51:53 2011 -0800 @@ -212,7 +212,13 @@ 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 @@ _bps.oops_do(f); } +void JvmtiBreakpoints::gc_epilogue() { + _bps.gc_epilogue(); +} + void JvmtiBreakpoints::print() { #ifndef PRODUCT ResourceMark rm; @@ -523,6 +533,12 @@ } } +void JvmtiCurrentBreakpoints::gc_epilogue() { + if (_jvmti_breakpoints != NULL) { + _jvmti_breakpoints->gc_epilogue(); + } +} + /////////////////////////////////////////////////////////////// // // class VM_GetOrSetLocal