comparison src/share/vm/runtime/javaCalls.cpp @ 15463:a20be10ad437

made Graal work with the HotSpot compiler queue and compiler threads, enabled by -XX:-UseGraalCompilationQueue
author Doug Simon <doug.simon@oracle.com>
date Fri, 02 May 2014 00:36:27 +0200
parents 2c940b1a48d8
children 063ec2920d21
comparison
equal deleted inserted replaced
15462:05d3f069cff2 15463:a20be10ad437
50 JavaThread* thread = (JavaThread *)THREAD; 50 JavaThread* thread = (JavaThread *)THREAD;
51 bool clear_pending_exception = true; 51 bool clear_pending_exception = true;
52 52
53 guarantee(thread->is_Java_thread(), "crucial check - the VM thread cannot and must not escape to Java code"); 53 guarantee(thread->is_Java_thread(), "crucial check - the VM thread cannot and must not escape to Java code");
54 assert(!thread->owns_locks(), "must release all locks when leaving VM"); 54 assert(!thread->owns_locks(), "must release all locks when leaving VM");
55 guarantee(!thread->is_Compiler_thread(), "cannot make java calls from the compiler"); 55 guarantee(thread->can_call_java(), "cannot make java calls from the compiler");
56 _result = result; 56 _result = result;
57 57
58 // Allocate handle block for Java code. This must be done before we change thread_state to _thread_in_Java_or_stub, 58 // Allocate handle block for Java code. This must be done before we change thread_state to _thread_in_Java_or_stub,
59 // since it can potentially block. 59 // since it can potentially block.
60 JNIHandleBlock* new_handles = JNIHandleBlock::allocate_block(thread); 60 JNIHandleBlock* new_handles = JNIHandleBlock::allocate_block(thread);
364 assert(holder->is_linked(), "rewritting must have taken place"); 364 assert(holder->is_linked(), "rewritting must have taken place");
365 } 365 }
366 #endif 366 #endif
367 367
368 368
369 assert(!thread->is_Compiler_thread(), "cannot compile from the compiler"); 369 assert(thread->can_call_java(), "cannot compile from the compiler");
370 if (CompilationPolicy::must_be_compiled(method)) { 370 if (CompilationPolicy::must_be_compiled(method)) {
371 CompileBroker::compile_method(method, InvocationEntryBci, 371 CompileBroker::compile_method(method, InvocationEntryBci,
372 CompilationPolicy::policy()->initial_compile_level(), 372 CompilationPolicy::policy()->initial_compile_level(),
373 methodHandle(), 0, "must_be_compiled", CHECK); 373 methodHandle(), 0, "must_be_compiled", CHECK);
374 } 374 }