1 /*
2 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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 *
196
197 inline void do_oop_partial_array(oop* p);
198
199 // This method is applied to the fields of the objects that have just been copied.
200 template <class T> inline void do_oop_evac(T* p, HeapRegion* from);
201
202 template <class T> inline void deal_with_reference(T* ref_to_scan);
203
204 inline void dispatch_reference(StarTask ref);
205
206 // Tries to allocate word_sz in the PLAB of the next "generation" after trying to
207 // allocate into dest. State is the original (source) cset state for the object
208 // that is allocated for.
209 // Returns a non-NULL pointer if successful, and updates dest if required.
210 HeapWord* allocate_in_next_plab(InCSetState const state,
211 InCSetState* dest,
212 size_t word_sz,
213 AllocationContext_t const context);
214
215 inline InCSetState next_state(InCSetState const state, markOop const m, uint& age);
216 public:
217
218 oop copy_to_survivor_space(InCSetState const state, oop const obj, markOop const old_mark);
219
220 void trim_queue();
221
222 inline void steal_and_trim_queue(RefToScanQueueSet *task_queues);
223 };
224
225 #endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1PARSCANTHREADSTATE_HPP
|
1 /*
2 * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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 *
196
197 inline void do_oop_partial_array(oop* p);
198
199 // This method is applied to the fields of the objects that have just been copied.
200 template <class T> inline void do_oop_evac(T* p, HeapRegion* from);
201
202 template <class T> inline void deal_with_reference(T* ref_to_scan);
203
204 inline void dispatch_reference(StarTask ref);
205
206 // Tries to allocate word_sz in the PLAB of the next "generation" after trying to
207 // allocate into dest. State is the original (source) cset state for the object
208 // that is allocated for.
209 // Returns a non-NULL pointer if successful, and updates dest if required.
210 HeapWord* allocate_in_next_plab(InCSetState const state,
211 InCSetState* dest,
212 size_t word_sz,
213 AllocationContext_t const context);
214
215 inline InCSetState next_state(InCSetState const state, markOop const m, uint& age);
216 inline InCSetState next_state(InCSetState const state, markOop const m, uint& age, AllocationContext_t context);
217 void report_promotion_event(InCSetState const dest_state,
218 oop const old, size_t word_sz, uint age,
219 HeapWord * const obj_ptr, AllocationContext_t context) const;
220 public:
221
222 oop copy_to_survivor_space(InCSetState const state, oop const obj, markOop const old_mark);
223
224 void trim_queue();
225
226 inline void steal_and_trim_queue(RefToScanQueueSet *task_queues);
227 };
228
229 #endif // SHARE_VM_GC_IMPLEMENTATION_G1_G1PARSCANTHREADSTATE_HPP
|