Mercurial > hg > graal-compiler
comparison src/share/vm/gc_implementation/parNew/parNewGeneration.hpp @ 1836:894b1d7c7e01
6423256: GC stacks should use a better data structure
6942771: SEGV in ParScanThreadState::take_from_overflow_stack
Reviewed-by: apetrusenko, ysr, pbk
author | jcoomes |
---|---|
date | Tue, 28 Sep 2010 15:56:15 -0700 |
parents | 8b10f48633dc |
children | f95d63e2154a |
comparison
equal
deleted
inserted
replaced
1835:4805b9f4779e | 1836:894b1d7c7e01 |
---|---|
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 |