--- a/src/hotspot/share/gc/z/zGranuleMap.inline.hpp Mon Oct 28 11:21:23 2019 +0100
+++ b/src/hotspot/share/gc/z/zGranuleMap.inline.hpp Mon Oct 28 11:23:28 2019 +0100
@@ -24,7 +24,6 @@
#ifndef SHARE_GC_Z_ZGRANULEMAP_INLINE_HPP
#define SHARE_GC_Z_ZGRANULEMAP_INLINE_HPP
-#include "gc/z/zAddress.inline.hpp"
#include "gc/z/zGlobals.hpp"
#include "gc/z/zGranuleMap.hpp"
#include "memory/allocation.inline.hpp"
@@ -44,32 +43,30 @@
}
template <typename T>
-inline size_t ZGranuleMap<T>::index_for_addr(uintptr_t addr) const {
- assert(!ZAddress::is_null(addr), "Invalid address");
-
- const size_t index = ZAddress::offset(addr) >> ZGranuleSizeShift;
+inline size_t ZGranuleMap<T>::index_for_offset(uintptr_t offset) const {
+ const size_t index = offset >> ZGranuleSizeShift;
assert(index < _size, "Invalid index");
return index;
}
template <typename T>
-inline T ZGranuleMap<T>::get(uintptr_t addr) const {
- const size_t index = index_for_addr(addr);
+inline T ZGranuleMap<T>::get(uintptr_t offset) const {
+ const size_t index = index_for_offset(offset);
return _map[index];
}
template <typename T>
-inline void ZGranuleMap<T>::put(uintptr_t addr, T value) {
- const size_t index = index_for_addr(addr);
+inline void ZGranuleMap<T>::put(uintptr_t offset, T value) {
+ const size_t index = index_for_offset(offset);
_map[index] = value;
}
template <typename T>
-inline void ZGranuleMap<T>::put(uintptr_t addr, size_t size, T value) {
+inline void ZGranuleMap<T>::put(uintptr_t offset, size_t size, T value) {
assert(is_aligned(size, ZGranuleSize), "Misaligned");
- const size_t start_index = index_for_addr(addr);
+ const size_t start_index = index_for_offset(offset);
const size_t end_index = start_index + (size >> ZGranuleSizeShift);
for (size_t index = start_index; index < end_index; index++) {
_map[index] = value;