Mercurial > hg > graal-compiler
comparison src/share/vm/runtime/thread.cpp @ 4873:0382d2b469b2
7013347: allow crypto functions to be called inline to enhance performance
Reviewed-by: kvn
author | never |
---|---|
date | Wed, 01 Feb 2012 16:57:08 -0800 |
parents | aa3d708d67c4 |
children | f1cb6f9cfe21 |
comparison
equal
deleted
inserted
replaced
4872:aa3d708d67c4 | 4873:0382d2b469b2 |
---|---|
31 #include "compiler/compileBroker.hpp" | 31 #include "compiler/compileBroker.hpp" |
32 #include "interpreter/interpreter.hpp" | 32 #include "interpreter/interpreter.hpp" |
33 #include "interpreter/linkResolver.hpp" | 33 #include "interpreter/linkResolver.hpp" |
34 #include "interpreter/oopMapCache.hpp" | 34 #include "interpreter/oopMapCache.hpp" |
35 #include "jvmtifiles/jvmtiEnv.hpp" | 35 #include "jvmtifiles/jvmtiEnv.hpp" |
36 #include "memory/gcLocker.inline.hpp" | |
36 #include "memory/oopFactory.hpp" | 37 #include "memory/oopFactory.hpp" |
37 #include "memory/universe.inline.hpp" | 38 #include "memory/universe.inline.hpp" |
38 #include "oops/instanceKlass.hpp" | 39 #include "oops/instanceKlass.hpp" |
39 #include "oops/objArrayOop.hpp" | 40 #include "oops/objArrayOop.hpp" |
40 #include "oops/oop.inline.hpp" | 41 #include "oops/oop.inline.hpp" |
2276 // access error since that may block. | 2277 // access error since that may block. |
2277 thread->check_and_handle_async_exceptions(false); | 2278 thread->check_and_handle_async_exceptions(false); |
2278 } | 2279 } |
2279 } | 2280 } |
2280 | 2281 |
2282 // This is a variant of the normal | |
2283 // check_special_condition_for_native_trans with slightly different | |
2284 // semantics for use by critical native wrappers. It does all the | |
2285 // normal checks but also performs the transition back into | |
2286 // thread_in_Java state. This is required so that critical natives | |
2287 // can potentially block and perform a GC if they are the last thread | |
2288 // exiting the GC_locker. | |
2289 void JavaThread::check_special_condition_for_native_trans_and_transition(JavaThread *thread) { | |
2290 check_special_condition_for_native_trans(thread); | |
2291 | |
2292 // Finish the transition | |
2293 thread->set_thread_state(_thread_in_Java); | |
2294 | |
2295 if (thread->do_critical_native_unlock()) { | |
2296 ThreadInVMfromJavaNoAsyncException tiv(thread); | |
2297 GC_locker::unlock_critical(thread); | |
2298 thread->clear_critical_native_unlock(); | |
2299 } | |
2300 } | |
2301 | |
2281 // We need to guarantee the Threads_lock here, since resumes are not | 2302 // We need to guarantee the Threads_lock here, since resumes are not |
2282 // allowed during safepoint synchronization | 2303 // allowed during safepoint synchronization |
2283 // Can only resume from an external suspension | 2304 // Can only resume from an external suspension |
2284 void JavaThread::java_resume() { | 2305 void JavaThread::java_resume() { |
2285 assert_locked_or_safepoint(Threads_lock); | 2306 assert_locked_or_safepoint(Threads_lock); |