8183198: Factor out thread state serialization into a proper helper function

Reviewed-by: tschatzl, eosterlund, coleenp
This commit is contained in:
Mikael Gerdin 2017-06-26 15:25:25 +02:00
parent cf0d8c433e
commit d39a34d689
10 changed files with 50 additions and 233 deletions

View file

@ -378,14 +378,7 @@ int CppInterpreter::native_entry(Method* method, intptr_t UNUSED, TRAPS) {
thread->set_thread_state(_thread_in_native_trans);
// Make sure new state is visible in the GC thread
if (os::is_MP()) {
if (UseMembar) {
OrderAccess::fence();
}
else {
InterfaceSupport::serialize_memory(thread);
}
}
InterfaceSupport::serialize_thread_state(thread);
// Handle safepoint operations, pending suspend requests,
// and pending asynchronous exceptions.