changeset 1462:1845386f5403

Full GC after bootstrap. Disable IRChecker by default. Disable compiled method logging by default.
author Thomas Wuerthinger <wuerthinger@ssw.jku.at>
date Sat, 13 Nov 2010 21:11:28 +0100
parents 944071972cd9
children 7bc14f75a077
files c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/VMExitsNative.java src/share/vm/c1x/c1x_CodeInstaller.cpp src/share/vm/compiler/compileBroker.cpp
diffstat 3 files changed, 20 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/VMExitsNative.java	Sat Nov 13 19:58:27 2010 +0100
+++ b/c1x4hotspotsrc/HotSpotVM/src/com/sun/hotspot/c1x/VMExitsNative.java	Sat Nov 13 21:11:28 2010 +0100
@@ -37,6 +37,7 @@
  */
 public class VMExitsNative implements VMExits {
 
+    public static final boolean LogCompiledMethods = false;
     public static boolean compileMethods = true;
 
     /**
@@ -47,6 +48,7 @@
         C1XOptions.OptInlineExcept = false;
         C1XOptions.OptInlineSynchronized = false;
         C1XOptions.UseDeopt = false;
+        C1XOptions.IRChecking = false;
     }
 
     @Override
@@ -126,8 +128,10 @@
             Compiler compiler = Compiler.getInstance();
             HotSpotMethodResolved riMethod = new HotSpotMethodResolved(methodVmId, name);
             CiResult result = compiler.getCompiler().compileMethod(riMethod, -1, null);
-            String qualifiedName = CiUtil.toJavaName(riMethod.holder()) + "::" + riMethod.name();
-            compiledMethods.add(qualifiedName);
+            if (LogCompiledMethods) {
+                String qualifiedName = CiUtil.toJavaName(riMethod.holder()) + "::" + riMethod.name();
+                compiledMethods.add(qualifiedName);
+            }
 
             if (result.bailout() != null) {
                 StringWriter out = new StringWriter();
--- a/src/share/vm/c1x/c1x_CodeInstaller.cpp	Sat Nov 13 19:58:27 2010 +0100
+++ b/src/share/vm/c1x/c1x_CodeInstaller.cpp	Sat Nov 13 21:11:28 2010 +0100
@@ -131,6 +131,7 @@
     ShouldNotReachHere();
   } else {
     value->klass()->print();
+    value->print();
     ShouldNotReachHere();
   }
 }
--- a/src/share/vm/compiler/compileBroker.cpp	Sat Nov 13 19:58:27 2010 +0100
+++ b/src/share/vm/compiler/compileBroker.cpp	Sat Nov 13 21:11:28 2010 +0100
@@ -540,6 +540,7 @@
 
 // Bootstrap the C1X compiler. Compiles all methods until compile queue is empty and no compilation is active.
 void CompileBroker::bootstrap_c1x() {
+  HandleMark hm;
   Thread* THREAD = Thread::current();
   tty->print_cr("Bootstrapping C1X...");
 
@@ -547,16 +548,15 @@
   if (compiler == NULL) fatal("must use flag -XX:+UseC1X");
 
   jlong start = os::javaTimeMillis();
-  {
-    HandleMark hm;
-    instanceKlass* klass = (instanceKlass*)SystemDictionary::Object_klass()->klass_part();
-    methodOop method = klass->find_method(vmSymbols::object_initializer_name(), vmSymbols::void_method_signature());
-    CompileBroker::compile_method(method, -1, method, 0, "initial compile of object initializer", THREAD);
-    if (HAS_PENDING_EXCEPTION) {
-      CLEAR_PENDING_EXCEPTION;
-      fatal("error inserting object initializer into compile queue");
-    }
+
+  instanceKlass* klass = (instanceKlass*)SystemDictionary::Object_klass()->klass_part();
+  methodOop method = klass->find_method(vmSymbols::object_initializer_name(), vmSymbols::void_method_signature());
+  CompileBroker::compile_method(method, -1, method, 0, "initial compile of object initializer", THREAD);
+  if (HAS_PENDING_EXCEPTION) {
+    CLEAR_PENDING_EXCEPTION;
+    fatal("error inserting object initializer into compile queue");
   }
+
   int z = 0;
   while (true) {
     {
@@ -595,6 +595,10 @@
     }
     ++z;
   }
+
+  // Do a full garbage collection.
+  Universe::heap()->collect(GCCause::_java_lang_system_gc);
+
   jlong diff = os::javaTimeMillis() - start;
   tty->print_cr("Finished bootstrap in %d ms", diff);
   if (CITime) CompileBroker::print_times();