< prev index next >
src/hotspot/share/runtime/biasedLocking.cpp
Print this page
rev 59866 : 8249192: MonitorInfo stores raw oops across safepoints
Summary: Change raw oops in MonitorInfo to Handles and update Resource/HandleMarks.
Reviewed-by: sspitsyn, dholmes, coleenp, dcubed
*** 904,915 ****
// mark words here. This should be a relatively small set of objects
// especially compared to the number of objects in the heap.
_preserved_mark_stack = new (ResourceObj::C_HEAP, mtInternal) GrowableArray<markWord>(10, true);
_preserved_oop_stack = new (ResourceObj::C_HEAP, mtInternal) GrowableArray<Handle>(10, true);
- ResourceMark rm;
Thread* cur = Thread::current();
for (JavaThreadIteratorWithHandle jtiwh; JavaThread *thread = jtiwh.next(); ) {
if (thread->has_last_Java_frame()) {
RegisterMap rm(thread);
for (javaVFrame* vf = thread->last_java_vframe(&rm); vf != NULL; vf = vf->java_sender()) {
GrowableArray<MonitorInfo*> *monitors = vf->monitors();
--- 904,917 ----
// mark words here. This should be a relatively small set of objects
// especially compared to the number of objects in the heap.
_preserved_mark_stack = new (ResourceObj::C_HEAP, mtInternal) GrowableArray<markWord>(10, true);
_preserved_oop_stack = new (ResourceObj::C_HEAP, mtInternal) GrowableArray<Handle>(10, true);
Thread* cur = Thread::current();
+ ResourceMark rm(cur);
+ HandleMark hm(cur);
+
for (JavaThreadIteratorWithHandle jtiwh; JavaThread *thread = jtiwh.next(); ) {
if (thread->has_last_Java_frame()) {
RegisterMap rm(thread);
for (javaVFrame* vf = thread->last_java_vframe(&rm); vf != NULL; vf = vf->java_sender()) {
GrowableArray<MonitorInfo*> *monitors = vf->monitors();
< prev index next >