src/hotspot/share/runtime/thread.cpp
changeset 52431 b0af758a092c
parent 52386 e256b3b62e20
child 52569 1a534c7926cc
equal deleted inserted replaced
52430:4ee78b5583f9 52431:b0af758a092c
    59 #include "oops/typeArrayOop.inline.hpp"
    59 #include "oops/typeArrayOop.inline.hpp"
    60 #include "oops/verifyOopClosure.hpp"
    60 #include "oops/verifyOopClosure.hpp"
    61 #include "prims/jvm_misc.hpp"
    61 #include "prims/jvm_misc.hpp"
    62 #include "prims/jvmtiExport.hpp"
    62 #include "prims/jvmtiExport.hpp"
    63 #include "prims/jvmtiThreadState.hpp"
    63 #include "prims/jvmtiThreadState.hpp"
    64 #include "prims/privilegedStack.hpp"
       
    65 #include "runtime/arguments.hpp"
    64 #include "runtime/arguments.hpp"
    66 #include "runtime/atomic.hpp"
    65 #include "runtime/atomic.hpp"
    67 #include "runtime/biasedLocking.hpp"
    66 #include "runtime/biasedLocking.hpp"
    68 #include "runtime/fieldDescriptor.inline.hpp"
    67 #include "runtime/fieldDescriptor.inline.hpp"
    69 #include "runtime/flags/jvmFlagConstraintList.hpp"
    68 #include "runtime/flags/jvmFlagConstraintList.hpp"
  1556   set_monitor_chunks(NULL);
  1555   set_monitor_chunks(NULL);
  1557   set_next(NULL);
  1556   set_next(NULL);
  1558   _on_thread_list = false;
  1557   _on_thread_list = false;
  1559   set_thread_state(_thread_new);
  1558   set_thread_state(_thread_new);
  1560   _terminated = _not_terminated;
  1559   _terminated = _not_terminated;
  1561   _privileged_stack_top = NULL;
       
  1562   _array_for_gc = NULL;
  1560   _array_for_gc = NULL;
  1563   _suspend_equivalent = false;
  1561   _suspend_equivalent = false;
  1564   _in_deopt_handler = 0;
  1562   _in_deopt_handler = 0;
  1565   _doing_unsafe_access = false;
  1563   _doing_unsafe_access = false;
  1566   _stack_guard_state = stack_guard_unused;
  1564   _stack_guard_state = stack_guard_unused;
  1988     assert(!this->has_pending_exception(), "release_monitors should have cleared");
  1986     assert(!this->has_pending_exception(), "release_monitors should have cleared");
  1989   }
  1987   }
  1990 
  1988 
  1991   // These things needs to be done while we are still a Java Thread. Make sure that thread
  1989   // These things needs to be done while we are still a Java Thread. Make sure that thread
  1992   // is in a consistent state, in case GC happens
  1990   // is in a consistent state, in case GC happens
  1993   assert(_privileged_stack_top == NULL, "must be NULL when we get here");
       
  1994 
  1991 
  1995   if (active_handles() != NULL) {
  1992   if (active_handles() != NULL) {
  1996     JNIHandleBlock* block = active_handles();
  1993     JNIHandleBlock* block = active_handles();
  1997     set_active_handles(NULL);
  1994     set_active_handles(NULL);
  1998     JNIHandleBlock::release_block(block);
  1995     JNIHandleBlock::release_block(block);
  2837          (has_last_Java_frame() && java_call_counter() > 0), "wrong java_sp info!");
  2834          (has_last_Java_frame() && java_call_counter() > 0), "wrong java_sp info!");
  2838 
  2835 
  2839   if (has_last_Java_frame()) {
  2836   if (has_last_Java_frame()) {
  2840     // Record JavaThread to GC thread
  2837     // Record JavaThread to GC thread
  2841     RememberProcessedThread rpt(this);
  2838     RememberProcessedThread rpt(this);
  2842 
       
  2843     // Traverse the privileged stack
       
  2844     if (_privileged_stack_top != NULL) {
       
  2845       _privileged_stack_top->oops_do(f);
       
  2846     }
       
  2847 
  2839 
  2848     // traverse the registered growable array
  2840     // traverse the registered growable array
  2849     if (_array_for_gc != NULL) {
  2841     if (_array_for_gc != NULL) {
  2850       for (int index = 0; index < _array_for_gc->length(); index++) {
  2842       for (int index = 0; index < _array_for_gc->length(); index++) {
  2851         f->do_oop(_array_for_gc->adr_at(index));
  2843         f->do_oop(_array_for_gc->adr_at(index));