equal
deleted
inserted
replaced
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" |
1535 set_monitor_chunks(NULL); |
1534 set_monitor_chunks(NULL); |
1536 set_next(NULL); |
1535 set_next(NULL); |
1537 _on_thread_list = false; |
1536 _on_thread_list = false; |
1538 set_thread_state(_thread_new); |
1537 set_thread_state(_thread_new); |
1539 _terminated = _not_terminated; |
1538 _terminated = _not_terminated; |
1540 _privileged_stack_top = NULL; |
|
1541 _array_for_gc = NULL; |
1539 _array_for_gc = NULL; |
1542 _suspend_equivalent = false; |
1540 _suspend_equivalent = false; |
1543 _in_deopt_handler = 0; |
1541 _in_deopt_handler = 0; |
1544 _doing_unsafe_access = false; |
1542 _doing_unsafe_access = false; |
1545 _stack_guard_state = stack_guard_unused; |
1543 _stack_guard_state = stack_guard_unused; |
1969 assert(!this->has_pending_exception(), "release_monitors should have cleared"); |
1967 assert(!this->has_pending_exception(), "release_monitors should have cleared"); |
1970 } |
1968 } |
1971 |
1969 |
1972 // These things needs to be done while we are still a Java Thread. Make sure that thread |
1970 // These things needs to be done while we are still a Java Thread. Make sure that thread |
1973 // is in a consistent state, in case GC happens |
1971 // is in a consistent state, in case GC happens |
1974 assert(_privileged_stack_top == NULL, "must be NULL when we get here"); |
|
1975 |
1972 |
1976 if (active_handles() != NULL) { |
1973 if (active_handles() != NULL) { |
1977 JNIHandleBlock* block = active_handles(); |
1974 JNIHandleBlock* block = active_handles(); |
1978 set_active_handles(NULL); |
1975 set_active_handles(NULL); |
1979 JNIHandleBlock::release_block(block); |
1976 JNIHandleBlock::release_block(block); |
2818 (has_last_Java_frame() && java_call_counter() > 0), "wrong java_sp info!"); |
2815 (has_last_Java_frame() && java_call_counter() > 0), "wrong java_sp info!"); |
2819 |
2816 |
2820 if (has_last_Java_frame()) { |
2817 if (has_last_Java_frame()) { |
2821 // Record JavaThread to GC thread |
2818 // Record JavaThread to GC thread |
2822 RememberProcessedThread rpt(this); |
2819 RememberProcessedThread rpt(this); |
2823 |
|
2824 // Traverse the privileged stack |
|
2825 if (_privileged_stack_top != NULL) { |
|
2826 _privileged_stack_top->oops_do(f); |
|
2827 } |
|
2828 |
2820 |
2829 // traverse the registered growable array |
2821 // traverse the registered growable array |
2830 if (_array_for_gc != NULL) { |
2822 if (_array_for_gc != NULL) { |
2831 for (int index = 0; index < _array_for_gc->length(); index++) { |
2823 for (int index = 0; index < _array_for_gc->length(); index++) { |
2832 f->do_oop(_array_for_gc->adr_at(index)); |
2824 f->do_oop(_array_for_gc->adr_at(index)); |