src/share/vm/runtime/sweeper.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/runtime/sweeper.cpp Tue Feb 14 12:51:42 2012
--- new/src/share/vm/runtime/sweeper.cpp Tue Feb 14 12:51:42 2012
*** 1,7 ****
--- 1,7 ----
/*
! * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
! * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 264,274 ****
--- 264,280 ----
{
MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
// The last invocation iterates until there are no more nmethods
for (int i = 0; (i < todo || _invocations == 1) && _current != NULL; i++) {
+ if (SafepointSynchronize::is_synchronizing()) { // Safepoint request
+ if (PrintMethodFlushing && Verbose) {
+ tty->print_cr("### Sweep at %d out of %d, aborting due to safepoint request", CodeCache::nof_nmethods(), _invocations);
+ }
+ _invocations++; // Restart this iteration later
+ break; // Bail out
+ }
// Since we will give up the CodeCache_lock, always skip ahead
// to the next nmethod. Other blobs can be deleted by other
// threads but nmethods are only reclaimed by the sweeper.
nmethod* next = CodeCache::next_nmethod(_current);
src/share/vm/runtime/sweeper.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File