# HG changeset patch # User Thomas Wuerthinger # Date 1291028505 -3600 # Node ID fe69dec9a1ed45715aaff98a0e6b472230b72df4 # Parent 2fe369533fedc2f5a3a1de0043e503233e299f46 Added support for CompileTheWorld. diff -r 2fe369533fed -r fe69dec9a1ed c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/Compiler.java --- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/Compiler.java Sat Nov 27 16:43:53 2010 +0100 +++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/Compiler.java Mon Nov 29 12:01:45 2010 +0100 @@ -20,7 +20,6 @@ */ package com.sun.hotspot.c1x; -import java.lang.management.*; import java.lang.reflect.Proxy; import java.net.*; diff -r 2fe369533fed -r fe69dec9a1ed src/share/vm/c1x/c1x_VMEntries.cpp --- a/src/share/vm/c1x/c1x_VMEntries.cpp Sat Nov 27 16:43:53 2010 +0100 +++ b/src/share/vm/c1x/c1x_VMEntries.cpp Mon Nov 29 12:01:45 2010 +0100 @@ -148,6 +148,10 @@ protectionDomain = VmIds::get(accessingClassVmId)->klass_part()->protection_domain(); } resolved_type = SystemDictionary::resolve_or_null(nameSymbol, classloader, protectionDomain, THREAD); + if (HAS_PENDING_EXCEPTION) { + CLEAR_PENDING_EXCEPTION; + resolved_type = NULL; + } } if (resolved_type != NULL) { result = C1XCompiler::createHotSpotTypeResolved(resolved_type, name, CHECK_NULL); diff -r 2fe369533fed -r fe69dec9a1ed src/share/vm/c1x/c1x_VMExits.cpp --- a/src/share/vm/c1x/c1x_VMExits.cpp Sat Nov 27 16:43:53 2010 +0100 +++ b/src/share/vm/c1x/c1x_VMExits.cpp Mon Nov 29 12:01:45 2010 +0100 @@ -43,6 +43,9 @@ Handle VMExits::instance() { if (JNIHandles::resolve(_vmExitsPermObject) == NULL) { KlassHandle compiler_klass = SystemDictionary::resolve_or_null(vmSymbols::com_sun_hotspot_c1x_Compiler(), SystemDictionary::java_system_loader(), NULL, Thread::current()); + if (compiler_klass.is_null()) { + fatal("Could not find class com.sun.hotspot.c1x.Compiler"); + } JavaValue result(T_OBJECT); JavaCallArguments args; JavaCalls::call_static(&result, compiler_klass(), vmSymbols::getVMExits_name(), vmSymbols::getVMExits_signature(), &args, Thread::current()); diff -r 2fe369533fed -r fe69dec9a1ed src/share/vm/prims/jni.cpp --- a/src/share/vm/prims/jni.cpp Sat Nov 27 16:43:53 2010 +0100 +++ b/src/share/vm/prims/jni.cpp Mon Nov 29 12:01:45 2010 +0100 @@ -3293,13 +3293,14 @@ if (JvmtiExport::should_post_thread_life()) { JvmtiExport::post_thread_start(thread); } - // Check if we should compile all classes on bootclasspath - NOT_PRODUCT(if (CompileTheWorld) ClassLoader::compile_the_world();) if (BootstrapC1X) { CompileBroker::bootstrap_c1x(); } + // Check if we should compile all classes on bootclasspath + NOT_PRODUCT(if (CompileTheWorld) ClassLoader::compile_the_world();) + // Since this is not a JVM_ENTRY we have to set the thread state manually before leaving. ThreadStateTransition::transition_and_fence(thread, _thread_in_vm, _thread_in_native); } else {