src/share/vm/code/codeCache.cpp

changeset 5038
0cfa93c2fcc4
parent 4952
a7fb14888912
child 5151
91eba9f82325
     1.1 --- a/src/share/vm/code/codeCache.cpp	Fri Apr 26 14:41:10 2013 -0700
     1.2 +++ b/src/share/vm/code/codeCache.cpp	Mon Apr 29 13:20:19 2013 +0200
     1.3 @@ -463,8 +463,10 @@
     1.4  }
     1.5  #endif //PRODUCT
     1.6  
     1.7 -
     1.8 -nmethod* CodeCache::find_and_remove_saved_code(Method* m) {
     1.9 +/**
    1.10 + * Remove and return nmethod from the saved code list in order to reanimate it.
    1.11 + */
    1.12 +nmethod* CodeCache::reanimate_saved_code(Method* m) {
    1.13    MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
    1.14    nmethod* saved = _saved_nmethods;
    1.15    nmethod* prev = NULL;
    1.16 @@ -479,7 +481,7 @@
    1.17        saved->set_speculatively_disconnected(false);
    1.18        saved->set_saved_nmethod_link(NULL);
    1.19        if (PrintMethodFlushing) {
    1.20 -        saved->print_on(tty, " ### nmethod is reconnected\n");
    1.21 +        saved->print_on(tty, " ### nmethod is reconnected");
    1.22        }
    1.23        if (LogCompilation && (xtty != NULL)) {
    1.24          ttyLocker ttyl;
    1.25 @@ -496,6 +498,9 @@
    1.26    return NULL;
    1.27  }
    1.28  
    1.29 +/**
    1.30 + * Remove nmethod from the saved code list in order to discard it permanently
    1.31 + */
    1.32  void CodeCache::remove_saved_code(nmethod* nm) {
    1.33    // For conc swpr this will be called with CodeCache_lock taken by caller
    1.34    assert_locked_or_safepoint(CodeCache_lock);
    1.35 @@ -529,7 +534,7 @@
    1.36    nm->set_saved_nmethod_link(_saved_nmethods);
    1.37    _saved_nmethods = nm;
    1.38    if (PrintMethodFlushing) {
    1.39 -    nm->print_on(tty, " ### nmethod is speculatively disconnected\n");
    1.40 +    nm->print_on(tty, " ### nmethod is speculatively disconnected");
    1.41    }
    1.42    if (LogCompilation && (xtty != NULL)) {
    1.43      ttyLocker ttyl;

mercurial