8222300: Zero build broken after JDK-8222231
authoraoqi
Wed, 10 Apr 2019 22:41:28 -0400
changeset 54498 4eefc9f3313c
parent 54497 96230a5ef2ec
child 54499 3ea8b5858874
8222300: Zero build broken after JDK-8222231 Reviewed-by: dholmes
src/hotspot/cpu/zero/cppInterpreter_zero.cpp
--- a/src/hotspot/cpu/zero/cppInterpreter_zero.cpp	Wed Apr 10 17:29:03 2019 -0700
+++ b/src/hotspot/cpu/zero/cppInterpreter_zero.cpp	Wed Apr 10 22:41:28 2019 -0400
@@ -371,14 +371,12 @@
   intptr_t result[4 - LogBytesPerWord];
   ffi_call(handler->cif(), (void (*)()) function, result, arguments);
 
-  // Change the thread state back to _thread_in_Java.
+  // Change the thread state back to _thread_in_Java and ensure it
+  // is seen by the GC thread.
   // ThreadStateTransition::transition_from_native() cannot be used
   // here because it does not check for asynchronous exceptions.
   // We have to manage the transition ourself.
-  thread->set_thread_state(_thread_in_native_trans);
-
-  // Make sure new state is visible in the GC thread
-  InterfaceSupport::serialize_thread_state(thread);
+  thread->set_thread_state_fence(_thread_in_native_trans);
 
   // Handle safepoint operations, pending suspend requests,
   // and pending asynchronous exceptions.