--- a/hotspot/src/share/vm/prims/jvmtiEnvThreadState.cpp Sat Mar 01 01:36:48 2014 -0800
+++ b/hotspot/src/share/vm/prims/jvmtiEnvThreadState.cpp Sat Mar 01 08:05:55 2014 -0800
@@ -190,12 +190,8 @@
JvmtiFramePops* JvmtiEnvThreadState::get_frame_pops() {
-#ifdef ASSERT
- uint32_t debug_bits = 0;
-#endif
- assert(get_thread() == Thread::current() || JvmtiEnv::is_thread_fully_suspended(get_thread(), false, &debug_bits),
- "frame pop data only accessible from same thread or while suspended");
-
+ assert(get_thread() == Thread::current() || SafepointSynchronize::is_at_safepoint(),
+ "frame pop data only accessible from same thread or at safepoint");
if (_frame_pops == NULL) {
_frame_pops = new JvmtiFramePops();
assert(_frame_pops != NULL, "_frame_pops != NULL");
@@ -209,44 +205,32 @@
}
void JvmtiEnvThreadState::set_frame_pop(int frame_number) {
-#ifdef ASSERT
- uint32_t debug_bits = 0;
-#endif
- assert(get_thread() == Thread::current() || JvmtiEnv::is_thread_fully_suspended(get_thread(), false, &debug_bits),
- "frame pop data only accessible from same thread or while suspended");
+ assert(get_thread() == Thread::current() || SafepointSynchronize::is_at_safepoint(),
+ "frame pop data only accessible from same thread or at safepoint");
JvmtiFramePop fpop(frame_number);
JvmtiEventController::set_frame_pop(this, fpop);
}
void JvmtiEnvThreadState::clear_frame_pop(int frame_number) {
-#ifdef ASSERT
- uint32_t debug_bits = 0;
-#endif
- assert(get_thread() == Thread::current() || JvmtiEnv::is_thread_fully_suspended(get_thread(), false, &debug_bits),
- "frame pop data only accessible from same thread or while suspended");
+ assert(get_thread() == Thread::current() || SafepointSynchronize::is_at_safepoint(),
+ "frame pop data only accessible from same thread or at safepoint");
JvmtiFramePop fpop(frame_number);
JvmtiEventController::clear_frame_pop(this, fpop);
}
void JvmtiEnvThreadState::clear_to_frame_pop(int frame_number) {
-#ifdef ASSERT
- uint32_t debug_bits = 0;
-#endif
- assert(get_thread() == Thread::current() || JvmtiEnv::is_thread_fully_suspended(get_thread(), false, &debug_bits),
- "frame pop data only accessible from same thread or while suspended");
+ assert(get_thread() == Thread::current() || SafepointSynchronize::is_at_safepoint(),
+ "frame pop data only accessible from same thread or at safepoint");
JvmtiFramePop fpop(frame_number);
JvmtiEventController::clear_to_frame_pop(this, fpop);
}
bool JvmtiEnvThreadState::is_frame_pop(int cur_frame_number) {
-#ifdef ASSERT
- uint32_t debug_bits = 0;
-#endif
- assert(get_thread() == Thread::current() || JvmtiEnv::is_thread_fully_suspended(get_thread(), false, &debug_bits),
- "frame pop data only accessible from same thread or while suspended");
+ assert(get_thread() == Thread::current() || SafepointSynchronize::is_at_safepoint(),
+ "frame pop data only accessible from same thread or at safepoint");
if (!get_thread()->is_interp_only_mode() || _frame_pops == NULL) {
return false;
}