1.1 --- a/src/share/vm/code/nmethod.cpp Wed Sep 23 23:56:15 2009 -0700 1.2 +++ b/src/share/vm/code/nmethod.cpp Wed Sep 23 23:57:44 2009 -0700 1.3 @@ -1558,13 +1558,12 @@ 1.4 // the (strong) marking phase, and then again when walking 1.5 // the code cache contents during the weak roots processing 1.6 // phase. The two uses are distinguished by means of the 1.7 -// do_nmethods() method in the closure "f" below -- which 1.8 -// answers "yes" in the first case, and "no" in the second 1.9 +// 'do_strong_roots_only' flag, which is true in the first 1.10 // case. We want to walk the weak roots in the nmethod 1.11 // only in the second case. The weak roots in the nmethod 1.12 // are the oops in the ExceptionCache and the InlineCache 1.13 // oops. 1.14 -void nmethod::oops_do(OopClosure* f) { 1.15 +void nmethod::oops_do(OopClosure* f, bool do_strong_roots_only) { 1.16 // make sure the oops ready to receive visitors 1.17 assert(!is_zombie() && !is_unloaded(), 1.18 "should not call follow on zombie or unloaded nmethod"); 1.19 @@ -1582,7 +1581,7 @@ 1.20 1.21 // Compiled code 1.22 f->do_oop((oop*) &_method); 1.23 - if (!f->do_nmethods()) { 1.24 + if (!do_strong_roots_only) { 1.25 // weak roots processing phase -- update ExceptionCache oops 1.26 ExceptionCache* ec = exception_cache(); 1.27 while(ec != NULL) {