changeset 56029:947252a54b98

8229838: Rename markOop files to markWord Reviewed-by: dholmes, rehn
author stefank
date Mon, 19 Aug 2019 11:30:03 +0200
parents e62f402c337f
children 9bb28ccc6106
files src/hotspot/cpu/aarch64/c1_MacroAssembler_aarch64.cpp src/hotspot/cpu/aarch64/frame_aarch64.cpp src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp src/hotspot/cpu/arm/c1_MacroAssembler_arm.cpp src/hotspot/cpu/arm/frame_arm.cpp src/hotspot/cpu/arm/interp_masm_arm.cpp src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.cpp src/hotspot/cpu/ppc/frame_ppc.cpp src/hotspot/cpu/s390/c1_MacroAssembler_s390.cpp src/hotspot/cpu/s390/frame_s390.cpp src/hotspot/cpu/s390/interp_masm_s390.cpp src/hotspot/cpu/sparc/c1_MacroAssembler_sparc.cpp src/hotspot/cpu/sparc/frame_sparc.cpp src/hotspot/cpu/sparc/interp_masm_sparc.cpp src/hotspot/cpu/sparc/sharedRuntime_sparc.cpp src/hotspot/cpu/x86/c1_MacroAssembler_x86.cpp src/hotspot/cpu/x86/frame_x86.cpp src/hotspot/cpu/x86/interp_masm_x86.cpp src/hotspot/cpu/x86/sharedRuntime_x86.cpp src/hotspot/cpu/zero/frame_zero.cpp src/hotspot/share/adlc/main.cpp src/hotspot/share/classfile/altHashing.cpp src/hotspot/share/gc/cms/freeChunk.hpp src/hotspot/share/gc/cms/promotionInfo.cpp src/hotspot/share/gc/g1/g1FullGCMarker.hpp src/hotspot/share/gc/g1/g1OopClosures.hpp src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.cpp src/hotspot/share/gc/serial/markSweep.hpp src/hotspot/share/gc/serial/markSweep.inline.hpp src/hotspot/share/gc/shared/ageTable.hpp src/hotspot/share/gc/shared/space.hpp src/hotspot/share/gc/shenandoah/shenandoahForwarding.inline.hpp src/hotspot/share/jfr/leakprofiler/chains/objectSampleMarker.hpp src/hotspot/share/jfr/leakprofiler/chains/pathToGcRootsOperation.cpp src/hotspot/share/jfr/leakprofiler/checkpoint/eventEmitter.cpp src/hotspot/share/jfr/leakprofiler/checkpoint/rootResolver.cpp src/hotspot/share/jfr/leakprofiler/utilities/saveRestore.hpp src/hotspot/share/memory/virtualspace.cpp src/hotspot/share/oops/klass.hpp src/hotspot/share/oops/klass.inline.hpp src/hotspot/share/oops/markOop.cpp src/hotspot/share/oops/markOop.hpp src/hotspot/share/oops/markOop.inline.hpp src/hotspot/share/oops/markWord.cpp src/hotspot/share/oops/markWord.hpp src/hotspot/share/oops/markWord.inline.hpp src/hotspot/share/oops/oop.hpp src/hotspot/share/oops/oop.inline.hpp src/hotspot/share/opto/library_call.cpp src/hotspot/share/prims/jni.cpp src/hotspot/share/runtime/basicLock.hpp src/hotspot/share/runtime/biasedLocking.cpp src/hotspot/share/runtime/flags/jvmFlagRangeList.cpp src/hotspot/share/runtime/frame.cpp src/hotspot/share/runtime/objectMonitor.cpp src/hotspot/share/runtime/objectMonitor.hpp src/hotspot/share/runtime/synchronizer.cpp src/hotspot/share/runtime/synchronizer.hpp src/hotspot/share/runtime/vmStructs.cpp src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/MonitorSnippets.java test/hotspot/jtreg/serviceability/sa/ClhsdbLongConstant.java
diffstat 61 files changed, 667 insertions(+), 667 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/cpu/aarch64/c1_MacroAssembler_aarch64.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/cpu/aarch64/c1_MacroAssembler_aarch64.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -30,7 +30,7 @@
 #include "gc/shared/collectedHeap.hpp"
 #include "interpreter/interpreter.hpp"
 #include "oops/arrayOop.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "runtime/basicLock.hpp"
 #include "runtime/biasedLocking.hpp"
 #include "runtime/os.hpp"
--- a/src/hotspot/cpu/aarch64/frame_aarch64.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/cpu/aarch64/frame_aarch64.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -27,7 +27,7 @@
 #include "interpreter/interpreter.hpp"
 #include "memory/resourceArea.hpp"
 #include "memory/universe.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "oops/method.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/methodHandles.hpp"
--- a/src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/cpu/aarch64/interp_masm_aarch64.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -32,7 +32,7 @@
 #include "interpreter/interpreterRuntime.hpp"
 #include "logging/log.hpp"
 #include "oops/arrayOop.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "oops/method.hpp"
 #include "oops/methodData.hpp"
 #include "prims/jvmtiExport.hpp"
--- a/src/hotspot/cpu/arm/c1_MacroAssembler_arm.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/cpu/arm/c1_MacroAssembler_arm.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -29,7 +29,7 @@
 #include "gc/shared/collectedHeap.hpp"
 #include "interpreter/interpreter.hpp"
 #include "oops/arrayOop.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "runtime/basicLock.hpp"
 #include "runtime/biasedLocking.hpp"
 #include "runtime/os.hpp"
--- a/src/hotspot/cpu/arm/frame_arm.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/cpu/arm/frame_arm.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -26,7 +26,7 @@
 #include "interpreter/interpreter.hpp"
 #include "memory/resourceArea.hpp"
 #include "memory/universe.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "oops/method.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/frame.inline.hpp"
--- a/src/hotspot/cpu/arm/interp_masm_arm.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/cpu/arm/interp_masm_arm.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -34,7 +34,7 @@
 #include "interpreter/interpreterRuntime.hpp"
 #include "logging/log.hpp"
 #include "oops/arrayOop.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "oops/method.hpp"
 #include "oops/methodData.hpp"
 #include "prims/jvmtiExport.hpp"
--- a/src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -31,7 +31,7 @@
 #include "gc/shared/collectedHeap.hpp"
 #include "interpreter/interpreter.hpp"
 #include "oops/arrayOop.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "runtime/basicLock.hpp"
 #include "runtime/biasedLocking.hpp"
 #include "runtime/os.hpp"
--- a/src/hotspot/cpu/ppc/frame_ppc.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/cpu/ppc/frame_ppc.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -27,7 +27,7 @@
 #include "interpreter/interpreter.hpp"
 #include "memory/resourceArea.hpp"
 #include "memory/universe.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "oops/method.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/frame.inline.hpp"
--- a/src/hotspot/cpu/s390/c1_MacroAssembler_s390.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/cpu/s390/c1_MacroAssembler_s390.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -31,7 +31,7 @@
 #include "gc/shared/collectedHeap.hpp"
 #include "interpreter/interpreter.hpp"
 #include "oops/arrayOop.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "runtime/basicLock.hpp"
 #include "runtime/biasedLocking.hpp"
 #include "runtime/os.hpp"
--- a/src/hotspot/cpu/s390/frame_s390.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/cpu/s390/frame_s390.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -27,7 +27,7 @@
 #include "interpreter/interpreter.hpp"
 #include "memory/resourceArea.hpp"
 #include "memory/universe.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/frame.inline.hpp"
 #include "runtime/handles.inline.hpp"
--- a/src/hotspot/cpu/s390/interp_masm_s390.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/cpu/s390/interp_masm_s390.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -33,7 +33,7 @@
 #include "interpreter/interpreter.hpp"
 #include "interpreter/interpreterRuntime.hpp"
 #include "oops/arrayOop.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "prims/jvmtiExport.hpp"
 #include "prims/jvmtiThreadState.hpp"
 #include "runtime/basicLock.hpp"
--- a/src/hotspot/cpu/sparc/c1_MacroAssembler_sparc.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/cpu/sparc/c1_MacroAssembler_sparc.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -30,7 +30,7 @@
 #include "gc/shared/collectedHeap.hpp"
 #include "interpreter/interpreter.hpp"
 #include "oops/arrayOop.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "runtime/basicLock.hpp"
 #include "runtime/biasedLocking.hpp"
 #include "runtime/os.hpp"
--- a/src/hotspot/cpu/sparc/frame_sparc.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/cpu/sparc/frame_sparc.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -27,7 +27,7 @@
 #include "interpreter/interpreter.hpp"
 #include "memory/resourceArea.hpp"
 #include "memory/universe.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "oops/method.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/methodHandles.hpp"
--- a/src/hotspot/cpu/sparc/interp_masm_sparc.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/cpu/sparc/interp_masm_sparc.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -29,7 +29,7 @@
 #include "interpreter/interpreterRuntime.hpp"
 #include "logging/log.hpp"
 #include "oops/arrayOop.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "oops/methodData.hpp"
 #include "oops/method.hpp"
 #include "oops/methodCounters.hpp"
--- a/src/hotspot/cpu/sparc/sharedRuntime_sparc.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/cpu/sparc/sharedRuntime_sparc.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -1833,7 +1833,7 @@
     // Read the header and build a mask to get its hash field.  Give up if the object is not unlocked.
     // We depend on hash_mask being at most 32 bits and avoid the use of
     // hash_mask_in_place because it could be larger than 32 bits in a 64-bit
-    // vm: see markOop.hpp.
+    // vm: see markWord.hpp.
     __ ld_ptr(obj_reg, oopDesc::mark_offset_in_bytes(), header);
     __ sethi(markWord::hash_mask, mask);
     __ btst(markWord::unlocked_value, header);
--- a/src/hotspot/cpu/x86/c1_MacroAssembler_x86.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/cpu/x86/c1_MacroAssembler_x86.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -31,7 +31,7 @@
 #include "gc/shared/collectedHeap.hpp"
 #include "interpreter/interpreter.hpp"
 #include "oops/arrayOop.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "runtime/basicLock.hpp"
 #include "runtime/biasedLocking.hpp"
 #include "runtime/os.hpp"
--- a/src/hotspot/cpu/x86/frame_x86.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/cpu/x86/frame_x86.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -26,7 +26,7 @@
 #include "interpreter/interpreter.hpp"
 #include "memory/resourceArea.hpp"
 #include "memory/universe.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "oops/method.hpp"
 #include "oops/oop.inline.hpp"
 #include "prims/methodHandles.hpp"
--- a/src/hotspot/cpu/x86/interp_masm_x86.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/cpu/x86/interp_masm_x86.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -28,7 +28,7 @@
 #include "interpreter/interpreterRuntime.hpp"
 #include "logging/log.hpp"
 #include "oops/arrayOop.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "oops/methodData.hpp"
 #include "oops/method.hpp"
 #include "prims/jvmtiExport.hpp"
--- a/src/hotspot/cpu/x86/sharedRuntime_x86.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/cpu/x86/sharedRuntime_x86.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -72,7 +72,7 @@
 #ifdef _LP64
   // Read the header and build a mask to get its hash field.
   // Depend on hash_mask being at most 32 bits and avoid the use of hash_mask_in_place
-  // because it could be larger than 32 bits in a 64-bit vm. See markOop.hpp.
+  // because it could be larger than 32 bits in a 64-bit vm. See markWord.hpp.
   __ shrptr(result, markWord::hash_shift);
   __ andptr(result, markWord::hash_mask);
 #else
--- a/src/hotspot/cpu/zero/frame_zero.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/cpu/zero/frame_zero.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -29,7 +29,7 @@
 #include "interpreter/interpreterRuntime.hpp"
 #include "memory/resourceArea.hpp"
 #include "memory/universe.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "oops/method.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/frame.inline.hpp"
--- a/src/hotspot/share/adlc/main.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/adlc/main.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -218,7 +218,7 @@
   AD.addInclude(AD._CPP_file, "gc/shared/collectedHeap.inline.hpp");
   AD.addInclude(AD._CPP_file, "oops/compiledICHolder.hpp");
   AD.addInclude(AD._CPP_file, "oops/compressedOops.hpp");
-  AD.addInclude(AD._CPP_file, "oops/markOop.hpp");
+  AD.addInclude(AD._CPP_file, "oops/markWord.hpp");
   AD.addInclude(AD._CPP_file, "oops/method.hpp");
   AD.addInclude(AD._CPP_file, "oops/oop.inline.hpp");
   AD.addInclude(AD._CPP_file, "opto/cfgnode.hpp");
--- a/src/hotspot/share/classfile/altHashing.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/classfile/altHashing.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -26,7 +26,7 @@
 #include "classfile/altHashing.hpp"
 #include "classfile/symbolTable.hpp"
 #include "classfile/systemDictionary.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/thread.hpp"
 
--- a/src/hotspot/share/gc/cms/freeChunk.hpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/gc/cms/freeChunk.hpp	Mon Aug 19 11:30:03 2019 +0200
@@ -26,7 +26,7 @@
 #define SHARE_GC_CMS_FREECHUNK_HPP
 
 #include "memory/memRegion.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "runtime/mutex.hpp"
 #include "runtime/orderAccess.hpp"
 #include "utilities/debug.hpp"
--- a/src/hotspot/share/gc/cms/promotionInfo.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/gc/cms/promotionInfo.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -27,7 +27,7 @@
 #include "gc/cms/promotionInfo.hpp"
 #include "gc/shared/genOopClosures.hpp"
 #include "oops/compressedOops.inline.hpp"
-#include "oops/markOop.inline.hpp"
+#include "oops/markWord.inline.hpp"
 #include "oops/oop.hpp"
 
 /////////////////////////////////////////////////////////////////////////
--- a/src/hotspot/share/gc/g1/g1FullGCMarker.hpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/gc/g1/g1FullGCMarker.hpp	Mon Aug 19 11:30:03 2019 +0200
@@ -29,7 +29,7 @@
 #include "gc/shared/preservedMarks.hpp"
 #include "gc/shared/taskqueue.hpp"
 #include "memory/iterator.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "oops/oop.hpp"
 #include "runtime/timer.hpp"
 #include "utilities/chunkedList.hpp"
--- a/src/hotspot/share/gc/g1/g1OopClosures.hpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/gc/g1/g1OopClosures.hpp	Mon Aug 19 11:30:03 2019 +0200
@@ -27,7 +27,7 @@
 
 #include "gc/g1/g1HeapRegionAttr.hpp"
 #include "memory/iterator.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 
 class HeapRegion;
 class G1CollectedHeap;
--- a/src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/gc/g1/g1PageBasedVirtualSpace.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -25,7 +25,7 @@
 #include "precompiled.hpp"
 #include "gc/g1/g1PageBasedVirtualSpace.hpp"
 #include "gc/shared/workgroup.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/atomic.hpp"
 #include "runtime/os.inline.hpp"
--- a/src/hotspot/share/gc/serial/markSweep.hpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/gc/serial/markSweep.hpp	Mon Aug 19 11:30:03 2019 +0200
@@ -29,7 +29,7 @@
 #include "gc/shared/genOopClosures.hpp"
 #include "gc/shared/taskqueue.hpp"
 #include "memory/iterator.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "oops/oop.hpp"
 #include "runtime/timer.hpp"
 #include "utilities/growableArray.hpp"
--- a/src/hotspot/share/gc/serial/markSweep.inline.hpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/gc/serial/markSweep.inline.hpp	Mon Aug 19 11:30:03 2019 +0200
@@ -28,7 +28,7 @@
 #include "classfile/classLoaderData.inline.hpp"
 #include "gc/serial/markSweep.hpp"
 #include "memory/universe.hpp"
-#include "oops/markOop.inline.hpp"
+#include "oops/markWord.inline.hpp"
 #include "oops/access.inline.hpp"
 #include "oops/compressedOops.inline.hpp"
 #include "oops/oop.inline.hpp"
--- a/src/hotspot/share/gc/shared/ageTable.hpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/gc/shared/ageTable.hpp	Mon Aug 19 11:30:03 2019 +0200
@@ -25,7 +25,7 @@
 #ifndef SHARE_GC_SHARED_AGETABLE_HPP
 #define SHARE_GC_SHARED_AGETABLE_HPP
 
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "oops/oop.hpp"
 #include "runtime/perfData.hpp"
 
--- a/src/hotspot/share/gc/shared/space.hpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/gc/shared/space.hpp	Mon Aug 19 11:30:03 2019 +0200
@@ -31,7 +31,7 @@
 #include "memory/allocation.hpp"
 #include "memory/iterator.hpp"
 #include "memory/memRegion.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "runtime/mutexLocker.hpp"
 #include "utilities/align.hpp"
 #include "utilities/macros.hpp"
--- a/src/hotspot/share/gc/shenandoah/shenandoahForwarding.inline.hpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/gc/shenandoah/shenandoahForwarding.inline.hpp	Mon Aug 19 11:30:03 2019 +0200
@@ -26,7 +26,7 @@
 
 #include "gc/shenandoah/shenandoahAsserts.hpp"
 #include "gc/shenandoah/shenandoahForwarding.hpp"
-#include "oops/markOop.inline.hpp"
+#include "oops/markWord.inline.hpp"
 #include "runtime/atomic.hpp"
 
 inline HeapWord* ShenandoahForwarding::get_forwardee_raw(oop obj) {
--- a/src/hotspot/share/jfr/leakprofiler/chains/objectSampleMarker.hpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/jfr/leakprofiler/chains/objectSampleMarker.hpp	Mon Aug 19 11:30:03 2019 +0200
@@ -26,7 +26,7 @@
 #define SHARE_JFR_LEAKPROFILER_CHAINS_OBJECTSAMPLEMARKER_HPP
 
 #include "memory/allocation.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "utilities/growableArray.hpp"
 //
 // This class will save the original mark oop of a object sample object.
--- a/src/hotspot/share/jfr/leakprofiler/chains/pathToGcRootsOperation.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/jfr/leakprofiler/chains/pathToGcRootsOperation.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -43,7 +43,7 @@
 #include "jfr/leakprofiler/utilities/granularTimer.hpp"
 #include "logging/log.hpp"
 #include "memory/universe.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/safepoint.hpp"
 #include "utilities/globalDefinitions.hpp"
--- a/src/hotspot/share/jfr/leakprofiler/checkpoint/eventEmitter.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/jfr/leakprofiler/checkpoint/eventEmitter.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -32,7 +32,7 @@
 #include "jfr/leakprofiler/sampling/objectSampler.hpp"
 #include "logging/log.hpp"
 #include "memory/resourceArea.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/thread.inline.hpp"
 #include "runtime/vmThread.hpp"
--- a/src/hotspot/share/jfr/leakprofiler/checkpoint/rootResolver.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/jfr/leakprofiler/checkpoint/rootResolver.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -32,7 +32,7 @@
 #include "memory/iterator.hpp"
 #include "memory/universe.hpp"
 #include "oops/klass.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "oops/oop.hpp"
 #include "prims/jvmtiThreadState.hpp"
 #include "runtime/frame.inline.hpp"
--- a/src/hotspot/share/jfr/leakprofiler/utilities/saveRestore.hpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/jfr/leakprofiler/utilities/saveRestore.hpp	Mon Aug 19 11:30:03 2019 +0200
@@ -27,7 +27,7 @@
 
 #include "memory/allocation.hpp"
 #include "memory/iterator.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "utilities/growableArray.hpp"
 
 template <typename T, typename Impl>
--- a/src/hotspot/share/memory/virtualspace.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/memory/virtualspace.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -27,7 +27,7 @@
 #include "memory/resourceArea.hpp"
 #include "memory/virtualspace.hpp"
 #include "oops/compressedOops.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/os.inline.hpp"
 #include "services/memTracker.hpp"
--- a/src/hotspot/share/oops/klass.hpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/oops/klass.hpp	Mon Aug 19 11:30:03 2019 +0200
@@ -28,7 +28,7 @@
 #include "classfile/classLoaderData.hpp"
 #include "memory/iterator.hpp"
 #include "memory/memRegion.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "oops/metadata.hpp"
 #include "oops/oop.hpp"
 #include "oops/oopHandle.hpp"
--- a/src/hotspot/share/oops/klass.inline.hpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/oops/klass.inline.hpp	Mon Aug 19 11:30:03 2019 +0200
@@ -27,7 +27,7 @@
 
 #include "oops/compressedOops.hpp"
 #include "oops/klass.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 
 inline void Klass::set_prototype_header(markWord header) {
   assert(!header.has_bias_pattern() || is_instance_klass(), "biased locking currently only supported for Java instances");
--- a/src/hotspot/share/oops/markOop.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 1997, 2019, 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.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#include "precompiled.hpp"
-#include "oops/markOop.hpp"
-#include "runtime/thread.inline.hpp"
-#include "runtime/objectMonitor.hpp"
-
-void markWord::print_on(outputStream* st) const {
-  if (is_marked()) {  // last bits = 11
-    st->print(" marked(" INTPTR_FORMAT ")", value());
-  } else if (has_monitor()) {  // last bits = 10
-    // have to check has_monitor() before is_locked()
-    st->print(" monitor(" INTPTR_FORMAT ")=", value());
-    ObjectMonitor* mon = monitor();
-    if (mon == NULL) {
-      st->print("NULL (this should never be seen!)");
-    } else {
-      mon->print_on(st);
-    }
-  } else if (is_locked()) {  // last bits != 01 => 00
-    // thin locked
-    st->print(" locked(" INTPTR_FORMAT ")", value());
-  } else {
-    st->print(" mark(");
-    // Biased bit is 3rd rightmost bit
-    if (is_neutral()) {   // last bits = 001
-      st->print("is_neutral");
-      if (has_no_hash()) {
-        st->print(" no_hash");
-      } else {
-        st->print(" hash=" INTPTR_FORMAT, hash());
-      }
-    } else if (has_bias_pattern()) {  // last bits = 101
-      st->print("is_biased");
-      JavaThread* jt = biased_locker();
-      st->print(" biased_locker=" INTPTR_FORMAT " epoch=%d", p2i(jt), bias_epoch());
-    } else {
-      st->print("??");
-    }
-    st->print(" age=%d)", age());
-  }
-}
--- a/src/hotspot/share/oops/markOop.hpp	Tue Aug 20 11:15:23 2019 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,433 +0,0 @@
-/*
- * Copyright (c) 1997, 2019, 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.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#ifndef SHARE_OOPS_MARKOOP_HPP
-#define SHARE_OOPS_MARKOOP_HPP
-
-#include "metaprogramming/integralConstant.hpp"
-#include "metaprogramming/primitiveConversions.hpp"
-#include "oops/oopsHierarchy.hpp"
-
-// The markWord describes the header of an object.
-//
-// Bit-format of an object header (most significant first, big endian layout below):
-//
-//  32 bits:
-//  --------
-//             hash:25 ------------>| age:4    biased_lock:1 lock:2 (normal object)
-//             JavaThread*:23 epoch:2 age:4    biased_lock:1 lock:2 (biased object)
-//             size:32 ------------------------------------------>| (CMS free block)
-//             PromotedObject*:29 ---------->| promo_bits:3 ----->| (CMS promoted object)
-//
-//  64 bits:
-//  --------
-//  unused:25 hash:31 -->| unused:1   age:4    biased_lock:1 lock:2 (normal object)
-//  JavaThread*:54 epoch:2 unused:1   age:4    biased_lock:1 lock:2 (biased object)
-//  PromotedObject*:61 --------------------->| promo_bits:3 ----->| (CMS promoted object)
-//  size:64 ----------------------------------------------------->| (CMS free block)
-//
-//  unused:25 hash:31 -->| cms_free:1 age:4    biased_lock:1 lock:2 (COOPs && normal object)
-//  JavaThread*:54 epoch:2 cms_free:1 age:4    biased_lock:1 lock:2 (COOPs && biased object)
-//  narrowOop:32 unused:24 cms_free:1 unused:4 promo_bits:3 ----->| (COOPs && CMS promoted object)
-//  unused:21 size:35 -->| cms_free:1 unused:7 ------------------>| (COOPs && CMS free block)
-//
-//  - hash contains the identity hash value: largest value is
-//    31 bits, see os::random().  Also, 64-bit vm's require
-//    a hash value no bigger than 32 bits because they will not
-//    properly generate a mask larger than that: see library_call.cpp
-//    and c1_CodePatterns_sparc.cpp.
-//
-//  - the biased lock pattern is used to bias a lock toward a given
-//    thread. When this pattern is set in the low three bits, the lock
-//    is either biased toward a given thread or "anonymously" biased,
-//    indicating that it is possible for it to be biased. When the
-//    lock is biased toward a given thread, locking and unlocking can
-//    be performed by that thread without using atomic operations.
-//    When a lock's bias is revoked, it reverts back to the normal
-//    locking scheme described below.
-//
-//    Note that we are overloading the meaning of the "unlocked" state
-//    of the header. Because we steal a bit from the age we can
-//    guarantee that the bias pattern will never be seen for a truly
-//    unlocked object.
-//
-//    Note also that the biased state contains the age bits normally
-//    contained in the object header. Large increases in scavenge
-//    times were seen when these bits were absent and an arbitrary age
-//    assigned to all biased objects, because they tended to consume a
-//    significant fraction of the eden semispaces and were not
-//    promoted promptly, causing an increase in the amount of copying
-//    performed. The runtime system aligns all JavaThread* pointers to
-//    a very large value (currently 128 bytes (32bVM) or 256 bytes (64bVM))
-//    to make room for the age bits & the epoch bits (used in support of
-//    biased locking), and for the CMS "freeness" bit in the 64bVM (+COOPs).
-//
-//    [JavaThread* | epoch | age | 1 | 01]       lock is biased toward given thread
-//    [0           | epoch | age | 1 | 01]       lock is anonymously biased
-//
-//  - the two lock bits are used to describe three states: locked/unlocked and monitor.
-//
-//    [ptr             | 00]  locked             ptr points to real header on stack
-//    [header      | 0 | 01]  unlocked           regular object header
-//    [ptr             | 10]  monitor            inflated lock (header is wapped out)
-//    [ptr             | 11]  marked             used by markSweep to mark an object
-//                                               not valid at any other time
-//
-//    We assume that stack/thread pointers have the lowest two bits cleared.
-
-class BasicLock;
-class ObjectMonitor;
-class JavaThread;
-
-class markWord {
- private:
-  uintptr_t _value;
-
- public:
-  explicit markWord(uintptr_t value) : _value(value) {}
-
-  markWord() { /* uninitialized */}
-
-  // It is critical for performance that this class be trivially
-  // destructable, copyable, and assignable.
-
-  static markWord from_pointer(void* ptr) {
-    return markWord((uintptr_t)ptr);
-  }
-  void* to_pointer() const {
-    return (void*)_value;
-  }
-
-  bool operator==(const markWord& other) const {
-    return _value == other._value;
-  }
-  bool operator!=(const markWord& other) const {
-    return !operator==(other);
-  }
-
-  // Conversion
-  uintptr_t value() const { return _value; }
-
-  // Constants
-  enum { age_bits                 = 4,
-         lock_bits                = 2,
-         biased_lock_bits         = 1,
-         max_hash_bits            = BitsPerWord - age_bits - lock_bits - biased_lock_bits,
-         hash_bits                = max_hash_bits > 31 ? 31 : max_hash_bits,
-         cms_bits                 = LP64_ONLY(1) NOT_LP64(0),
-         epoch_bits               = 2
-  };
-
-  // The biased locking code currently requires that the age bits be
-  // contiguous to the lock bits.
-  enum { lock_shift               = 0,
-         biased_lock_shift        = lock_bits,
-         age_shift                = lock_bits + biased_lock_bits,
-         cms_shift                = age_shift + age_bits,
-         hash_shift               = cms_shift + cms_bits,
-         epoch_shift              = hash_shift
-  };
-
-  enum { lock_mask                = right_n_bits(lock_bits),
-         lock_mask_in_place       = lock_mask << lock_shift,
-         biased_lock_mask         = right_n_bits(lock_bits + biased_lock_bits),
-         biased_lock_mask_in_place= biased_lock_mask << lock_shift,
-         biased_lock_bit_in_place = 1 << biased_lock_shift,
-         age_mask                 = right_n_bits(age_bits),
-         age_mask_in_place        = age_mask << age_shift,
-         epoch_mask               = right_n_bits(epoch_bits),
-         epoch_mask_in_place      = epoch_mask << epoch_shift,
-         cms_mask                 = right_n_bits(cms_bits),
-         cms_mask_in_place        = cms_mask << cms_shift
-  };
-
-  const static uintptr_t hash_mask = right_n_bits(hash_bits);
-  const static uintptr_t hash_mask_in_place = hash_mask << hash_shift;
-
-  // Alignment of JavaThread pointers encoded in object header required by biased locking
-  enum { biased_lock_alignment    = 2 << (epoch_shift + epoch_bits)
-  };
-
-  enum { locked_value             = 0,
-         unlocked_value           = 1,
-         monitor_value            = 2,
-         marked_value             = 3,
-         biased_lock_pattern      = 5
-  };
-
-  enum { no_hash                  = 0 };  // no hash value assigned
-
-  enum { no_hash_in_place         = (address_word)no_hash << hash_shift,
-         no_lock_in_place         = unlocked_value
-  };
-
-  enum { max_age                  = age_mask };
-
-  enum { max_bias_epoch           = epoch_mask };
-
-  // Creates a markWord with all bits set to zero.
-  static markWord zero() { return markWord(uintptr_t(0)); }
-
-  // Biased Locking accessors.
-  // These must be checked by all code which calls into the
-  // ObjectSynchronizer and other code. The biasing is not understood
-  // by the lower-level CAS-based locking code, although the runtime
-  // fixes up biased locks to be compatible with it when a bias is
-  // revoked.
-  bool has_bias_pattern() const {
-    return (mask_bits(value(), biased_lock_mask_in_place) == biased_lock_pattern);
-  }
-  JavaThread* biased_locker() const {
-    assert(has_bias_pattern(), "should not call this otherwise");
-    return (JavaThread*) ((intptr_t) (mask_bits(value(), ~(biased_lock_mask_in_place | age_mask_in_place | epoch_mask_in_place))));
-  }
-  // Indicates that the mark has the bias bit set but that it has not
-  // yet been biased toward a particular thread
-  bool is_biased_anonymously() const {
-    return (has_bias_pattern() && (biased_locker() == NULL));
-  }
-  // Indicates epoch in which this bias was acquired. If the epoch
-  // changes due to too many bias revocations occurring, the biases
-  // from the previous epochs are all considered invalid.
-  int bias_epoch() const {
-    assert(has_bias_pattern(), "should not call this otherwise");
-    return (mask_bits(value(), epoch_mask_in_place) >> epoch_shift);
-  }
-  markWord set_bias_epoch(int epoch) {
-    assert(has_bias_pattern(), "should not call this otherwise");
-    assert((epoch & (~epoch_mask)) == 0, "epoch overflow");
-    return markWord(mask_bits(value(), ~epoch_mask_in_place) | (epoch << epoch_shift));
-  }
-  markWord incr_bias_epoch() {
-    return set_bias_epoch((1 + bias_epoch()) & epoch_mask);
-  }
-  // Prototype mark for initialization
-  static markWord biased_locking_prototype() {
-    return markWord( biased_lock_pattern );
-  }
-
-  // lock accessors (note that these assume lock_shift == 0)
-  bool is_locked()   const {
-    return (mask_bits(value(), lock_mask_in_place) != unlocked_value);
-  }
-  bool is_unlocked() const {
-    return (mask_bits(value(), biased_lock_mask_in_place) == unlocked_value);
-  }
-  bool is_marked()   const {
-    return (mask_bits(value(), lock_mask_in_place) == marked_value);
-  }
-  bool is_neutral()  const { return (mask_bits(value(), biased_lock_mask_in_place) == unlocked_value); }
-
-  // Special temporary state of the markWord while being inflated.
-  // Code that looks at mark outside a lock need to take this into account.
-  bool is_being_inflated() const { return (value() == 0); }
-
-  // Distinguished markword value - used when inflating over
-  // an existing stacklock.  0 indicates the markword is "BUSY".
-  // Lockword mutators that use a LD...CAS idiom should always
-  // check for and avoid overwriting a 0 value installed by some
-  // other thread.  (They should spin or block instead.  The 0 value
-  // is transient and *should* be short-lived).
-  static markWord INFLATING() { return zero(); }    // inflate-in-progress
-
-  // Should this header be preserved during GC?
-  inline bool must_be_preserved(oop obj_containing_mark) const;
-  inline bool must_be_preserved_with_bias(oop obj_containing_mark) const;
-
-  // Should this header (including its age bits) be preserved in the
-  // case of a promotion failure during scavenge?
-  // Note that we special case this situation. We want to avoid
-  // calling BiasedLocking::preserve_marks()/restore_marks() (which
-  // decrease the number of mark words that need to be preserved
-  // during GC) during each scavenge. During scavenges in which there
-  // is no promotion failure, we actually don't need to call the above
-  // routines at all, since we don't mutate and re-initialize the
-  // marks of promoted objects using init_mark(). However, during
-  // scavenges which result in promotion failure, we do re-initialize
-  // the mark words of objects, meaning that we should have called
-  // these mark word preservation routines. Currently there's no good
-  // place in which to call them in any of the scavengers (although
-  // guarded by appropriate locks we could make one), but the
-  // observation is that promotion failures are quite rare and
-  // reducing the number of mark words preserved during them isn't a
-  // high priority.
-  inline bool must_be_preserved_for_promotion_failure(oop obj_containing_mark) const;
-  inline bool must_be_preserved_with_bias_for_promotion_failure(oop obj_containing_mark) const;
-
-  // Should this header be preserved during a scavenge where CMS is
-  // the old generation?
-  // (This is basically the same body as must_be_preserved_for_promotion_failure(),
-  // but takes the Klass* as argument instead)
-  inline bool must_be_preserved_for_cms_scavenge(Klass* klass_of_obj_containing_mark) const;
-  inline bool must_be_preserved_with_bias_for_cms_scavenge(Klass* klass_of_obj_containing_mark) const;
-
-  // WARNING: The following routines are used EXCLUSIVELY by
-  // synchronization functions. They are not really gc safe.
-  // They must get updated if markWord layout get changed.
-  markWord set_unlocked() const {
-    return markWord(value() | unlocked_value);
-  }
-  bool has_locker() const {
-    return ((value() & lock_mask_in_place) == locked_value);
-  }
-  BasicLock* locker() const {
-    assert(has_locker(), "check");
-    return (BasicLock*) value();
-  }
-  bool has_monitor() const {
-    return ((value() & monitor_value) != 0);
-  }
-  ObjectMonitor* monitor() const {
-    assert(has_monitor(), "check");
-    // Use xor instead of &~ to provide one extra tag-bit check.
-    return (ObjectMonitor*) (value() ^ monitor_value);
-  }
-  bool has_displaced_mark_helper() const {
-    return ((value() & unlocked_value) == 0);
-  }
-  markWord displaced_mark_helper() const {
-    assert(has_displaced_mark_helper(), "check");
-    intptr_t ptr = (value() & ~monitor_value);
-    return *(markWord*)ptr;
-  }
-  void set_displaced_mark_helper(markWord m) const {
-    assert(has_displaced_mark_helper(), "check");
-    intptr_t ptr = (value() & ~monitor_value);
-    ((markWord*)ptr)->_value = m._value;
-  }
-  markWord copy_set_hash(intptr_t hash) const {
-    intptr_t tmp = value() & (~hash_mask_in_place);
-    tmp |= ((hash & hash_mask) << hash_shift);
-    return markWord(tmp);
-  }
-  // it is only used to be stored into BasicLock as the
-  // indicator that the lock is using heavyweight monitor
-  static markWord unused_mark() {
-    return markWord(marked_value);
-  }
-  // the following two functions create the markWord to be
-  // stored into object header, it encodes monitor info
-  static markWord encode(BasicLock* lock) {
-    return from_pointer(lock);
-  }
-  static markWord encode(ObjectMonitor* monitor) {
-    intptr_t tmp = (intptr_t) monitor;
-    return markWord(tmp | monitor_value);
-  }
-  static markWord encode(JavaThread* thread, uint age, int bias_epoch) {
-    intptr_t tmp = (intptr_t) thread;
-    assert(UseBiasedLocking && ((tmp & (epoch_mask_in_place | age_mask_in_place | biased_lock_mask_in_place)) == 0), "misaligned JavaThread pointer");
-    assert(age <= max_age, "age too large");
-    assert(bias_epoch <= max_bias_epoch, "bias epoch too large");
-    return markWord(tmp | (bias_epoch << epoch_shift) | (age << age_shift) | biased_lock_pattern);
-  }
-
-  // used to encode pointers during GC
-  markWord clear_lock_bits() { return markWord(value() & ~lock_mask_in_place); }
-
-  // age operations
-  markWord set_marked()   { return markWord((value() & ~lock_mask_in_place) | marked_value); }
-  markWord set_unmarked() { return markWord((value() & ~lock_mask_in_place) | unlocked_value); }
-
-  uint     age()           const { return mask_bits(value() >> age_shift, age_mask); }
-  markWord set_age(uint v) const {
-    assert((v & ~age_mask) == 0, "shouldn't overflow age field");
-    return markWord((value() & ~age_mask_in_place) | (((uintptr_t)v & age_mask) << age_shift));
-  }
-  markWord incr_age()      const { return age() == max_age ? markWord(_value) : set_age(age() + 1); }
-
-  // hash operations
-  intptr_t hash() const {
-    return mask_bits(value() >> hash_shift, hash_mask);
-  }
-
-  bool has_no_hash() const {
-    return hash() == no_hash;
-  }
-
-  // Prototype mark for initialization
-  static markWord prototype() {
-    return markWord( no_hash_in_place | no_lock_in_place );
-  }
-
-  // Helper function for restoration of unmarked mark oops during GC
-  static inline markWord prototype_for_object(oop obj);
-
-  // Debugging
-  void print_on(outputStream* st) const;
-
-  // Prepare address of oop for placement into mark
-  inline static markWord encode_pointer_as_mark(void* p) { return from_pointer(p).set_marked(); }
-
-  // Recover address of oop from encoded form used in mark
-  inline void* decode_pointer() { if (UseBiasedLocking && has_bias_pattern()) return NULL; return (void*)clear_lock_bits().value(); }
-
-  // These markWords indicate cms free chunk blocks and not objects.
-  // In 64 bit, the markWord is set to distinguish them from oops.
-  // These are defined in 32 bit mode for vmStructs.
-  const static uintptr_t cms_free_chunk_pattern  = 0x1;
-
-  // Constants for the size field.
-  enum { size_shift                = cms_shift + cms_bits,
-         size_bits                 = 35    // need for compressed oops 32G
-       };
-  // These values are too big for Win64
-  const static uintptr_t size_mask = LP64_ONLY(right_n_bits(size_bits))
-                                     NOT_LP64(0);
-  const static uintptr_t size_mask_in_place =
-                                     (address_word)size_mask << size_shift;
-
-#ifdef _LP64
-  static markWord cms_free_prototype() {
-    return markWord(((intptr_t)prototype().value() & ~cms_mask_in_place) |
-                    ((cms_free_chunk_pattern & cms_mask) << cms_shift));
-  }
-  uintptr_t cms_encoding() const {
-    return mask_bits(value() >> cms_shift, cms_mask);
-  }
-  bool is_cms_free_chunk() const {
-    return is_neutral() &&
-           (cms_encoding() & cms_free_chunk_pattern) == cms_free_chunk_pattern;
-  }
-
-  size_t get_size() const       { return (size_t)(value() >> size_shift); }
-  static markWord set_size_and_free(size_t size) {
-    assert((size & ~size_mask) == 0, "shouldn't overflow size field");
-    return markWord(((intptr_t)cms_free_prototype().value() & ~size_mask_in_place) |
-                    (((intptr_t)size & size_mask) << size_shift));
-  }
-#endif // _LP64
-};
-
-// Support atomic operations.
-template<>
-struct PrimitiveConversions::Translate<markWord> : public TrueType {
-  typedef markWord Value;
-  typedef uintptr_t Decayed;
-
-  static Decayed decay(const Value& x) { return x.value(); }
-  static Value recover(Decayed x) { return Value(x); }
-};
-
-#endif // SHARE_OOPS_MARKOOP_HPP
--- a/src/hotspot/share/oops/markOop.inline.hpp	Tue Aug 20 11:15:23 2019 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 2006, 2019, 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.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#ifndef SHARE_OOPS_MARKOOP_INLINE_HPP
-#define SHARE_OOPS_MARKOOP_INLINE_HPP
-
-#include "oops/klass.hpp"
-#include "oops/markOop.hpp"
-#include "oops/oop.inline.hpp"
-#include "runtime/globals.hpp"
-
-// Should this header be preserved during GC (when biased locking is enabled)?
-inline bool markWord::must_be_preserved_with_bias(oop obj_containing_mark) const {
-  assert(UseBiasedLocking, "unexpected");
-  if (has_bias_pattern()) {
-    // Will reset bias at end of collection
-    // Mark words of biased and currently locked objects are preserved separately
-    return false;
-  }
-  markWord prototype_header = prototype_for_object(obj_containing_mark);
-  if (prototype_header.has_bias_pattern()) {
-    // Individual instance which has its bias revoked; must return
-    // true for correctness
-    return true;
-  }
-  return (!is_unlocked() || !has_no_hash());
-}
-
-// Should this header be preserved during GC?
-inline bool markWord::must_be_preserved(oop obj_containing_mark) const {
-  if (!UseBiasedLocking)
-    return (!is_unlocked() || !has_no_hash());
-  return must_be_preserved_with_bias(obj_containing_mark);
-}
-
-// Should this header be preserved in the case of a promotion failure
-// during scavenge (when biased locking is enabled)?
-inline bool markWord::must_be_preserved_with_bias_for_promotion_failure(oop obj_containing_mark) const {
-  assert(UseBiasedLocking, "unexpected");
-  // We don't explicitly save off the mark words of biased and
-  // currently-locked objects during scavenges, so if during a
-  // promotion failure we encounter either a biased mark word or a
-  // klass which still has a biasable prototype header, we have to
-  // preserve the mark word. This results in oversaving, but promotion
-  // failures are rare, and this avoids adding more complex logic to
-  // the scavengers to call new variants of
-  // BiasedLocking::preserve_marks() / restore_marks() in the middle
-  // of a scavenge when a promotion failure has first been detected.
-  if (has_bias_pattern() ||
-      prototype_for_object(obj_containing_mark).has_bias_pattern()) {
-    return true;
-  }
-  return (!is_unlocked() || !has_no_hash());
-}
-
-// Should this header be preserved in the case of a promotion failure
-// during scavenge?
-inline bool markWord::must_be_preserved_for_promotion_failure(oop obj_containing_mark) const {
-  if (!UseBiasedLocking)
-    return (!is_unlocked() || !has_no_hash());
-  return must_be_preserved_with_bias_for_promotion_failure(obj_containing_mark);
-}
-
-
-// Same as must_be_preserved_with_bias_for_promotion_failure() except that
-// it takes a Klass* argument, instead of the object of which this is the mark word.
-inline bool markWord::must_be_preserved_with_bias_for_cms_scavenge(Klass* klass_of_obj_containing_mark) const {
-  assert(UseBiasedLocking, "unexpected");
-  // CMS scavenges preserve mark words in similar fashion to promotion failures; see above
-  if (has_bias_pattern() ||
-      klass_of_obj_containing_mark->prototype_header().has_bias_pattern()) {
-    return true;
-  }
-  return (!is_unlocked() || !has_no_hash());
-}
-
-// Same as must_be_preserved_for_promotion_failure() except that
-// it takes a Klass* argument, instead of the object of which this is the mark word.
-inline bool markWord::must_be_preserved_for_cms_scavenge(Klass* klass_of_obj_containing_mark) const {
-  if (!UseBiasedLocking)
-    return (!is_unlocked() || !has_no_hash());
-  return must_be_preserved_with_bias_for_cms_scavenge(klass_of_obj_containing_mark);
-}
-
-inline markWord markWord::prototype_for_object(oop obj) {
-#ifdef ASSERT
-  markWord prototype_header = obj->klass()->prototype_header();
-  assert(prototype_header == prototype() || prototype_header.has_bias_pattern(), "corrupt prototype header");
-#endif
-  return obj->klass()->prototype_header();
-}
-
-#endif // SHARE_OOPS_MARKOOP_INLINE_HPP
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/hotspot/share/oops/markWord.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 1997, 2019, 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+#include "precompiled.hpp"
+#include "oops/markWord.hpp"
+#include "runtime/thread.inline.hpp"
+#include "runtime/objectMonitor.hpp"
+
+void markWord::print_on(outputStream* st) const {
+  if (is_marked()) {  // last bits = 11
+    st->print(" marked(" INTPTR_FORMAT ")", value());
+  } else if (has_monitor()) {  // last bits = 10
+    // have to check has_monitor() before is_locked()
+    st->print(" monitor(" INTPTR_FORMAT ")=", value());
+    ObjectMonitor* mon = monitor();
+    if (mon == NULL) {
+      st->print("NULL (this should never be seen!)");
+    } else {
+      mon->print_on(st);
+    }
+  } else if (is_locked()) {  // last bits != 01 => 00
+    // thin locked
+    st->print(" locked(" INTPTR_FORMAT ")", value());
+  } else {
+    st->print(" mark(");
+    // Biased bit is 3rd rightmost bit
+    if (is_neutral()) {   // last bits = 001
+      st->print("is_neutral");
+      if (has_no_hash()) {
+        st->print(" no_hash");
+      } else {
+        st->print(" hash=" INTPTR_FORMAT, hash());
+      }
+    } else if (has_bias_pattern()) {  // last bits = 101
+      st->print("is_biased");
+      JavaThread* jt = biased_locker();
+      st->print(" biased_locker=" INTPTR_FORMAT " epoch=%d", p2i(jt), bias_epoch());
+    } else {
+      st->print("??");
+    }
+    st->print(" age=%d)", age());
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/hotspot/share/oops/markWord.hpp	Mon Aug 19 11:30:03 2019 +0200
@@ -0,0 +1,433 @@
+/*
+ * Copyright (c) 1997, 2019, 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+#ifndef SHARE_OOPS_MARKWORD_HPP
+#define SHARE_OOPS_MARKWORD_HPP
+
+#include "metaprogramming/integralConstant.hpp"
+#include "metaprogramming/primitiveConversions.hpp"
+#include "oops/oopsHierarchy.hpp"
+
+// The markWord describes the header of an object.
+//
+// Bit-format of an object header (most significant first, big endian layout below):
+//
+//  32 bits:
+//  --------
+//             hash:25 ------------>| age:4    biased_lock:1 lock:2 (normal object)
+//             JavaThread*:23 epoch:2 age:4    biased_lock:1 lock:2 (biased object)
+//             size:32 ------------------------------------------>| (CMS free block)
+//             PromotedObject*:29 ---------->| promo_bits:3 ----->| (CMS promoted object)
+//
+//  64 bits:
+//  --------
+//  unused:25 hash:31 -->| unused:1   age:4    biased_lock:1 lock:2 (normal object)
+//  JavaThread*:54 epoch:2 unused:1   age:4    biased_lock:1 lock:2 (biased object)
+//  PromotedObject*:61 --------------------->| promo_bits:3 ----->| (CMS promoted object)
+//  size:64 ----------------------------------------------------->| (CMS free block)
+//
+//  unused:25 hash:31 -->| cms_free:1 age:4    biased_lock:1 lock:2 (COOPs && normal object)
+//  JavaThread*:54 epoch:2 cms_free:1 age:4    biased_lock:1 lock:2 (COOPs && biased object)
+//  narrowOop:32 unused:24 cms_free:1 unused:4 promo_bits:3 ----->| (COOPs && CMS promoted object)
+//  unused:21 size:35 -->| cms_free:1 unused:7 ------------------>| (COOPs && CMS free block)
+//
+//  - hash contains the identity hash value: largest value is
+//    31 bits, see os::random().  Also, 64-bit vm's require
+//    a hash value no bigger than 32 bits because they will not
+//    properly generate a mask larger than that: see library_call.cpp
+//    and c1_CodePatterns_sparc.cpp.
+//
+//  - the biased lock pattern is used to bias a lock toward a given
+//    thread. When this pattern is set in the low three bits, the lock
+//    is either biased toward a given thread or "anonymously" biased,
+//    indicating that it is possible for it to be biased. When the
+//    lock is biased toward a given thread, locking and unlocking can
+//    be performed by that thread without using atomic operations.
+//    When a lock's bias is revoked, it reverts back to the normal
+//    locking scheme described below.
+//
+//    Note that we are overloading the meaning of the "unlocked" state
+//    of the header. Because we steal a bit from the age we can
+//    guarantee that the bias pattern will never be seen for a truly
+//    unlocked object.
+//
+//    Note also that the biased state contains the age bits normally
+//    contained in the object header. Large increases in scavenge
+//    times were seen when these bits were absent and an arbitrary age
+//    assigned to all biased objects, because they tended to consume a
+//    significant fraction of the eden semispaces and were not
+//    promoted promptly, causing an increase in the amount of copying
+//    performed. The runtime system aligns all JavaThread* pointers to
+//    a very large value (currently 128 bytes (32bVM) or 256 bytes (64bVM))
+//    to make room for the age bits & the epoch bits (used in support of
+//    biased locking), and for the CMS "freeness" bit in the 64bVM (+COOPs).
+//
+//    [JavaThread* | epoch | age | 1 | 01]       lock is biased toward given thread
+//    [0           | epoch | age | 1 | 01]       lock is anonymously biased
+//
+//  - the two lock bits are used to describe three states: locked/unlocked and monitor.
+//
+//    [ptr             | 00]  locked             ptr points to real header on stack
+//    [header      | 0 | 01]  unlocked           regular object header
+//    [ptr             | 10]  monitor            inflated lock (header is wapped out)
+//    [ptr             | 11]  marked             used by markSweep to mark an object
+//                                               not valid at any other time
+//
+//    We assume that stack/thread pointers have the lowest two bits cleared.
+
+class BasicLock;
+class ObjectMonitor;
+class JavaThread;
+
+class markWord {
+ private:
+  uintptr_t _value;
+
+ public:
+  explicit markWord(uintptr_t value) : _value(value) {}
+
+  markWord() { /* uninitialized */}
+
+  // It is critical for performance that this class be trivially
+  // destructable, copyable, and assignable.
+
+  static markWord from_pointer(void* ptr) {
+    return markWord((uintptr_t)ptr);
+  }
+  void* to_pointer() const {
+    return (void*)_value;
+  }
+
+  bool operator==(const markWord& other) const {
+    return _value == other._value;
+  }
+  bool operator!=(const markWord& other) const {
+    return !operator==(other);
+  }
+
+  // Conversion
+  uintptr_t value() const { return _value; }
+
+  // Constants
+  enum { age_bits                 = 4,
+         lock_bits                = 2,
+         biased_lock_bits         = 1,
+         max_hash_bits            = BitsPerWord - age_bits - lock_bits - biased_lock_bits,
+         hash_bits                = max_hash_bits > 31 ? 31 : max_hash_bits,
+         cms_bits                 = LP64_ONLY(1) NOT_LP64(0),
+         epoch_bits               = 2
+  };
+
+  // The biased locking code currently requires that the age bits be
+  // contiguous to the lock bits.
+  enum { lock_shift               = 0,
+         biased_lock_shift        = lock_bits,
+         age_shift                = lock_bits + biased_lock_bits,
+         cms_shift                = age_shift + age_bits,
+         hash_shift               = cms_shift + cms_bits,
+         epoch_shift              = hash_shift
+  };
+
+  enum { lock_mask                = right_n_bits(lock_bits),
+         lock_mask_in_place       = lock_mask << lock_shift,
+         biased_lock_mask         = right_n_bits(lock_bits + biased_lock_bits),
+         biased_lock_mask_in_place= biased_lock_mask << lock_shift,
+         biased_lock_bit_in_place = 1 << biased_lock_shift,
+         age_mask                 = right_n_bits(age_bits),
+         age_mask_in_place        = age_mask << age_shift,
+         epoch_mask               = right_n_bits(epoch_bits),
+         epoch_mask_in_place      = epoch_mask << epoch_shift,
+         cms_mask                 = right_n_bits(cms_bits),
+         cms_mask_in_place        = cms_mask << cms_shift
+  };
+
+  const static uintptr_t hash_mask = right_n_bits(hash_bits);
+  const static uintptr_t hash_mask_in_place = hash_mask << hash_shift;
+
+  // Alignment of JavaThread pointers encoded in object header required by biased locking
+  enum { biased_lock_alignment    = 2 << (epoch_shift + epoch_bits)
+  };
+
+  enum { locked_value             = 0,
+         unlocked_value           = 1,
+         monitor_value            = 2,
+         marked_value             = 3,
+         biased_lock_pattern      = 5
+  };
+
+  enum { no_hash                  = 0 };  // no hash value assigned
+
+  enum { no_hash_in_place         = (address_word)no_hash << hash_shift,
+         no_lock_in_place         = unlocked_value
+  };
+
+  enum { max_age                  = age_mask };
+
+  enum { max_bias_epoch           = epoch_mask };
+
+  // Creates a markWord with all bits set to zero.
+  static markWord zero() { return markWord(uintptr_t(0)); }
+
+  // Biased Locking accessors.
+  // These must be checked by all code which calls into the
+  // ObjectSynchronizer and other code. The biasing is not understood
+  // by the lower-level CAS-based locking code, although the runtime
+  // fixes up biased locks to be compatible with it when a bias is
+  // revoked.
+  bool has_bias_pattern() const {
+    return (mask_bits(value(), biased_lock_mask_in_place) == biased_lock_pattern);
+  }
+  JavaThread* biased_locker() const {
+    assert(has_bias_pattern(), "should not call this otherwise");
+    return (JavaThread*) ((intptr_t) (mask_bits(value(), ~(biased_lock_mask_in_place | age_mask_in_place | epoch_mask_in_place))));
+  }
+  // Indicates that the mark has the bias bit set but that it has not
+  // yet been biased toward a particular thread
+  bool is_biased_anonymously() const {
+    return (has_bias_pattern() && (biased_locker() == NULL));
+  }
+  // Indicates epoch in which this bias was acquired. If the epoch
+  // changes due to too many bias revocations occurring, the biases
+  // from the previous epochs are all considered invalid.
+  int bias_epoch() const {
+    assert(has_bias_pattern(), "should not call this otherwise");
+    return (mask_bits(value(), epoch_mask_in_place) >> epoch_shift);
+  }
+  markWord set_bias_epoch(int epoch) {
+    assert(has_bias_pattern(), "should not call this otherwise");
+    assert((epoch & (~epoch_mask)) == 0, "epoch overflow");
+    return markWord(mask_bits(value(), ~epoch_mask_in_place) | (epoch << epoch_shift));
+  }
+  markWord incr_bias_epoch() {
+    return set_bias_epoch((1 + bias_epoch()) & epoch_mask);
+  }
+  // Prototype mark for initialization
+  static markWord biased_locking_prototype() {
+    return markWord( biased_lock_pattern );
+  }
+
+  // lock accessors (note that these assume lock_shift == 0)
+  bool is_locked()   const {
+    return (mask_bits(value(), lock_mask_in_place) != unlocked_value);
+  }
+  bool is_unlocked() const {
+    return (mask_bits(value(), biased_lock_mask_in_place) == unlocked_value);
+  }
+  bool is_marked()   const {
+    return (mask_bits(value(), lock_mask_in_place) == marked_value);
+  }
+  bool is_neutral()  const { return (mask_bits(value(), biased_lock_mask_in_place) == unlocked_value); }
+
+  // Special temporary state of the markWord while being inflated.
+  // Code that looks at mark outside a lock need to take this into account.
+  bool is_being_inflated() const { return (value() == 0); }
+
+  // Distinguished markword value - used when inflating over
+  // an existing stacklock.  0 indicates the markword is "BUSY".
+  // Lockword mutators that use a LD...CAS idiom should always
+  // check for and avoid overwriting a 0 value installed by some
+  // other thread.  (They should spin or block instead.  The 0 value
+  // is transient and *should* be short-lived).
+  static markWord INFLATING() { return zero(); }    // inflate-in-progress
+
+  // Should this header be preserved during GC?
+  inline bool must_be_preserved(oop obj_containing_mark) const;
+  inline bool must_be_preserved_with_bias(oop obj_containing_mark) const;
+
+  // Should this header (including its age bits) be preserved in the
+  // case of a promotion failure during scavenge?
+  // Note that we special case this situation. We want to avoid
+  // calling BiasedLocking::preserve_marks()/restore_marks() (which
+  // decrease the number of mark words that need to be preserved
+  // during GC) during each scavenge. During scavenges in which there
+  // is no promotion failure, we actually don't need to call the above
+  // routines at all, since we don't mutate and re-initialize the
+  // marks of promoted objects using init_mark(). However, during
+  // scavenges which result in promotion failure, we do re-initialize
+  // the mark words of objects, meaning that we should have called
+  // these mark word preservation routines. Currently there's no good
+  // place in which to call them in any of the scavengers (although
+  // guarded by appropriate locks we could make one), but the
+  // observation is that promotion failures are quite rare and
+  // reducing the number of mark words preserved during them isn't a
+  // high priority.
+  inline bool must_be_preserved_for_promotion_failure(oop obj_containing_mark) const;
+  inline bool must_be_preserved_with_bias_for_promotion_failure(oop obj_containing_mark) const;
+
+  // Should this header be preserved during a scavenge where CMS is
+  // the old generation?
+  // (This is basically the same body as must_be_preserved_for_promotion_failure(),
+  // but takes the Klass* as argument instead)
+  inline bool must_be_preserved_for_cms_scavenge(Klass* klass_of_obj_containing_mark) const;
+  inline bool must_be_preserved_with_bias_for_cms_scavenge(Klass* klass_of_obj_containing_mark) const;
+
+  // WARNING: The following routines are used EXCLUSIVELY by
+  // synchronization functions. They are not really gc safe.
+  // They must get updated if markWord layout get changed.
+  markWord set_unlocked() const {
+    return markWord(value() | unlocked_value);
+  }
+  bool has_locker() const {
+    return ((value() & lock_mask_in_place) == locked_value);
+  }
+  BasicLock* locker() const {
+    assert(has_locker(), "check");
+    return (BasicLock*) value();
+  }
+  bool has_monitor() const {
+    return ((value() & monitor_value) != 0);
+  }
+  ObjectMonitor* monitor() const {
+    assert(has_monitor(), "check");
+    // Use xor instead of &~ to provide one extra tag-bit check.
+    return (ObjectMonitor*) (value() ^ monitor_value);
+  }
+  bool has_displaced_mark_helper() const {
+    return ((value() & unlocked_value) == 0);
+  }
+  markWord displaced_mark_helper() const {
+    assert(has_displaced_mark_helper(), "check");
+    intptr_t ptr = (value() & ~monitor_value);
+    return *(markWord*)ptr;
+  }
+  void set_displaced_mark_helper(markWord m) const {
+    assert(has_displaced_mark_helper(), "check");
+    intptr_t ptr = (value() & ~monitor_value);
+    ((markWord*)ptr)->_value = m._value;
+  }
+  markWord copy_set_hash(intptr_t hash) const {
+    intptr_t tmp = value() & (~hash_mask_in_place);
+    tmp |= ((hash & hash_mask) << hash_shift);
+    return markWord(tmp);
+  }
+  // it is only used to be stored into BasicLock as the
+  // indicator that the lock is using heavyweight monitor
+  static markWord unused_mark() {
+    return markWord(marked_value);
+  }
+  // the following two functions create the markWord to be
+  // stored into object header, it encodes monitor info
+  static markWord encode(BasicLock* lock) {
+    return from_pointer(lock);
+  }
+  static markWord encode(ObjectMonitor* monitor) {
+    intptr_t tmp = (intptr_t) monitor;
+    return markWord(tmp | monitor_value);
+  }
+  static markWord encode(JavaThread* thread, uint age, int bias_epoch) {
+    intptr_t tmp = (intptr_t) thread;
+    assert(UseBiasedLocking && ((tmp & (epoch_mask_in_place | age_mask_in_place | biased_lock_mask_in_place)) == 0), "misaligned JavaThread pointer");
+    assert(age <= max_age, "age too large");
+    assert(bias_epoch <= max_bias_epoch, "bias epoch too large");
+    return markWord(tmp | (bias_epoch << epoch_shift) | (age << age_shift) | biased_lock_pattern);
+  }
+
+  // used to encode pointers during GC
+  markWord clear_lock_bits() { return markWord(value() & ~lock_mask_in_place); }
+
+  // age operations
+  markWord set_marked()   { return markWord((value() & ~lock_mask_in_place) | marked_value); }
+  markWord set_unmarked() { return markWord((value() & ~lock_mask_in_place) | unlocked_value); }
+
+  uint     age()           const { return mask_bits(value() >> age_shift, age_mask); }
+  markWord set_age(uint v) const {
+    assert((v & ~age_mask) == 0, "shouldn't overflow age field");
+    return markWord((value() & ~age_mask_in_place) | (((uintptr_t)v & age_mask) << age_shift));
+  }
+  markWord incr_age()      const { return age() == max_age ? markWord(_value) : set_age(age() + 1); }
+
+  // hash operations
+  intptr_t hash() const {
+    return mask_bits(value() >> hash_shift, hash_mask);
+  }
+
+  bool has_no_hash() const {
+    return hash() == no_hash;
+  }
+
+  // Prototype mark for initialization
+  static markWord prototype() {
+    return markWord( no_hash_in_place | no_lock_in_place );
+  }
+
+  // Helper function for restoration of unmarked mark oops during GC
+  static inline markWord prototype_for_object(oop obj);
+
+  // Debugging
+  void print_on(outputStream* st) const;
+
+  // Prepare address of oop for placement into mark
+  inline static markWord encode_pointer_as_mark(void* p) { return from_pointer(p).set_marked(); }
+
+  // Recover address of oop from encoded form used in mark
+  inline void* decode_pointer() { if (UseBiasedLocking && has_bias_pattern()) return NULL; return (void*)clear_lock_bits().value(); }
+
+  // These markWords indicate cms free chunk blocks and not objects.
+  // In 64 bit, the markWord is set to distinguish them from oops.
+  // These are defined in 32 bit mode for vmStructs.
+  const static uintptr_t cms_free_chunk_pattern  = 0x1;
+
+  // Constants for the size field.
+  enum { size_shift                = cms_shift + cms_bits,
+         size_bits                 = 35    // need for compressed oops 32G
+       };
+  // These values are too big for Win64
+  const static uintptr_t size_mask = LP64_ONLY(right_n_bits(size_bits))
+                                     NOT_LP64(0);
+  const static uintptr_t size_mask_in_place =
+                                     (address_word)size_mask << size_shift;
+
+#ifdef _LP64
+  static markWord cms_free_prototype() {
+    return markWord(((intptr_t)prototype().value() & ~cms_mask_in_place) |
+                    ((cms_free_chunk_pattern & cms_mask) << cms_shift));
+  }
+  uintptr_t cms_encoding() const {
+    return mask_bits(value() >> cms_shift, cms_mask);
+  }
+  bool is_cms_free_chunk() const {
+    return is_neutral() &&
+           (cms_encoding() & cms_free_chunk_pattern) == cms_free_chunk_pattern;
+  }
+
+  size_t get_size() const       { return (size_t)(value() >> size_shift); }
+  static markWord set_size_and_free(size_t size) {
+    assert((size & ~size_mask) == 0, "shouldn't overflow size field");
+    return markWord(((intptr_t)cms_free_prototype().value() & ~size_mask_in_place) |
+                    (((intptr_t)size & size_mask) << size_shift));
+  }
+#endif // _LP64
+};
+
+// Support atomic operations.
+template<>
+struct PrimitiveConversions::Translate<markWord> : public TrueType {
+  typedef markWord Value;
+  typedef uintptr_t Decayed;
+
+  static Decayed decay(const Value& x) { return x.value(); }
+  static Value recover(Decayed x) { return Value(x); }
+};
+
+#endif // SHARE_OOPS_MARKWORD_HPP
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/hotspot/share/oops/markWord.inline.hpp	Mon Aug 19 11:30:03 2019 +0200
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 2006, 2019, 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+#ifndef SHARE_OOPS_MARKWORD_INLINE_HPP
+#define SHARE_OOPS_MARKWORD_INLINE_HPP
+
+#include "oops/klass.hpp"
+#include "oops/markWord.hpp"
+#include "oops/oop.inline.hpp"
+#include "runtime/globals.hpp"
+
+// Should this header be preserved during GC (when biased locking is enabled)?
+inline bool markWord::must_be_preserved_with_bias(oop obj_containing_mark) const {
+  assert(UseBiasedLocking, "unexpected");
+  if (has_bias_pattern()) {
+    // Will reset bias at end of collection
+    // Mark words of biased and currently locked objects are preserved separately
+    return false;
+  }
+  markWord prototype_header = prototype_for_object(obj_containing_mark);
+  if (prototype_header.has_bias_pattern()) {
+    // Individual instance which has its bias revoked; must return
+    // true for correctness
+    return true;
+  }
+  return (!is_unlocked() || !has_no_hash());
+}
+
+// Should this header be preserved during GC?
+inline bool markWord::must_be_preserved(oop obj_containing_mark) const {
+  if (!UseBiasedLocking)
+    return (!is_unlocked() || !has_no_hash());
+  return must_be_preserved_with_bias(obj_containing_mark);
+}
+
+// Should this header be preserved in the case of a promotion failure
+// during scavenge (when biased locking is enabled)?
+inline bool markWord::must_be_preserved_with_bias_for_promotion_failure(oop obj_containing_mark) const {
+  assert(UseBiasedLocking, "unexpected");
+  // We don't explicitly save off the mark words of biased and
+  // currently-locked objects during scavenges, so if during a
+  // promotion failure we encounter either a biased mark word or a
+  // klass which still has a biasable prototype header, we have to
+  // preserve the mark word. This results in oversaving, but promotion
+  // failures are rare, and this avoids adding more complex logic to
+  // the scavengers to call new variants of
+  // BiasedLocking::preserve_marks() / restore_marks() in the middle
+  // of a scavenge when a promotion failure has first been detected.
+  if (has_bias_pattern() ||
+      prototype_for_object(obj_containing_mark).has_bias_pattern()) {
+    return true;
+  }
+  return (!is_unlocked() || !has_no_hash());
+}
+
+// Should this header be preserved in the case of a promotion failure
+// during scavenge?
+inline bool markWord::must_be_preserved_for_promotion_failure(oop obj_containing_mark) const {
+  if (!UseBiasedLocking)
+    return (!is_unlocked() || !has_no_hash());
+  return must_be_preserved_with_bias_for_promotion_failure(obj_containing_mark);
+}
+
+
+// Same as must_be_preserved_with_bias_for_promotion_failure() except that
+// it takes a Klass* argument, instead of the object of which this is the mark word.
+inline bool markWord::must_be_preserved_with_bias_for_cms_scavenge(Klass* klass_of_obj_containing_mark) const {
+  assert(UseBiasedLocking, "unexpected");
+  // CMS scavenges preserve mark words in similar fashion to promotion failures; see above
+  if (has_bias_pattern() ||
+      klass_of_obj_containing_mark->prototype_header().has_bias_pattern()) {
+    return true;
+  }
+  return (!is_unlocked() || !has_no_hash());
+}
+
+// Same as must_be_preserved_for_promotion_failure() except that
+// it takes a Klass* argument, instead of the object of which this is the mark word.
+inline bool markWord::must_be_preserved_for_cms_scavenge(Klass* klass_of_obj_containing_mark) const {
+  if (!UseBiasedLocking)
+    return (!is_unlocked() || !has_no_hash());
+  return must_be_preserved_with_bias_for_cms_scavenge(klass_of_obj_containing_mark);
+}
+
+inline markWord markWord::prototype_for_object(oop obj) {
+#ifdef ASSERT
+  markWord prototype_header = obj->klass()->prototype_header();
+  assert(prototype_header == prototype() || prototype_header.has_bias_pattern(), "corrupt prototype header");
+#endif
+  return obj->klass()->prototype_header();
+}
+
+#endif // SHARE_OOPS_MARKWORD_INLINE_HPP
--- a/src/hotspot/share/oops/oop.hpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/oops/oop.hpp	Mon Aug 19 11:30:03 2019 +0200
@@ -28,7 +28,7 @@
 #include "memory/iterator.hpp"
 #include "memory/memRegion.hpp"
 #include "oops/access.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "oops/metadata.hpp"
 #include "runtime/atomic.hpp"
 #include "utilities/macros.hpp"
--- a/src/hotspot/share/oops/oop.inline.hpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/oops/oop.inline.hpp	Mon Aug 19 11:30:03 2019 +0200
@@ -32,7 +32,7 @@
 #include "oops/arrayOop.hpp"
 #include "oops/compressedOops.inline.hpp"
 #include "oops/klass.inline.hpp"
-#include "oops/markOop.inline.hpp"
+#include "oops/markWord.inline.hpp"
 #include "oops/oop.hpp"
 #include "runtime/atomic.hpp"
 #include "runtime/orderAccess.hpp"
--- a/src/hotspot/share/opto/library_call.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/opto/library_call.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -4030,7 +4030,7 @@
   // Get the hash value and check to see that it has been properly assigned.
   // We depend on hash_mask being at most 32 bits and avoid the use of
   // hash_mask_in_place because it could be larger than 32 bits in a 64-bit
-  // vm: see markOop.hpp.
+  // vm: see markWord.hpp.
   Node *hash_mask      = _gvn.intcon(markWord::hash_mask);
   Node *hash_shift     = _gvn.intcon(markWord::hash_shift);
   Node *hshifted_header= _gvn.transform(new URShiftXNode(header, hash_shift));
--- a/src/hotspot/share/prims/jni.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/prims/jni.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -50,7 +50,7 @@
 #include "oops/arrayOop.inline.hpp"
 #include "oops/instanceKlass.hpp"
 #include "oops/instanceOop.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "oops/method.hpp"
 #include "oops/objArrayKlass.hpp"
 #include "oops/objArrayOop.inline.hpp"
--- a/src/hotspot/share/runtime/basicLock.hpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/runtime/basicLock.hpp	Mon Aug 19 11:30:03 2019 +0200
@@ -25,7 +25,7 @@
 #ifndef SHARE_RUNTIME_BASICLOCK_HPP
 #define SHARE_RUNTIME_BASICLOCK_HPP
 
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "runtime/atomic.hpp"
 #include "runtime/handles.hpp"
 
--- a/src/hotspot/share/runtime/biasedLocking.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/runtime/biasedLocking.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -29,7 +29,7 @@
 #include "logging/log.hpp"
 #include "memory/resourceArea.hpp"
 #include "oops/klass.inline.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/atomic.hpp"
 #include "runtime/basicLock.hpp"
--- a/src/hotspot/share/runtime/flags/jvmFlagRangeList.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/runtime/flags/jvmFlagRangeList.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -27,7 +27,7 @@
 #include "classfile/stringTable.hpp"
 #include "classfile/symbolTable.hpp"
 #include "gc/shared/referenceProcessor.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/flags/jvmFlag.hpp"
 #include "runtime/flags/jvmFlagConstraintList.hpp"
--- a/src/hotspot/share/runtime/frame.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/runtime/frame.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -33,7 +33,7 @@
 #include "interpreter/oopMapCache.hpp"
 #include "memory/resourceArea.hpp"
 #include "memory/universe.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "oops/method.hpp"
 #include "oops/methodData.hpp"
 #include "oops/oop.inline.hpp"
--- a/src/hotspot/share/runtime/objectMonitor.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/runtime/objectMonitor.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -28,7 +28,7 @@
 #include "jfr/support/jfrThreadId.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/resourceArea.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/atomic.hpp"
 #include "runtime/handles.inline.hpp"
--- a/src/hotspot/share/runtime/objectMonitor.hpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/runtime/objectMonitor.hpp	Mon Aug 19 11:30:03 2019 +0200
@@ -27,7 +27,7 @@
 
 #include "memory/allocation.hpp"
 #include "memory/padded.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "runtime/os.hpp"
 #include "runtime/park.hpp"
 #include "runtime/perfData.hpp"
@@ -75,7 +75,7 @@
 // ObjectMonitor Layout Overview/Highlights/Restrictions:
 //
 // - The _header field must be at offset 0 because the displaced header
-//   from markWord is stored there. We do not want markOop.hpp to include
+//   from markWord is stored there. We do not want markWord.hpp to include
 //   ObjectMonitor.hpp to avoid exposing ObjectMonitor everywhere. This
 //   means that ObjectMonitor cannot inherit from any other class nor can
 //   it use any virtual member functions. This restriction is critical to
--- a/src/hotspot/share/runtime/synchronizer.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/runtime/synchronizer.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -32,7 +32,7 @@
 #include "memory/padded.hpp"
 #include "memory/resourceArea.hpp"
 #include "memory/universe.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "oops/oop.inline.hpp"
 #include "runtime/atomic.hpp"
 #include "runtime/biasedLocking.hpp"
--- a/src/hotspot/share/runtime/synchronizer.hpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/runtime/synchronizer.hpp	Mon Aug 19 11:30:03 2019 +0200
@@ -26,7 +26,7 @@
 #define SHARE_RUNTIME_SYNCHRONIZER_HPP
 
 #include "memory/padded.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "runtime/basicLock.hpp"
 #include "runtime/handles.hpp"
 #include "runtime/perfData.hpp"
--- a/src/hotspot/share/runtime/vmStructs.cpp	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/hotspot/share/runtime/vmStructs.cpp	Mon Aug 19 11:30:03 2019 +0200
@@ -70,7 +70,7 @@
 #include "oops/instanceMirrorKlass.hpp"
 #include "oops/instanceOop.hpp"
 #include "oops/klass.hpp"
-#include "oops/markOop.hpp"
+#include "oops/markWord.hpp"
 #include "oops/method.hpp"
 #include "oops/methodCounters.hpp"
 #include "oops/methodData.hpp"
--- a/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/MonitorSnippets.java	Tue Aug 20 11:15:23 2019 +0100
+++ b/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/replacements/MonitorSnippets.java	Mon Aug 19 11:30:03 2019 +0200
@@ -149,7 +149,7 @@
  * atomic operations with biased locking and bulk rebiasing</a> by Kenneth Russell and David
  * Detlefs.
  *
- * Comment below is reproduced from {@code markOop.hpp} for convenience:
+ * Comment below is reproduced from {@code markWord.hpp} for convenience:
  *
  * <pre>
  *  Bit-format of an object header (most significant first, big endian layout below):
--- a/test/hotspot/jtreg/serviceability/sa/ClhsdbLongConstant.java	Tue Aug 20 11:15:23 2019 +0100
+++ b/test/hotspot/jtreg/serviceability/sa/ClhsdbLongConstant.java	Mon Aug 19 11:30:03 2019 +0200
@@ -88,7 +88,7 @@
 
     private static void checkForTruncation(String longConstantOutput) throws Exception {
 
-        // Expected values obtained from the hash_mask_in_place definition in markOop.hpp
+        // Expected values obtained from the hash_mask_in_place definition in markWord.hpp
 
         // Expected output snippet is of the form (on x64-64):
         // ...