< prev index next >
src/hotspot/share/prims/jvmtiTagMap.cpp
Print this page
*** 57,66 ****
--- 57,69 ----
#include "runtime/threadSMR.hpp"
#include "runtime/vframe.hpp"
#include "runtime/vmThread.hpp"
#include "runtime/vm_operations.hpp"
#include "utilities/macros.hpp"
+ #if INCLUDE_ZGC
+ #include "gc/z/zGlobals.hpp"
+ #endif
// JvmtiTagHashmapEntry
//
// Each entry encapsulates a reference to the tagged object
// and the tag value. In addition an entry includes a next pointer which
*** 176,185 ****
--- 179,190 ----
}
}
// hash a given key (oop) with the specified size
static unsigned int hash(oop key, int size) {
+ ZGC_ONLY(assert(ZAddressMetadataShift >= sizeof(unsigned int) * BitsPerByte, "cast removes the metadata bits");)
+
// shift right to get better distribution (as these bits will be zero
// with aligned addresses)
unsigned int addr = (unsigned int)(cast_from_oop<intptr_t>(key));
#ifdef _LP64
return (addr >> 3) % size;
< prev index next >