From 1f9273ca3b5f7cec2867c48b9a10446d40ed2d30 Mon Sep 17 00:00:00 2001 From: Tobias Hartmann Date: Thu, 7 Apr 2016 16:51:21 +0200 Subject: [PATCH] 8153514: Whitebox API should allow compilation of Added Whitebox API method to trigger compilation of static initializer. Reviewed-by: zmajo, kvn, iignatyev --- test/lib/sun/hotspot/WhiteBox.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/lib/sun/hotspot/WhiteBox.java b/test/lib/sun/hotspot/WhiteBox.java index f2c85fb95a1..e706574359a 100644 --- a/test/lib/sun/hotspot/WhiteBox.java +++ b/test/lib/sun/hotspot/WhiteBox.java @@ -307,6 +307,11 @@ public class WhiteBox { Objects.requireNonNull(method); return enqueueMethodForCompilation0(method, compLevel, entry_bci); } + private native boolean enqueueInitializerForCompilation0(Class aClass, int compLevel); + public boolean enqueueInitializerForCompilation(Class aClass, int compLevel) { + Objects.requireNonNull(aClass); + return enqueueInitializerForCompilation0(aClass, compLevel); + } private native void clearMethodState0(Executable method); public void clearMethodState(Executable method) { Objects.requireNonNull(method);