comparison src/share/vm/jvmci/jvmciRuntime.cpp @ 22054:0e095e2c24e2

Rename com.oracle.jvmci to jdk.internal.jvmci
author twisti
date Mon, 22 Jun 2015 12:12:53 -0700
parents 1e0012efac83
children
comparison
equal deleted inserted replaced
22053:be8ed2908c59 22054:0e095e2c24e2
659 void JVMCIRuntime::initialize_HotSpotJVMCIRuntime() { 659 void JVMCIRuntime::initialize_HotSpotJVMCIRuntime() {
660 if (JNIHandles::resolve(_HotSpotJVMCIRuntime_instance) == NULL) { 660 if (JNIHandles::resolve(_HotSpotJVMCIRuntime_instance) == NULL) {
661 #ifdef ASSERT 661 #ifdef ASSERT
662 // This should only be called in the context of the JVMCI class being initialized 662 // This should only be called in the context of the JVMCI class being initialized
663 Thread* THREAD = Thread::current(); 663 Thread* THREAD = Thread::current();
664 TempNewSymbol name = SymbolTable::new_symbol("com/oracle/jvmci/runtime/JVMCI", CHECK_ABORT); 664 TempNewSymbol name = SymbolTable::new_symbol("jdk/internal/jvmci/runtime/JVMCI", CHECK_ABORT);
665 instanceKlassHandle klass = InstanceKlass::cast(load_required_class(name)); 665 instanceKlassHandle klass = InstanceKlass::cast(load_required_class(name));
666 assert(klass->is_being_initialized() && klass->is_reentrant_initialization(THREAD), 666 assert(klass->is_being_initialized() && klass->is_reentrant_initialization(THREAD),
667 "HotSpotJVMCIRuntime initialization should only be triggered through JVMCI initialization"); 667 "HotSpotJVMCIRuntime initialization should only be triggered through JVMCI initialization");
668 #endif 668 #endif
669 669
670 Handle result = callInitializer("com/oracle/jvmci/hotspot/HotSpotJVMCIRuntime", "runtime", 670 Handle result = callInitializer("jdk/internal/jvmci/hotspot/HotSpotJVMCIRuntime", "runtime",
671 "()Lcom/oracle/jvmci/hotspot/HotSpotJVMCIRuntime;"); 671 "()Ljdk/internal/jvmci/hotspot/HotSpotJVMCIRuntime;");
672 _HotSpotJVMCIRuntime_initialized = true; 672 _HotSpotJVMCIRuntime_initialized = true;
673 _HotSpotJVMCIRuntime_instance = JNIHandles::make_global(result()); 673 _HotSpotJVMCIRuntime_instance = JNIHandles::make_global(result());
674 } 674 }
675 } 675 }
676 676
677 void JVMCIRuntime::initialize_JVMCI() { 677 void JVMCIRuntime::initialize_JVMCI() {
678 if (JNIHandles::resolve(_HotSpotJVMCIRuntime_instance) == NULL) { 678 if (JNIHandles::resolve(_HotSpotJVMCIRuntime_instance) == NULL) {
679 callInitializer("com/oracle/jvmci/runtime/JVMCI", "getRuntime", "()Lcom/oracle/jvmci/runtime/JVMCIRuntime;"); 679 callInitializer("jdk/internal/jvmci/runtime/JVMCI", "getRuntime", "()Ljdk/internal/jvmci/runtime/JVMCIRuntime;");
680 } 680 }
681 assert(_HotSpotJVMCIRuntime_initialized == true, "what?"); 681 assert(_HotSpotJVMCIRuntime_initialized == true, "what?");
682 } 682 }
683 683
684 // private static void CompilerToVMImpl.init() 684 // private static void CompilerToVMImpl.init()
693 // initializer of Factory, we can rely on class initialization semantics to 693 // initializer of Factory, we can rely on class initialization semantics to
694 // synchronize threads racing to do the initialization. 694 // synchronize threads racing to do the initialization.
695 static Klass* _FactoryKlass = NULL; 695 static Klass* _FactoryKlass = NULL;
696 if (_FactoryKlass == NULL) { 696 if (_FactoryKlass == NULL) {
697 Thread* THREAD = Thread::current(); 697 Thread* THREAD = Thread::current();
698 TempNewSymbol name = SymbolTable::new_symbol("com/oracle/jvmci/service/JVMCIClassLoaderFactory", CHECK_ABORT); 698 TempNewSymbol name = SymbolTable::new_symbol("jdk/internal/jvmci/service/JVMCIClassLoaderFactory", CHECK_ABORT);
699 KlassHandle klass = SystemDictionary::resolve_or_fail(name, true, THREAD); 699 KlassHandle klass = SystemDictionary::resolve_or_fail(name, true, THREAD);
700 if (HAS_PENDING_EXCEPTION) { 700 if (HAS_PENDING_EXCEPTION) {
701 static volatile int seen_error = 0; 701 static volatile int seen_error = 0;
702 if (!seen_error && Atomic::cmpxchg(1, &seen_error, 0) == 0) { 702 if (!seen_error && Atomic::cmpxchg(1, &seen_error, 0) == 0) {
703 // Only report the failure on the first thread that hits it 703 // Only report the failure on the first thread that hits it
1080 } 1080 }
1081 1081
1082 void JVMCIRuntime::print_flags_helper(TRAPS) { 1082 void JVMCIRuntime::print_flags_helper(TRAPS) {
1083 // TODO(gd) write this in C++? 1083 // TODO(gd) write this in C++?
1084 HandleMark hm(THREAD); 1084 HandleMark hm(THREAD);
1085 TempNewSymbol name = SymbolTable::new_symbol("com/oracle/jvmci/hotspot/HotSpotOptions", CHECK_ABORT); 1085 TempNewSymbol name = SymbolTable::new_symbol("jdk/internal/jvmci/hotspot/HotSpotOptions", CHECK_ABORT);
1086 KlassHandle hotSpotOptionsClass = load_required_class(name); 1086 KlassHandle hotSpotOptionsClass = load_required_class(name);
1087 TempNewSymbol setOption = SymbolTable::new_symbol("printFlags", CHECK); 1087 TempNewSymbol setOption = SymbolTable::new_symbol("printFlags", CHECK);
1088 JavaValue result(T_VOID); 1088 JavaValue result(T_VOID);
1089 JavaCallArguments args; 1089 JavaCallArguments args;
1090 JavaCalls::call_static(&result, hotSpotOptionsClass, setOption, vmSymbols::void_method_signature(), &args, CHECK); 1090 JavaCalls::call_static(&result, hotSpotOptionsClass, setOption, vmSymbols::void_method_signature(), &args, CHECK);