comparison src/share/vm/memory/threadLocalAllocBuffer.hpp @ 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 1af104d6cf99
children 22b8d3d181d9
comparison
equal deleted inserted replaced
6174:74533f63b116 6197:d2a62e0f25eb
34 // ThreadLocalAllocBuffer: a descriptor for thread-local storage used by 34 // ThreadLocalAllocBuffer: a descriptor for thread-local storage used by
35 // the threads for allocation. 35 // the threads for allocation.
36 // It is thread-private at any time, but maybe multiplexed over 36 // It is thread-private at any time, but maybe multiplexed over
37 // time across multiple threads. The park()/unpark() pair is 37 // time across multiple threads. The park()/unpark() pair is
38 // used to make it avaiable for such multiplexing. 38 // used to make it avaiable for such multiplexing.
39 class ThreadLocalAllocBuffer: public CHeapObj { 39 class ThreadLocalAllocBuffer: public CHeapObj<mtThread> {
40 friend class VMStructs; 40 friend class VMStructs;
41 private: 41 private:
42 HeapWord* _start; // address of TLAB 42 HeapWord* _start; // address of TLAB
43 HeapWord* _top; // address after last allocation 43 HeapWord* _top; // address after last allocation
44 HeapWord* _pf_top; // allocation prefetch watermark 44 HeapWord* _pf_top; // allocation prefetch watermark
170 static ByteSize slow_allocations_offset() { return byte_offset_of(ThreadLocalAllocBuffer, _slow_allocations ); } 170 static ByteSize slow_allocations_offset() { return byte_offset_of(ThreadLocalAllocBuffer, _slow_allocations ); }
171 171
172 void verify(); 172 void verify();
173 }; 173 };
174 174
175 class GlobalTLABStats: public CHeapObj { 175 class GlobalTLABStats: public CHeapObj<mtThread> {
176 private: 176 private:
177 177
178 // Accumulate perfdata in private variables because 178 // Accumulate perfdata in private variables because
179 // PerfData should be write-only for security reasons 179 // PerfData should be write-only for security reasons
180 // (see perfData.hpp) 180 // (see perfData.hpp)