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_PARALLEL_PSSCAVENGE_INLINE_HPP
26 #define SHARE_VM_GC_PARALLEL_PSSCAVENGE_INLINE_HPP
27
28 #include "gc/parallel/cardTableExtension.hpp"
29 #include "gc/parallel/parallelScavengeHeap.hpp"
30 #include "gc/parallel/psPromotionManager.inline.hpp"
31 #include "gc/parallel/psScavenge.hpp"
32 #include "logging/log.hpp"
33 #include "memory/iterator.hpp"
34 #include "memory/resourceArea.hpp"
35 #include "utilities/globalDefinitions.hpp"
36
37 inline void PSScavenge::save_to_space_top_before_gc() {
38 ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
39 _to_space_top_before_gc = heap->young_gen()->to_space()->top();
40 }
41
42 template <class T> inline bool PSScavenge::should_scavenge(T* p) {
43 T heap_oop = oopDesc::load_heap_oop(p);
44 return PSScavenge::is_obj_in_young(heap_oop);
45 }
46
47 template <class T>
48 inline bool PSScavenge::should_scavenge(T* p, MutableSpace* to_space) {
|
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_PARALLEL_PSSCAVENGE_INLINE_HPP
26 #define SHARE_VM_GC_PARALLEL_PSSCAVENGE_INLINE_HPP
27
28 #include "gc/parallel/parallelScavengeHeap.hpp"
29 #include "gc/parallel/psPromotionManager.inline.hpp"
30 #include "gc/parallel/psScavenge.hpp"
31 #include "logging/log.hpp"
32 #include "memory/iterator.hpp"
33 #include "memory/resourceArea.hpp"
34 #include "utilities/globalDefinitions.hpp"
35
36 inline void PSScavenge::save_to_space_top_before_gc() {
37 ParallelScavengeHeap* heap = ParallelScavengeHeap::heap();
38 _to_space_top_before_gc = heap->young_gen()->to_space()->top();
39 }
40
41 template <class T> inline bool PSScavenge::should_scavenge(T* p) {
42 T heap_oop = oopDesc::load_heap_oop(p);
43 return PSScavenge::is_obj_in_young(heap_oop);
44 }
45
46 template <class T>
47 inline bool PSScavenge::should_scavenge(T* p, MutableSpace* to_space) {
|