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 #ifndef SHARE_GC_Z_ZLIVEMAP_INLINE_HPP
25 #define SHARE_GC_Z_ZLIVEMAP_INLINE_HPP
26
27 #include "gc/z/zBitMap.inline.hpp"
28 #include "gc/z/zLiveMap.hpp"
29 #include "gc/z/zMark.hpp"
30 #include "gc/z/zOop.inline.hpp"
31 #include "gc/z/zUtils.inline.hpp"
32 #include "runtime/atomic.hpp"
33 #include "runtime/orderAccess.hpp"
34 #include "utilities/bitMap.inline.hpp"
35 #include "utilities/debug.hpp"
36
37 inline void ZLiveMap::reset() {
38 _seqnum = 0;
39 }
40
41 inline bool ZLiveMap::is_marked() const {
42 return Atomic::load_acquire(&_seqnum) == ZGlobalSeqNum;
43 }
44
45 inline uint32_t ZLiveMap::live_objects() const {
46 assert(ZGlobalPhase != ZPhaseMark, "Invalid phase");
47 return _live_objects;
48 }
49
50 inline size_t ZLiveMap::live_bytes() const {
51 assert(ZGlobalPhase != ZPhaseMark, "Invalid phase");
52 return _live_bytes;
53 }
|
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 #ifndef SHARE_GC_Z_ZLIVEMAP_INLINE_HPP
25 #define SHARE_GC_Z_ZLIVEMAP_INLINE_HPP
26
27 #include "gc/z/zBitMap.inline.hpp"
28 #include "gc/z/zLiveMap.hpp"
29 #include "gc/z/zMark.hpp"
30 #include "gc/z/zOop.inline.hpp"
31 #include "gc/z/zUtils.inline.hpp"
32 #include "runtime/atomic.hpp"
33 #include "utilities/bitMap.inline.hpp"
34 #include "utilities/debug.hpp"
35
36 inline void ZLiveMap::reset() {
37 _seqnum = 0;
38 }
39
40 inline bool ZLiveMap::is_marked() const {
41 return Atomic::load_acquire(&_seqnum) == ZGlobalSeqNum;
42 }
43
44 inline uint32_t ZLiveMap::live_objects() const {
45 assert(ZGlobalPhase != ZPhaseMark, "Invalid phase");
46 return _live_objects;
47 }
48
49 inline size_t ZLiveMap::live_bytes() const {
50 assert(ZGlobalPhase != ZPhaseMark, "Invalid phase");
51 return _live_bytes;
52 }
|