--- old/src/hotspot/share/prims/jvmtiTagMap.cpp 2018-06-08 19:45:35.758792677 +0200 +++ new/src/hotspot/share/prims/jvmtiTagMap.cpp 2018-06-08 19:45:35.495781266 +0200 @@ -59,6 +59,9 @@ #include "runtime/vmThread.hpp" #include "runtime/vm_operations.hpp" #include "utilities/macros.hpp" +#if INCLUDE_ZGC +#include "gc/z/zGlobals.hpp" +#endif // JvmtiTagHashmapEntry // @@ -178,6 +181,8 @@ // 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(key));