mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8032223: nsk/regression/b4663146 gets assert(SafepointSynchronize::is_at_safepoint() || JvmtiEnv::is_thread_fully_suspended(get_thread(), false, &debug_bits))
It is better to calculate frame count for suspended threads at a safepoint Reviewed-by: twisti, dsamersoff, sla, dholmes, dcubed
This commit is contained in:
parent
731320a7fd
commit
465cfd7c01
2 changed files with 18 additions and 7 deletions
|
@ -533,7 +533,11 @@ public:
|
|||
VMOp_Type type() const { return VMOp_GetFrameCount; }
|
||||
jvmtiError result() { return _result; }
|
||||
void doit() {
|
||||
_result = ((JvmtiEnvBase*)_env)->get_frame_count(_state, _count_ptr);
|
||||
_result = JVMTI_ERROR_THREAD_NOT_ALIVE;
|
||||
JavaThread* jt = _state->get_thread();
|
||||
if (Threads::includes(jt) && !jt->is_exiting() && jt->threadObj() != NULL) {
|
||||
_result = ((JvmtiEnvBase*)_env)->get_frame_count(_state, _count_ptr);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -559,8 +563,12 @@ public:
|
|||
VMOp_Type type() const { return VMOp_GetFrameLocation; }
|
||||
jvmtiError result() { return _result; }
|
||||
void doit() {
|
||||
_result = ((JvmtiEnvBase*)_env)->get_frame_location(_java_thread, _depth,
|
||||
_method_ptr, _location_ptr);
|
||||
_result = JVMTI_ERROR_THREAD_NOT_ALIVE;
|
||||
if (Threads::includes(_java_thread) && !_java_thread->is_exiting() &&
|
||||
_java_thread->threadObj() != NULL) {
|
||||
_result = ((JvmtiEnvBase*)_env)->get_frame_location(_java_thread, _depth,
|
||||
_method_ptr, _location_ptr);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue