comparison src/share/vm/runtime/biasedLocking.cpp @ 6197:d2a62e0f25eb

6995781: Native Memory Tracking (Phase 1) 7151532: DCmd for hotspot native memory tracking Summary: Implementation of native memory tracking phase 1, which tracks VM native memory usage, and related DCmd Reviewed-by: acorn, coleenp, fparain
author zgu
date Thu, 28 Jun 2012 17:03:16 -0400
parents f95d63e2154a
children da91efe96a93
comparison
equal deleted inserted replaced
6174:74533f63b116 6197:d2a62e0f25eb
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()) {