Mercurial > hg > graal-compiler
comparison src/share/vm/gc_implementation/parNew/parNewGeneration.hpp @ 1843:0715f0cf171d
Merge
author | jcoomes |
---|---|
date | Fri, 08 Oct 2010 09:29:09 -0700 |
parents | 894b1d7c7e01 |
children | f95d63e2154a |
comparison
equal
deleted
inserted
replaced
1832:22e4420d19f7 | 1843:0715f0cf171d |
---|---|
50 // The state needed by thread performing parallel young-gen collection. | 50 // The state needed by thread performing parallel young-gen collection. |
51 class ParScanThreadState { | 51 class ParScanThreadState { |
52 friend class ParScanThreadStateSet; | 52 friend class ParScanThreadStateSet; |
53 private: | 53 private: |
54 ObjToScanQueue *_work_queue; | 54 ObjToScanQueue *_work_queue; |
55 GrowableArray<oop>* _overflow_stack; | 55 Stack<oop>* const _overflow_stack; |
56 | 56 |
57 ParGCAllocBuffer _to_space_alloc_buffer; | 57 ParGCAllocBuffer _to_space_alloc_buffer; |
58 | 58 |
59 ParScanWithoutBarrierClosure _to_space_closure; // scan_without_gc_barrier | 59 ParScanWithoutBarrierClosure _to_space_closure; // scan_without_gc_barrier |
60 ParScanWithBarrierClosure _old_gen_closure; // scan_with_gc_barrier | 60 ParScanWithBarrierClosure _old_gen_closure; // scan_with_gc_barrier |
118 void record_survivor_plab(HeapWord* plab_start, size_t plab_word_size); | 118 void record_survivor_plab(HeapWord* plab_start, size_t plab_word_size); |
119 | 119 |
120 ParScanThreadState(Space* to_space_, ParNewGeneration* gen_, | 120 ParScanThreadState(Space* to_space_, ParNewGeneration* gen_, |
121 Generation* old_gen_, int thread_num_, | 121 Generation* old_gen_, int thread_num_, |
122 ObjToScanQueueSet* work_queue_set_, | 122 ObjToScanQueueSet* work_queue_set_, |
123 GrowableArray<oop>** overflow_stack_set_, | 123 Stack<oop>* overflow_stacks_, |
124 size_t desired_plab_sz_, | 124 size_t desired_plab_sz_, |
125 ParallelTaskTerminator& term_); | 125 ParallelTaskTerminator& term_); |
126 | 126 |
127 public: | 127 public: |
128 ageTable* age_table() {return &_ageTable;} | 128 ageTable* age_table() {return &_ageTable;} |
142 | 142 |
143 // Decrease queue size below "max_size". | 143 // Decrease queue size below "max_size". |
144 void trim_queues(int max_size); | 144 void trim_queues(int max_size); |
145 | 145 |
146 // Private overflow stack usage | 146 // Private overflow stack usage |
147 GrowableArray<oop>* overflow_stack() { return _overflow_stack; } | 147 Stack<oop>* overflow_stack() { return _overflow_stack; } |
148 bool take_from_overflow_stack(); | 148 bool take_from_overflow_stack(); |
149 void push_on_overflow_stack(oop p); | 149 void push_on_overflow_stack(oop p); |
150 | 150 |
151 // Is new_obj a candidate for scan_partial_array_and_push_remainder method. | 151 // Is new_obj a candidate for scan_partial_array_and_push_remainder method. |
152 inline bool should_be_partially_scanned(oop new_obj, oop old_obj) const; | 152 inline bool should_be_partially_scanned(oop new_obj, oop old_obj) const; |
299 private: | 299 private: |
300 // The per-worker-thread work queues | 300 // The per-worker-thread work queues |
301 ObjToScanQueueSet* _task_queues; | 301 ObjToScanQueueSet* _task_queues; |
302 | 302 |
303 // Per-worker-thread local overflow stacks | 303 // Per-worker-thread local overflow stacks |
304 GrowableArray<oop>** _overflow_stacks; | 304 Stack<oop>* _overflow_stacks; |
305 | 305 |
306 // Desired size of survivor space plab's | 306 // Desired size of survivor space plab's |
307 PLABStats _plab_stats; | 307 PLABStats _plab_stats; |
308 | 308 |
309 // A list of from-space images of to-be-scanned objects, threaded through | 309 // A list of from-space images of to-be-scanned objects, threaded through |
347 for (uint i = 0; i < ParallelGCThreads; i++) | 347 for (uint i = 0; i < ParallelGCThreads; i++) |
348 delete _task_queues->queue(i); | 348 delete _task_queues->queue(i); |
349 | 349 |
350 delete _task_queues; | 350 delete _task_queues; |
351 } | 351 } |
352 | |
353 static bool in_use(); | |
352 | 354 |
353 virtual void ref_processor_init(); | 355 virtual void ref_processor_init(); |
354 virtual Generation::Name kind() { return Generation::ParNew; } | 356 virtual Generation::Name kind() { return Generation::ParNew; } |
355 virtual const char* name() const; | 357 virtual const char* name() const; |
356 virtual const char* short_name() const { return "ParNew"; } | 358 virtual const char* short_name() const { return "ParNew"; } |