src/share/vm/compiler/compileBroker.cpp

changeset 7303
0c0e68524c17
parent 7302
41dcdd636080
child 7304
c47fcf523fff
     1.1 --- a/src/share/vm/compiler/compileBroker.cpp	Tue Apr 29 07:59:22 2014 +0200
     1.2 +++ b/src/share/vm/compiler/compileBroker.cpp	Wed May 07 22:06:42 2014 +0200
     1.3 @@ -1128,15 +1128,16 @@
     1.4  
     1.5  /**
     1.6   * Set the methods on the stack as on_stack so that redefine classes doesn't
     1.7 - * reclaim them
     1.8 + * reclaim them. This method is executed at a safepoint.
     1.9   */
    1.10  void CompileBroker::mark_on_stack() {
    1.11 +  assert(SafepointSynchronize::is_at_safepoint(), "sanity check");
    1.12 +  // Since we are at a safepoint, we do not need a lock to access
    1.13 +  // the compile queues.
    1.14    if (_c2_compile_queue != NULL) {
    1.15 -    MutexLocker locker(_c2_compile_queue->lock());
    1.16      _c2_compile_queue->mark_on_stack();
    1.17    }
    1.18    if (_c1_compile_queue != NULL) {
    1.19 -    MutexLocker locker(_c1_compile_queue->lock());
    1.20      _c1_compile_queue->mark_on_stack();
    1.21    }
    1.22  }

mercurial