8221917: serviceability/sa/TestPrintMdo.java fails on 32-bit platforms
authorshade
Sun, 07 Apr 2019 13:28:18 +0200
changeset 54449 ac4b327623f6
parent 54448 cd2879e0c165
child 54450 8d51a40fbd23
8221917: serviceability/sa/TestPrintMdo.java fails on 32-bit platforms Reviewed-by: cjplummer, dholmes
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/DataLayout.java
--- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/DataLayout.java	Sun Apr 07 18:09:06 2019 +0800
+++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/DataLayout.java	Sun Apr 07 13:28:18 2019 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -172,7 +172,7 @@
     return 2;
   }
   public static int cellOffset(int index) {
-    return MethodData.cellSize + index * MethodData.cellSize;
+    return (headerSizeInCells() + index) * MethodData.cellSize;
   }
   // // Return a value which, when or-ed as a byte into _flags, sets the flag.
   // static int flagNumberToByteConstant(int flagNumber) {