equal
deleted
inserted
replaced
685 // must not clobber a bias is when a biased object is currently |
685 // must not clobber a bias is when a biased object is currently |
686 // locked. To handle this case we iterate over the currently-locked |
686 // locked. To handle this case we iterate over the currently-locked |
687 // monitors in a prepass and, if they are biased, preserve their |
687 // monitors in a prepass and, if they are biased, preserve their |
688 // mark words here. This should be a relatively small set of objects |
688 // mark words here. This should be a relatively small set of objects |
689 // especially compared to the number of objects in the heap. |
689 // especially compared to the number of objects in the heap. |
690 _preserved_mark_stack = new (ResourceObj::C_HEAP) GrowableArray<markOop>(10, true); |
690 _preserved_mark_stack = new (ResourceObj::C_HEAP, mtInternal) GrowableArray<markOop>(10, true); |
691 _preserved_oop_stack = new (ResourceObj::C_HEAP) GrowableArray<Handle>(10, true); |
691 _preserved_oop_stack = new (ResourceObj::C_HEAP, mtInternal) GrowableArray<Handle>(10, true); |
692 |
692 |
693 ResourceMark rm; |
693 ResourceMark rm; |
694 Thread* cur = Thread::current(); |
694 Thread* cur = Thread::current(); |
695 for (JavaThread* thread = Threads::first(); thread != NULL; thread = thread->next()) { |
695 for (JavaThread* thread = Threads::first(); thread != NULL; thread = thread->next()) { |
696 if (thread->has_last_Java_frame()) { |
696 if (thread->has_last_Java_frame()) { |