< prev index next >
src/share/vm/gc_implementation/g1/g1BlockOffsetTable.inline.hpp
Print this page
rev 8237 : 8079330: Circular dependency between G1CollectedHeap and G1BlockOffsetSharedArray
Reviewed-by:
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, Oracle and/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.
@@ -24,11 +24,10 @@
#ifndef SHARE_VM_GC_IMPLEMENTATION_G1_G1BLOCKOFFSETTABLE_INLINE_HPP
#define SHARE_VM_GC_IMPLEMENTATION_G1_G1BLOCKOFFSETTABLE_INLINE_HPP
#include "gc_implementation/g1/g1BlockOffsetTable.hpp"
-#include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
#include "gc_implementation/g1/heapRegion.inline.hpp"
#include "memory/space.hpp"
inline HeapWord* G1BlockOffsetTable::block_start(const void* addr) {
if (addr >= _bottom && addr < _end) {
@@ -45,21 +44,10 @@
} else {
return NULL;
}
}
-#define check_index(index, msg) \
- assert((index) < (_reserved.word_size() >> LogN_words), \
- err_msg("%s - index: "SIZE_FORMAT", _vs.committed_size: "SIZE_FORMAT, \
- msg, (index), (_reserved.word_size() >> LogN_words))); \
- assert(G1CollectedHeap::heap()->is_in_exact(address_for_index_raw(index)), \
- err_msg("Index "SIZE_FORMAT" corresponding to "PTR_FORMAT \
- " (%u) is not in committed area.", \
- (index), \
- p2i(address_for_index_raw(index)), \
- G1CollectedHeap::heap()->addr_to_region(address_for_index_raw(index))));
-
u_char G1BlockOffsetSharedArray::offset_array(size_t index) const {
check_index(index, "index out of range");
return _offset_array[index];
}
@@ -117,12 +105,10 @@
PTR_FORMAT,
p2i(result), p2i(_reserved.start()), p2i(_reserved.end())));
return result;
}
-#undef check_index
-
inline size_t
G1BlockOffsetArray::block_size(const HeapWord* p) const {
return gsp()->block_size(p);
}
< prev index next >