comparison src/share/vm/compiler/oopMap.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 cba7b5c2d53f
children 957c266d8bc5 b9a9ed0f8eeb
comparison
equal deleted inserted replaced
6174:74533f63b116 6197:d2a62e0f25eb
597 597
598 //------------------------------DerivedPointerTable--------------------------- 598 //------------------------------DerivedPointerTable---------------------------
599 599
600 #ifdef COMPILER2 600 #ifdef COMPILER2
601 601
602 class DerivedPointerEntry : public CHeapObj { 602 class DerivedPointerEntry : public CHeapObj<mtCompiler> {
603 private: 603 private:
604 oop* _location; // Location of derived pointer (also pointing to the base) 604 oop* _location; // Location of derived pointer (also pointing to the base)
605 intptr_t _offset; // Offset from base pointer 605 intptr_t _offset; // Offset from base pointer
606 public: 606 public:
607 DerivedPointerEntry(oop* location, intptr_t offset) { _location = location; _offset = offset; } 607 DerivedPointerEntry(oop* location, intptr_t offset) { _location = location; _offset = offset; }
619 // empty. If not, then we have probably forgotton to call 619 // empty. If not, then we have probably forgotton to call
620 // update_pointers after last GC/Scavenge. 620 // update_pointers after last GC/Scavenge.
621 assert (!_active, "should not be active"); 621 assert (!_active, "should not be active");
622 assert(_list == NULL || _list->length() == 0, "table not empty"); 622 assert(_list == NULL || _list->length() == 0, "table not empty");
623 if (_list == NULL) { 623 if (_list == NULL) {
624 _list = new (ResourceObj::C_HEAP) GrowableArray<DerivedPointerEntry*>(10, true); // Allocated on C heap 624 _list = new (ResourceObj::C_HEAP, mtCompiler) GrowableArray<DerivedPointerEntry*>(10, true); // Allocated on C heap
625 } 625 }
626 _active = true; 626 _active = true;
627 } 627 }
628 628
629 629