From 0a609732d787cd6c2343d5277900a79b16995396 Mon Sep 17 00:00:00 2001
From: Thomas Schatzl <tschatzl@openjdk.org>
Date: Wed, 24 Jun 2015 17:45:44 +0200
Subject: [PATCH 1/3] 8129602: Incorrect GPL header causes RE script to create
 wrong output

Fix up GPL headers so that the RE script works.

Reviewed-by: stefank, dholmes, coleenp
---
 test/lib/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/lib/Makefile b/test/lib/Makefile
index 467adacbfda..4bb734a5ee3 100644
--- a/test/lib/Makefile
+++ b/test/lib/Makefile
@@ -8,7 +8,7 @@
 #
 # 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
+# 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).
 #

From 053ccc4c4a9ae55d0b382a51f845cedc18323ef2 Mon Sep 17 00:00:00 2001
From: Mikael Vidstedt <mikael@openjdk.org>
Date: Wed, 24 Jun 2015 15:29:34 -0700
Subject: [PATCH 2/3] 8129615: Remove jbb from jprt hotspot testset

Reviewed-by: gtriantafill, coleenp
---
 make/jprt.properties | 43 +++++++------------------------------------
 1 file changed, 7 insertions(+), 36 deletions(-)

diff --git a/make/jprt.properties b/make/jprt.properties
index c24a28f1cfd..aeed335507e 100644
--- a/make/jprt.properties
+++ b/make/jprt.properties
@@ -281,12 +281,7 @@ my.test.targets.hotspot.solaris.sparcv9=				\
     solaris_sparcv9_5.11-{product|fastdebug}-c2-GCBasher_SerialGC,	\
     solaris_sparcv9_5.11-{product|fastdebug}-c2-GCBasher_ParallelGC,	\
     solaris_sparcv9_5.11-{product|fastdebug}-c2-GCBasher_CMS,		\
-    solaris_sparcv9_5.11-{product|fastdebug}-c2-GCBasher_G1,		\
-    solaris_sparcv9_5.11-{product|fastdebug}-c2-jbb_default_nontiered,	\
-    solaris_sparcv9_5.11-{product|fastdebug}-c2-jbb_SerialGC,		\
-    solaris_sparcv9_5.11-{product|fastdebug}-c2-jbb_ParallelGC,		\
-    solaris_sparcv9_5.11-{product|fastdebug}-c2-jbb_CMS,		\
-    solaris_sparcv9_5.11-{product|fastdebug}-c2-jbb_G1
+    solaris_sparcv9_5.11-{product|fastdebug}-c2-GCBasher_G1
 
 my.test.targets.hotspot.solaris.x64=					\
     solaris_x64_5.11-{product|fastdebug}-c2-jvm98,			\
@@ -298,10 +293,7 @@ my.test.targets.hotspot.solaris.x64=					\
     solaris_x64_5.11-{product|fastdebug}-c2-GCBasher_SerialGC,		\
     solaris_x64_5.11-{product|fastdebug}-c2-GCBasher_ParallelGC,	\
     solaris_x64_5.11-{product|fastdebug}-c2-GCBasher_CMS,		\
-    solaris_x64_5.11-{product|fastdebug}-c2-GCBasher_G1,		\
-    solaris_x64_5.11-{product|fastdebug}-c2-jbb_default_nontiered,	\
-    solaris_x64_5.11-{product|fastdebug}-c2-jbb_SerialGC,		\
-    solaris_x64_5.11-{product|fastdebug}-c2-jbb_ParallelGC,
+    solaris_x64_5.11-{product|fastdebug}-c2-GCBasher_G1
 
 my.test.targets.hotspot.linux.i586=					\
     linux_i586_2.6-{product|fastdebug}-{c1|c2}-jvm98,			\
@@ -315,12 +307,7 @@ my.test.targets.hotspot.linux.i586=					\
     linux_i586_2.6-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC,	\
     linux_i586_2.6-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC,	\
     linux_i586_2.6-{product|fastdebug}-{c1|c2}-GCBasher_CMS,		\
-    linux_i586_2.6-{product|fastdebug}-{c1|c2}-GCBasher_G1,		\
-    linux_i586_2.6-{product|fastdebug}-c1-jbb_SerialGC,			\
-    linux_i586_2.6-{product|fastdebug}-c2-jbb_default_nontiered,	\
-    linux_i586_2.6-{product|fastdebug}-c1-jbb_ParallelGC,		\
-    linux_i586_2.6-{product|fastdebug}-c1-jbb_CMS,			\
-    linux_i586_2.6-{product|fastdebug}-c1-jbb_G1
+    linux_i586_2.6-{product|fastdebug}-{c1|c2}-GCBasher_G1
 
 my.test.targets.hotspot.linux.x64=					\
     linux_x64_2.6-{product|fastdebug}-c2-jvm98,				\
@@ -329,10 +316,7 @@ my.test.targets.hotspot.linux.x64=					\
     linux_x64_2.6-{product|fastdebug}-c2-GCBasher_SerialGC,		\
     linux_x64_2.6-{product|fastdebug}-c2-GCBasher_ParallelGC,		\
     linux_x64_2.6-{product|fastdebug}-c2-GCBasher_CMS,			\
-    linux_x64_2.6-{product|fastdebug}-c2-GCBasher_G1,			\
-    linux_x64_2.6-{product|fastdebug}-c2-jbb_default_nontiered,		\
-    linux_x64_2.6-{product|fastdebug}-c2-jbb_ParallelGC,		\
-    linux_x64_2.6-{product|fastdebug}-c2-jbb_G1
+    linux_x64_2.6-{product|fastdebug}-c2-GCBasher_G1
 
 my.test.targets.hotspot.macosx.x64=					\
     macosx_x64_10.9-{product|fastdebug}-c2-jvm98,			\
@@ -341,10 +325,7 @@ my.test.targets.hotspot.macosx.x64=					\
     macosx_x64_10.9-{product|fastdebug}-c2-GCBasher_SerialGC,		\
     macosx_x64_10.9-{product|fastdebug}-c2-GCBasher_ParallelGC,		\
     macosx_x64_10.9-{product|fastdebug}-c2-GCBasher_CMS,		\
-    macosx_x64_10.9-{product|fastdebug}-c2-GCBasher_G1,			\
-    macosx_x64_10.9-{product|fastdebug}-c2-jbb_default_nontiered,	\
-    macosx_x64_10.9-{product|fastdebug}-c2-jbb_ParallelGC,		\
-    macosx_x64_10.9-{product|fastdebug}-c2-jbb_G1
+    macosx_x64_10.9-{product|fastdebug}-c2-GCBasher_G1
 
 my.test.targets.hotspot.windows.i586=					\
     windows_i586_6.2-{product|fastdebug}-{c1|c2}-jvm98,			\
@@ -357,12 +338,7 @@ my.test.targets.hotspot.windows.i586=					\
     windows_i586_6.2-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC,	\
     windows_i586_6.2-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC,	\
     windows_i586_6.2-{product|fastdebug}-{c1|c2}-GCBasher_CMS,		\
-    windows_i586_6.2-{product|fastdebug}-{c1|c2}-GCBasher_G1,		\
-    windows_i586_6.2-{product|fastdebug}-{c1|c2}-jbb_default,		\
-    windows_i586_6.2-{product|fastdebug}-c2-jbb_default_nontiered,	\
-    windows_i586_6.2-product-{c1|c2}-jbb_ParallelGC,			\
-    windows_i586_6.2-product-{c1|c2}-jbb_CMS,				\
-    windows_i586_6.2-product-{c1|c2}-jbb_G1
+    windows_i586_6.2-{product|fastdebug}-{c1|c2}-GCBasher_G1
 
 my.test.targets.hotspot.windows.x64=					\
     windows_x64_6.2-{product|fastdebug}-c2-jvm98,			\
@@ -374,12 +350,7 @@ my.test.targets.hotspot.windows.x64=					\
     windows_x64_6.2-{product|fastdebug}-c2-GCBasher_SerialGC,		\
     windows_x64_6.2-{product|fastdebug}-c2-GCBasher_ParallelGC,		\
     windows_x64_6.2-{product|fastdebug}-c2-GCBasher_CMS,		\
-    windows_x64_6.2-{product|fastdebug}-c2-GCBasher_G1,			\
-    windows_x64_6.2-{product|fastdebug}-c2-jbb_default,			\
-    windows_x64_6.2-{product|fastdebug}-c2-jbb_default_nontiered,	\
-    windows_x64_6.2-product-c2-jbb_CMS,					\
-    windows_x64_6.2-product-c2-jbb_ParallelGC,				\
-    windows_x64_6.2-product-c2-jbb_G1
+    windows_x64_6.2-{product|fastdebug}-c2-GCBasher_G1
 
 # Some basic "smoke" tests for OpenJDK builds
 my.test.targets.hotspot.open=						\

From 7d75d2a98ac573146b89c986cb3b4cf931405c49 Mon Sep 17 00:00:00 2001
From: Jean-Francois Denise <jfdenise@openjdk.org>
Date: Thu, 25 Jun 2015 18:00:28 +0200
Subject: [PATCH 3/3] 8080511: Refresh of jimage support

Co-authored-by: James Laskey <james.laskey@oracle.com>
Co-authored-by: Sundararajan Athijegannathan <sundararajan.athijegannathan@oracle.com>
Reviewed-by: alanb, mchung, psandoz, acorn, lfoltan, ctornqvi
---
 modules.xml                        |  4 ++++
 test/lib/sun/hotspot/WhiteBox.java | 19 ++++++++++++++++++-
 2 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/modules.xml b/modules.xml
index 355f56a4270..9fb031e5ef2 100644
--- a/modules.xml
+++ b/modules.xml
@@ -218,6 +218,10 @@
       <name>jdk.internal.jimage</name>
       <to>jdk.dev</to>
     </export>
+    <export>
+      <name>jdk.internal.jimage.decompressor</name>
+      <to>jdk.dev</to>
+    </export>
     <export>
       <name>jdk.internal.org.objectweb.asm</name>
       <to>java.instrument</to>
diff --git a/test/lib/sun/hotspot/WhiteBox.java b/test/lib/sun/hotspot/WhiteBox.java
index 0121ca4fecc..17ade810b77 100644
--- a/test/lib/sun/hotspot/WhiteBox.java
+++ b/test/lib/sun/hotspot/WhiteBox.java
@@ -26,6 +26,7 @@ package sun.hotspot;
 
 import java.lang.management.MemoryUsage;
 import java.lang.reflect.Executable;
+import java.nio.ByteBuffer;
 import java.util.Arrays;
 import java.util.List;
 import java.util.function.BiFunction;
@@ -37,7 +38,6 @@ import java.util.Objects;
 import sun.hotspot.parser.DiagnosticCommand;
 
 public class WhiteBox {
-
   @SuppressWarnings("serial")
   public static class WhiteBoxPermission extends BasicPermission {
     public WhiteBoxPermission(String s) {
@@ -362,6 +362,23 @@ public class WhiteBox {
                               .orElse(null);
   }
 
+  public native boolean readImageFile(String imagePath);
+  public native long imageOpenImage(String imagePath, boolean bigEndian);
+  public native void imageCloseImage(long id);
+  public native long imageGetIndexAddress(long id);
+  public native long imageGetDataAddress(long id);
+  public native boolean imageReadCompressed(long id, long offset,
+    ByteBuffer compressedBuffer, long compressedSize,
+    ByteBuffer uncompressedBuffer, long uncompressedSize);
+  public native boolean imageRead(long id, long offset,
+    ByteBuffer uncompressedBuffer, long uncompressedSize);
+  public native byte[] imageGetStringBytes(long id, int offset);
+  public native long imageGetStringsSize(long id);
+  public native long[] imageGetAttributes(long id, int offset);
+  public native long[] imageFindAttributes(long id, byte[] path);
+  public native int[] imageAttributeOffsets(long id);
+  public native int imageGetIntAtAddress(long address, int offset, boolean big_endian);
+
   // Safepoint Checking
   public native void assertMatchingSafepointCalls(boolean mutexSafepointValue, boolean attemptedNoSafepointValue);