< prev index next > src/hotspot/share/gc/shenandoah/shenandoahCollectionSet.inline.hpp
Print this page
/*
* Copyright (c) 2017, 2020, Red Hat, Inc. All rights reserved.
+ * Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
bool ShenandoahCollectionSet::is_in(ShenandoahHeapRegion* r) const {
return is_in(r->index());
}
bool ShenandoahCollectionSet::is_in(oop p) const {
! shenandoah_assert_in_heap_or_null(nullptr, p);
return is_in_loc(cast_from_oop<void*>(p));
}
bool ShenandoahCollectionSet::is_in_loc(void* p) const {
! assert(p == nullptr || _heap->is_in(p), "Must be in the heap");
uintx index = ((uintx) p) >> _region_size_bytes_shift;
// no need to subtract the bottom of the heap from p,
// _biased_cset_map is biased
return _biased_cset_map[index] == 1;
}
#endif // SHARE_GC_SHENANDOAH_SHENANDOAHCOLLECTIONSET_INLINE_HPP
bool ShenandoahCollectionSet::is_in(ShenandoahHeapRegion* r) const {
return is_in(r->index());
}
bool ShenandoahCollectionSet::is_in(oop p) const {
! shenandoah_assert_in_heap_bounds_or_null(nullptr, p);
return is_in_loc(cast_from_oop<void*>(p));
}
bool ShenandoahCollectionSet::is_in_loc(void* p) const {
! assert(p == nullptr || _heap->is_in_reserved(p), "Must be in the heap");
uintx index = ((uintx) p) >> _region_size_bytes_shift;
// no need to subtract the bottom of the heap from p,
// _biased_cset_map is biased
return _biased_cset_map[index] == 1;
}
+ size_t ShenandoahCollectionSet::get_old_bytes_reserved_for_evacuation() {
+ return _old_bytes_to_evacuate;
+ }
+
+ size_t ShenandoahCollectionSet::get_young_bytes_reserved_for_evacuation() {
+ return _young_bytes_to_evacuate - _young_bytes_to_promote;
+ }
+
+ size_t ShenandoahCollectionSet::get_young_bytes_to_be_promoted() {
+ return _young_bytes_to_promote;
+ }
+
+ size_t ShenandoahCollectionSet::get_old_garbage() {
+ return _old_garbage;
+ }
+
#endif // SHARE_GC_SHENANDOAH_SHENANDOAHCOLLECTIONSET_INLINE_HPP
< prev index next >