comparison src/share/vm/graal/graalRuntime.cpp @ 18303:ab47ef2f2207

disable blocking compilation requests once GraalRuntime::shutdown has been called
author Doug Simon <doug.simon@oracle.com>
date Fri, 07 Nov 2014 12:35:58 +0100
parents bcb1e5c232d8
children c307546c7b0a
comparison
equal deleted inserted replaced
18302:fb289eb7243d 18303:ab47ef2f2207
39 #include "utilities/debug.hpp" 39 #include "utilities/debug.hpp"
40 40
41 address GraalRuntime::_external_deopt_i2c_entry = NULL; 41 address GraalRuntime::_external_deopt_i2c_entry = NULL;
42 jobject GraalRuntime::_HotSpotGraalRuntime_instance = NULL; 42 jobject GraalRuntime::_HotSpotGraalRuntime_instance = NULL;
43 bool GraalRuntime::_HotSpotGraalRuntime_initialized = false; 43 bool GraalRuntime::_HotSpotGraalRuntime_initialized = false;
44 bool GraalRuntime::_shutdown_called = false;
44 45
45 void GraalRuntime::initialize_natives(JNIEnv *env, jclass c2vmClass) { 46 void GraalRuntime::initialize_natives(JNIEnv *env, jclass c2vmClass) {
46 uintptr_t heap_end = (uintptr_t) Universe::heap()->reserved_region().end(); 47 uintptr_t heap_end = (uintptr_t) Universe::heap()->reserved_region().end();
47 uintptr_t allocation_end = heap_end + ((uintptr_t)16) * 1024 * 1024 * 1024; 48 uintptr_t allocation_end = heap_end + ((uintptr_t)16) * 1024 * 1024 * 1024;
48 AMD64_ONLY(guarantee(heap_end < allocation_end, "heap end too close to end of address space (might lead to erroneous TLAB allocations)")); 49 AMD64_ONLY(guarantee(heap_end < allocation_end, "heap end too close to end of address space (might lead to erroneous TLAB allocations)"));
987 return service; 988 return service;
988 } 989 }
989 990
990 void GraalRuntime::shutdown() { 991 void GraalRuntime::shutdown() {
991 if (_HotSpotGraalRuntime_instance != NULL) { 992 if (_HotSpotGraalRuntime_instance != NULL) {
993 _shutdown_called = true;
992 JavaThread* THREAD = JavaThread::current(); 994 JavaThread* THREAD = JavaThread::current();
993 HandleMark hm(THREAD); 995 HandleMark hm(THREAD);
994 TempNewSymbol name = SymbolTable::new_symbol("com/oracle/graal/hotspot/HotSpotGraalRuntime", CHECK_ABORT); 996 TempNewSymbol name = SymbolTable::new_symbol("com/oracle/graal/hotspot/HotSpotGraalRuntime", CHECK_ABORT);
995 KlassHandle klass = load_required_class(name); 997 KlassHandle klass = load_required_class(name);
996 JavaValue result(T_VOID); 998 JavaValue result(T_VOID);