comparison src/share/vm/compiler/compileBroker.cpp @ 20589:0c0e68524c17

8042570: Excessive number of tests timing out on nightly testing due to fix for 8040798 Summary: Remove unnecessary lock in CompileBroker::mark_on_stack() that causes the deadlock Reviewed-by: kvn, dcubed
author anoll
date Wed, 07 May 2014 22:06:42 +0200
parents 41dcdd636080
children c47fcf523fff
comparison
equal deleted inserted replaced
20588:41dcdd636080 20589:0c0e68524c17
1126 } 1126 }
1127 1127
1128 1128
1129 /** 1129 /**
1130 * Set the methods on the stack as on_stack so that redefine classes doesn't 1130 * Set the methods on the stack as on_stack so that redefine classes doesn't
1131 * reclaim them 1131 * reclaim them. This method is executed at a safepoint.
1132 */ 1132 */
1133 void CompileBroker::mark_on_stack() { 1133 void CompileBroker::mark_on_stack() {
1134 assert(SafepointSynchronize::is_at_safepoint(), "sanity check");
1135 // Since we are at a safepoint, we do not need a lock to access
1136 // the compile queues.
1134 if (_c2_compile_queue != NULL) { 1137 if (_c2_compile_queue != NULL) {
1135 MutexLocker locker(_c2_compile_queue->lock());
1136 _c2_compile_queue->mark_on_stack(); 1138 _c2_compile_queue->mark_on_stack();
1137 } 1139 }
1138 if (_c1_compile_queue != NULL) { 1140 if (_c1_compile_queue != NULL) {
1139 MutexLocker locker(_c1_compile_queue->lock());
1140 _c1_compile_queue->mark_on_stack(); 1141 _c1_compile_queue->mark_on_stack();
1141 } 1142 }
1142 } 1143 }
1143 1144
1144 // ------------------------------------------------------------------ 1145 // ------------------------------------------------------------------