[vmkit-commits] [PATCH] Remove System.err.println from mmtk stuff to fix dep on bootstrap

Will Dietz wdietz2 at illinois.edu
Thu Nov 3 07:48:04 PDT 2011


Inlined below.

This change seems benign, but I'm not sure if it's masking some other
bug I should be concerned about.

Patch primarily a discussion point, although could be committed too
(since it's rather minor).

FWIW, with this patch (and the previous ones), we can build a
OpenJDK-based VMKit that can run many simple codes, and on larger
codes seems to only fail when encountering some of the many NYI()'d
(or intentionally unimplemented) pieces.  Which is kinda neat! :)

In the future I hope to focus on getting it to run various codes
better (dacapo being my big goal, but not the full story), and try to
generally improve misc behavior compatibility/compliance-wise :).

Thanks!

~Will

>From 0462e91eb86e28c00707c40d624853eb51679904 Mon Sep 17 00:00:00 2001
From: Will Dietz <w at wdtz.org>
Date: Wed, 2 Nov 2011 23:02:45 -0500
Subject: [PATCH 15/17] Remove System.err.println from mmtk stuff to fix dep
 on bootstrap

Not entirely sure, but with these present we get linker errors with
libFinalMMtk.a on misc pieces that are pulled in from System.err,
  namely things like sun.nio.cs.StreamEncoder.

On one hand this seems like an undiagnosed failure of the precompilation,
   however we're not trying to build System.err things while
   compiling mmtk, and this change is relatively minor.
---
 mmtk/java/src/org/j3/mmtk/BuildTimeConfig.java |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mmtk/java/src/org/j3/mmtk/BuildTimeConfig.java
b/mmtk/java/src/org/j3/mmtk/BuildTimeConfig.java
index 8dc8f82..9f90b8e 100644
--- a/mmtk/java/src/org/j3/mmtk/BuildTimeConfig.java
+++ b/mmtk/java/src/org/j3/mmtk/BuildTimeConfig.java
@@ -53,7 +53,7 @@ public final class BuildTimeConfig extends
org.mmtk.vm.BuildTimeConfig {
     if (default_property_file == null) {
       propFileName = System.getProperty(property_file_property);
       if (propFileName == null) {
-        System.err.println(property_file_property+" must specify a
properties file");
+        //System.err.println(property_file_property+" must specify a
properties file");
         VM.sysExit(1);
       }
     } else {
@@ -67,7 +67,7 @@ public final class BuildTimeConfig extends
org.mmtk.vm.BuildTimeConfig {
       propFileStream.close();
     } catch (FileNotFoundException e) {
       if (!propFileName.equals(default_property_file)) {
-        System.err.println(propFileName+" not found.");
+        //System.err.println(propFileName+" not found.");
         VM.sysExit(1);
       }
     } catch (IOException e) {
-- 
1.7.5.1



More information about the vmkit-commits mailing list