5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_G1PARSCANTHREADSTATE_HPP
26 #define SHARE_VM_GC_IMPLEMENTATION_G1_G1PARSCANTHREADSTATE_HPP
27
28 #include "gc_implementation/g1/dirtyCardQueue.hpp"
29 #include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
30 #include "gc_implementation/g1/g1CollectedHeap.hpp"
31 #include "gc_implementation/g1/g1CollectorPolicy.hpp"
32 #include "gc_implementation/g1/g1OopClosures.hpp"
33 #include "gc_implementation/g1/g1RemSet.hpp"
34 #include "gc_implementation/shared/ageTable.hpp"
35 #include "memory/allocation.hpp"
36 #include "oops/oop.hpp"
37
38 class HeapRegion;
39 class outputStream;
40
41 class G1ParScanThreadState : public StackObj {
42 private:
43 G1CollectedHeap* _g1h;
44 RefToScanQueue* _refs;
45 DirtyCardQueue _dcq;
46 G1SATBCardTableModRefBS* _ct_bs;
47 G1RemSet* _g1_rem;
48
49 G1ParGCAllocator* _g1_par_allocator;
50
51 ageTable _age_table;
52 InCSetState _dest[InCSetState::Num];
53 // Local tenuring threshold.
54 uint _tenuring_threshold;
196
197 // Tries to allocate word_sz in the PLAB of the next "generation" after trying to
198 // allocate into dest. State is the original (source) cset state for the object
199 // that is allocated for.
200 // Returns a non-NULL pointer if successful, and updates dest if required.
201 HeapWord* allocate_in_next_plab(InCSetState const state,
202 InCSetState* dest,
203 size_t word_sz,
204 AllocationContext_t const context);
205
206 inline InCSetState next_state(InCSetState const state, markOop const m, uint& age);
207 public:
208
209 oop copy_to_survivor_space(InCSetState const state, oop const obj, markOop const old_mark);
210
211 void trim_queue();
212
213 inline void steal_and_trim_queue(RefToScanQueueSet *task_queues);
214 };
215
216 #endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1PARSCANTHREADSTATE_HPP
|
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_VM_GC_G1_G1PARSCANTHREADSTATE_HPP
26 #define SHARE_VM_GC_G1_G1PARSCANTHREADSTATE_HPP
27
28 #include "gc/g1/dirtyCardQueue.hpp"
29 #include "gc/g1/g1CollectedHeap.hpp"
30 #include "gc/g1/g1CollectorPolicy.hpp"
31 #include "gc/g1/g1OopClosures.hpp"
32 #include "gc/g1/g1RemSet.hpp"
33 #include "gc/g1/g1SATBCardTableModRefBS.hpp"
34 #include "gc/shared/ageTable.hpp"
35 #include "memory/allocation.hpp"
36 #include "oops/oop.hpp"
37
38 class HeapRegion;
39 class outputStream;
40
41 class G1ParScanThreadState : public StackObj {
42 private:
43 G1CollectedHeap* _g1h;
44 RefToScanQueue* _refs;
45 DirtyCardQueue _dcq;
46 G1SATBCardTableModRefBS* _ct_bs;
47 G1RemSet* _g1_rem;
48
49 G1ParGCAllocator* _g1_par_allocator;
50
51 ageTable _age_table;
52 InCSetState _dest[InCSetState::Num];
53 // Local tenuring threshold.
54 uint _tenuring_threshold;
196
197 // Tries to allocate word_sz in the PLAB of the next "generation" after trying to
198 // allocate into dest. State is the original (source) cset state for the object
199 // that is allocated for.
200 // Returns a non-NULL pointer if successful, and updates dest if required.
201 HeapWord* allocate_in_next_plab(InCSetState const state,
202 InCSetState* dest,
203 size_t word_sz,
204 AllocationContext_t const context);
205
206 inline InCSetState next_state(InCSetState const state, markOop const m, uint& age);
207 public:
208
209 oop copy_to_survivor_space(InCSetState const state, oop const obj, markOop const old_mark);
210
211 void trim_queue();
212
213 inline void steal_and_trim_queue(RefToScanQueueSet *task_queues);
214 };
215
216 #endif // SHARE_VM_GC_G1_G1PARSCANTHREADSTATE_HPP
|