comparison src/share/vm/gc_implementation/parNew/parNewGeneration.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 441e946dc1af
children aaf61e68b255
comparison
equal deleted inserted replaced
6174:74533f63b116 6197:d2a62e0f25eb
39 // It would be better if these types could be kept local to the .cpp file, 39 // It would be better if these types could be kept local to the .cpp file,
40 // but they must be here to allow ParScanClosure::do_oop_work to be defined 40 // but they must be here to allow ParScanClosure::do_oop_work to be defined
41 // in genOopClosures.inline.hpp. 41 // in genOopClosures.inline.hpp.
42 42
43 typedef Padded<OopTaskQueue> ObjToScanQueue; 43 typedef Padded<OopTaskQueue> ObjToScanQueue;
44 typedef GenericTaskQueueSet<ObjToScanQueue> ObjToScanQueueSet; 44 typedef GenericTaskQueueSet<ObjToScanQueue, mtGC> ObjToScanQueueSet;
45 45
46 class ParKeepAliveClosure: public DefNewGeneration::KeepAliveClosure { 46 class ParKeepAliveClosure: public DefNewGeneration::KeepAliveClosure {
47 private: 47 private:
48 ParScanWeakRefClosure* _par_cl; 48 ParScanWeakRefClosure* _par_cl;
49 protected: 49 protected:
57 // The state needed by thread performing parallel young-gen collection. 57 // The state needed by thread performing parallel young-gen collection.
58 class ParScanThreadState { 58 class ParScanThreadState {
59 friend class ParScanThreadStateSet; 59 friend class ParScanThreadStateSet;
60 private: 60 private:
61 ObjToScanQueue *_work_queue; 61 ObjToScanQueue *_work_queue;
62 Stack<oop>* const _overflow_stack; 62 Stack<oop, mtGC>* const _overflow_stack;
63 63
64 ParGCAllocBuffer _to_space_alloc_buffer; 64 ParGCAllocBuffer _to_space_alloc_buffer;
65 65
66 ParScanWithoutBarrierClosure _to_space_closure; // scan_without_gc_barrier 66 ParScanWithoutBarrierClosure _to_space_closure; // scan_without_gc_barrier
67 ParScanWithBarrierClosure _old_gen_closure; // scan_with_gc_barrier 67 ParScanWithBarrierClosure _old_gen_closure; // scan_with_gc_barrier
125 void record_survivor_plab(HeapWord* plab_start, size_t plab_word_size); 125 void record_survivor_plab(HeapWord* plab_start, size_t plab_word_size);
126 126
127 ParScanThreadState(Space* to_space_, ParNewGeneration* gen_, 127 ParScanThreadState(Space* to_space_, ParNewGeneration* gen_,
128 Generation* old_gen_, int thread_num_, 128 Generation* old_gen_, int thread_num_,
129 ObjToScanQueueSet* work_queue_set_, 129 ObjToScanQueueSet* work_queue_set_,
130 Stack<oop>* overflow_stacks_, 130 Stack<oop, mtGC>* overflow_stacks_,
131 size_t desired_plab_sz_, 131 size_t desired_plab_sz_,
132 ParallelTaskTerminator& term_); 132 ParallelTaskTerminator& term_);
133 133
134 public: 134 public:
135 ageTable* age_table() {return &_ageTable;} 135 ageTable* age_table() {return &_ageTable;}
149 149
150 // Decrease queue size below "max_size". 150 // Decrease queue size below "max_size".
151 void trim_queues(int max_size); 151 void trim_queues(int max_size);
152 152
153 // Private overflow stack usage 153 // Private overflow stack usage
154 Stack<oop>* overflow_stack() { return _overflow_stack; } 154 Stack<oop, mtGC>* overflow_stack() { return _overflow_stack; }
155 bool take_from_overflow_stack(); 155 bool take_from_overflow_stack();
156 void push_on_overflow_stack(oop p); 156 void push_on_overflow_stack(oop p);
157 157
158 // Is new_obj a candidate for scan_partial_array_and_push_remainder method. 158 // Is new_obj a candidate for scan_partial_array_and_push_remainder method.
159 inline bool should_be_partially_scanned(oop new_obj, oop old_obj) const; 159 inline bool should_be_partially_scanned(oop new_obj, oop old_obj) const;
310 private: 310 private:
311 // The per-worker-thread work queues 311 // The per-worker-thread work queues
312 ObjToScanQueueSet* _task_queues; 312 ObjToScanQueueSet* _task_queues;
313 313
314 // Per-worker-thread local overflow stacks 314 // Per-worker-thread local overflow stacks
315 Stack<oop>* _overflow_stacks; 315 Stack<oop, mtGC>* _overflow_stacks;
316 316
317 // Desired size of survivor space plab's 317 // Desired size of survivor space plab's
318 PLABStats _plab_stats; 318 PLABStats _plab_stats;
319 319
320 // A list of from-space images of to-be-scanned objects, threaded through 320 // A list of from-space images of to-be-scanned objects, threaded through