Mercurial > hg > truffle
comparison src/share/vm/prims/jvmtiImpl.cpp @ 2125:7246a374a9f2
6458402: 3 jvmti tests fail with CMS and +ExplicitGCInvokesConcurrent
Summary: Make JvmtiGCMark safe to run non-safepoint and instrument CMS
Reviewed-by: ysr, dcubed
author | kamg |
---|---|
date | Mon, 10 Jan 2011 17:14:53 -0500 |
parents | 09b4dd4f152b |
children | 9afee0b9fc1d |
comparison
equal
deleted
inserted
replaced
2124:e31d8c656c5b | 2125:7246a374a9f2 |
---|---|
210 void GrowableCache::oops_do(OopClosure* f) { | 210 void GrowableCache::oops_do(OopClosure* f) { |
211 int len = _elements->length(); | 211 int len = _elements->length(); |
212 for (int i=0; i<len; i++) { | 212 for (int i=0; i<len; i++) { |
213 GrowableElement *e = _elements->at(i); | 213 GrowableElement *e = _elements->at(i); |
214 e->oops_do(f); | 214 e->oops_do(f); |
215 } | 215 _cache[i] = e->getCacheValue(); |
216 } | |
217 | |
218 void GrowableCache::gc_epilogue() { | |
219 int len = _elements->length(); | |
220 // recompute the new cache value after GC | |
221 for (int i=0; i<len; i++) { | |
222 _cache[i] = _elements->at(i)->getCacheValue(); | |
223 } | 216 } |
224 } | 217 } |
225 | 218 |
226 // | 219 // |
227 // class JvmtiBreakpoint | 220 // class JvmtiBreakpoint |
397 | 390 |
398 JvmtiBreakpoints:: ~JvmtiBreakpoints() {} | 391 JvmtiBreakpoints:: ~JvmtiBreakpoints() {} |
399 | 392 |
400 void JvmtiBreakpoints::oops_do(OopClosure* f) { | 393 void JvmtiBreakpoints::oops_do(OopClosure* f) { |
401 _bps.oops_do(f); | 394 _bps.oops_do(f); |
402 } | |
403 | |
404 void JvmtiBreakpoints::gc_epilogue() { | |
405 _bps.gc_epilogue(); | |
406 } | 395 } |
407 | 396 |
408 void JvmtiBreakpoints::print() { | 397 void JvmtiBreakpoints::print() { |
409 #ifndef PRODUCT | 398 #ifndef PRODUCT |
410 ResourceMark rm; | 399 ResourceMark rm; |
532 if (_jvmti_breakpoints != NULL) { | 521 if (_jvmti_breakpoints != NULL) { |
533 _jvmti_breakpoints->oops_do(f); | 522 _jvmti_breakpoints->oops_do(f); |
534 } | 523 } |
535 } | 524 } |
536 | 525 |
537 void JvmtiCurrentBreakpoints::gc_epilogue() { | |
538 if (_jvmti_breakpoints != NULL) { | |
539 _jvmti_breakpoints->gc_epilogue(); | |
540 } | |
541 } | |
542 | |
543 | |
544 /////////////////////////////////////////////////////////////// | 526 /////////////////////////////////////////////////////////////// |
545 // | 527 // |
546 // class VM_GetOrSetLocal | 528 // class VM_GetOrSetLocal |
547 // | 529 // |
548 | 530 |