changeset 1598:428a9c451986

6935466: new CodeCache flushing code is not guarded by the flag Summary: Add missing guard. Reviewed-by: never
author kvn
date Tue, 16 Mar 2010 15:35:33 -0700
parents 9eba43136cb5
children fc2c71045ada
files src/share/vm/compiler/compileBroker.cpp
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/compiler/compileBroker.cpp	Tue Mar 16 11:52:17 2010 +0100
+++ b/src/share/vm/compiler/compileBroker.cpp	Tue Mar 16 15:35:33 2010 -0700
@@ -988,10 +988,12 @@
     }
     if (method->is_not_compilable(comp_level)) return NULL;
 
-    nmethod* saved = CodeCache::find_and_remove_saved_code(method());
-    if (saved != NULL) {
-      method->set_code(method, saved);
-      return saved;
+    if (UseCodeCacheFlushing) {
+      nmethod* saved = CodeCache::find_and_remove_saved_code(method());
+      if (saved != NULL) {
+        method->set_code(method, saved);
+        return saved;
+      }
     }
 
   } else {