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

Will Dietz wdietz2 at illinois.edu
Mon Nov 7 13:02:39 PST 2011


On Fri, Nov 4, 2011 at 5:06 PM, Nicolas Geoffray
<nicolas.geoffray at gmail.com> wrote:
> Hi Will,
>
> On Thu, Nov 3, 2011 at 3:48 PM, Will Dietz <wdietz2 at illinois.edu> wrote:
>>
>> 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! :)
>
> Definitely! That's a giant step! Any plans on sending the instructions on
> which OpenJDK to use? How to configure, etc? :)

I'd love to get that ball rolling, although I'm a bit limited by what
versions I've tested against, and proprietary vs IcedTea.  That said,
I naively expect this to work more or less on any version of OpenJDK
"1.6", as well as with Sun's proprietary 1.6 builds (which is actually
what I test against mostly since it's what I have installed globally).

I'll draft some instructions and try them on a few machines I have
access to you and send them to the list :).

Haven't tried the OpenJDK stuff on a Mac at all, maybe I'll give that
a go too...

>>
>> 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 :).
>
> Big encouragements for getting dacapo to run, especially all benchmarks of
> the latest version (which do not run on GNU Classpath).
> There is also SpecJVM2008 I think, that anyone can download. It'd be neat to
> have that running too :)
>

Indeed.  Unfortunately looks like SpecJVM2008 needs awt, which was unexpected.

awt presently segfaults when it tries to call back into the JVM_
methods from native code-- the way it calls them is different than the
way they're called from java code, and results in failures.  Bummer,
will look into this more once other things work better (pure java
code, like dacapo, for example).

>>
>> 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.
>
> This may just be a limitation of the AOT compiler, which pulls out more than
> it actually needs. I'd be interested to see the error messages if you still
> have them.
>

I just tried this now, errors appended to end of this message.

> Patch is fine to commit because it just touches mmtk/src/org/j3 files. Note
> that if it were to touch other mmtk/src/org files, it wouldn't be as fine
> because it's code that is imported from mmtk. And this code we should try to
> not deviate from it, to avoid merge conflicts.

Okay, understood.  Committed, thanks!

> Again, that's a great step forward! Nice work. I'm looking forward to see
> all the dacapo benchmarks run on vmkit :)
> Nicolas

Heh, me too, although it's slow going :).

~Will

Errors emitted without this patch:
==============================================
BUILD SUCCESSFUL
Total time: 5 seconds
llvm[2]: Building Release+Asserts mmtk-vmkit.jar all
WARNING: Linking two modules of different data layouts!
make[2]: Leaving directory
`/home/will/llvm/tot/llvm-objects-32/projects/vmkit/mmtk/java'
make[2]: Entering directory
`/home/will/llvm/tot/llvm-objects-32/projects/vmkit/mmtk/inline'
llvm[2]: Compiling InlineMethods.cpp for Release+Asserts build (bytecode)
llvm[2]: Compiling InlineMethods.ll to InlineMethods.bc for
Release+Asserts build (bytecode)
llvm[2]: Compiling InlineMethods.bc to InlineMethods.s for Release+Asserts build
llvm[2]: Compiling InlineMethods.s for Release+Asserts build
llvm[2]: Building Release+Asserts Archive Library libInlineMMTk.a
make[2]: Leaving directory
`/home/will/llvm/tot/llvm-objects-32/projects/vmkit/mmtk/inline'
make[1]: Leaving directory
`/home/will/llvm/tot/llvm-objects-32/projects/vmkit/mmtk'
make[1]: Entering directory
`/home/will/llvm/tot/llvm-objects-32/projects/vmkit/tools/precompiler'
llvm[1]: Compiling Precompiler.cpp for Release+Asserts build
llvm[1]: Linking Release+Asserts executable precompiler (without symbols)
/home/will/llvm/tot/llvm-objects-32/projects/vmkit/Release+Asserts/lib/libFinalMMTk.a(FinalMMTk.o):/home/will/llvm/tot/llvm-objects-32/projects/vmkit/Release+Asserts/lib/FinalMMTk.bc:function
sun_nio_cs_StreamEncoder_VT: error: undefined reference to
'sun_nio_cs_StreamEncoder'
/home/will/llvm/tot/llvm-objects-32/projects/vmkit/Release+Asserts/lib/libFinalMMTk.a(FinalMMTk.o):/home/will/llvm/tot/llvm-objects-32/projects/vmkit/Release+Asserts/lib/FinalMMTk.bc:function
sun_nio_cs_ISO_18859_11_VT: error: undefined reference to
'sun_nio_cs_ISO_18859_11'
/home/will/llvm/tot/llvm-objects-32/projects/vmkit/Release+Asserts/lib/libFinalMMTk.a(FinalMMTk.o):/home/will/llvm/tot/llvm-objects-32/projects/vmkit/Release+Asserts/lib/FinalMMTk.bc:function
sun_nio_cs_HistoricallyNamedCharset_VT: error: undefined reference to
'sun_nio_cs_HistoricallyNamedCharset'
/home/will/llvm/tot/llvm-objects-32/projects/vmkit/Release+Asserts/lib/libFinalMMTk.a(FinalMMTk.o):/home/will/llvm/tot/llvm-objects-32/projects/vmkit/Release+Asserts/lib/FinalMMTk.bc:function
__unnamed_6816: error: undefined reference to
'sun_nio_cs_HistoricallyNamedCharset_VirtualMethods'
/home/will/llvm/tot/llvm-objects-32/projects/vmkit/Release+Asserts/lib/libFinalMMTk.a(FinalMMTk.o):/home/will/llvm/tot/llvm-objects-32/projects/vmkit/Release+Asserts/lib/FinalMMTk.bc:function
sun_nio_cs_ISO_18859_11_00024Encoder_VT: error: undefined reference to
'sun_nio_cs_ISO_18859_11_00024Encoder'
/home/will/llvm/tot/llvm-objects-32/projects/vmkit/Release+Asserts/lib/libFinalMMTk.a(FinalMMTk.o):/home/will/llvm/tot/llvm-objects-32/projects/vmkit/Release+Asserts/lib/FinalMMTk.bc:function
sun_nio_cs_ISO_18859_11_00024Decoder_VT: error: undefined reference to
'sun_nio_cs_ISO_18859_11_00024Decoder'
/home/will/llvm/tot/llvm-objects-32/projects/vmkit/Release+Asserts/lib/libFinalMMTk.a(FinalMMTk.o):/home/will/llvm/tot/llvm-objects-32/projects/vmkit/Release+Asserts/lib/FinalMMTk.bc:function
sun_nio_cs_Surrogate_00024Parser_VT: error: undefined reference to
'sun_nio_cs_Surrogate_00024Parser'
collect2: ld returned 1 exit status
make[1]: *** [/home/will/llvm/tot/llvm-objects-32/projects/vmkit/Release+Asserts/bin/precompiler]
Error 1
make[1]: Leaving directory
`/home/will/llvm/tot/llvm-objects-32/projects/vmkit/tools/precompiler'
make: *** [all] Error 1




More information about the vmkit-commits mailing list