diff src/share/vm/code/nmethod.cpp @ 994:753cf9794df9

6885169: merge of 4957990 and 6863023 causes conflict on do_nmethods Summary: After mechanically merging changes, some by-hand adjustments are needed. Reviewed-by: ysr
author jrose
date Wed, 23 Sep 2009 23:57:44 -0700
parents 54b3b351d6f9
children 032260830071
line wrap: on
line diff
--- a/src/share/vm/code/nmethod.cpp	Wed Sep 23 23:56:15 2009 -0700
+++ b/src/share/vm/code/nmethod.cpp	Wed Sep 23 23:57:44 2009 -0700
@@ -1558,13 +1558,12 @@
 // the (strong) marking phase, and then again when walking
 // the code cache contents during the weak roots processing
 // phase. The two uses are distinguished by means of the
-// do_nmethods() method in the closure "f" below -- which
-// answers "yes" in the first case, and "no" in the second
+// 'do_strong_roots_only' flag, which is true in the first
 // case. We want to walk the weak roots in the nmethod
 // only in the second case. The weak roots in the nmethod
 // are the oops in the ExceptionCache and the InlineCache
 // oops.
-void nmethod::oops_do(OopClosure* f) {
+void nmethod::oops_do(OopClosure* f, bool do_strong_roots_only) {
   // make sure the oops ready to receive visitors
   assert(!is_zombie() && !is_unloaded(),
          "should not call follow on zombie or unloaded nmethod");
@@ -1582,7 +1581,7 @@
 
   // Compiled code
   f->do_oop((oop*) &_method);
-  if (!f->do_nmethods()) {
+  if (!do_strong_roots_only) {
     // weak roots processing phase -- update ExceptionCache oops
     ExceptionCache* ec = exception_cache();
     while(ec != NULL) {