< prev index next >

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/z/ZPageTableEntry.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 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.

@@ -33,12 +33,20 @@
     ZPageTableEntry(Address address) {
         entry = address;
     }
 
     ZPage page() {
-        return (ZPage)VMObjectFactory.newObject(ZPage.class, entry.andWithMask(~1L));
+        return (ZPage)VMObjectFactory.newObject(ZPage.class, zPageBits());
+    }
+
+    private Address zPageBits() {
+        return entry.andWithMask(~1L);
     }
 
     boolean relocating() {
         return (entry.asLongValue() & 1) == 1;
     }
+
+    boolean isEmpty() {
+        return entry == null || zPageBits() == null;
+    }
 }
< prev index next >