diff src/share/vm/graal/graalVMToCompiler.cpp @ 9913:35f93560b1f0

ensure that <clinit> for HotSpotOptions is called irrespective of whether and -G: options are specified
author Doug Simon <doug.simon@oracle.com>
date Thu, 06 Jun 2013 17:27:07 +0200
parents 2dc020b33a6e
children 0f7ca53be929
line wrap: on
line diff
--- a/src/share/vm/graal/graalVMToCompiler.cpp	Thu Jun 06 15:35:52 2013 +0200
+++ b/src/share/vm/graal/graalVMToCompiler.cpp	Thu Jun 06 17:27:07 2013 +0200
@@ -75,6 +75,13 @@
   return Handle(JNIHandles::resolve_non_null(_vmToCompilerPermObject));
 }
 
+void VMToCompiler::initOptions() {
+  KlassHandle compilerKlass = loadClass(vmSymbols::com_oracle_graal_hotspot_HotSpotOptions());
+  Thread* THREAD = Thread::current();
+  compilerKlass->initialize(THREAD);
+  check_pending_exception("Error while calling initOptions");
+}
+
 jboolean VMToCompiler::setOption(Handle option) {
   assert(!option.is_null(), "");
   KlassHandle compilerKlass = loadClass(vmSymbols::com_oracle_graal_hotspot_HotSpotOptions());