harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Sabol <csa...@gmail.com>
Subject Re: How to debug in JET code generation?
Date Mon, 14 Dec 2009 18:14:58 GMT
For what's its worth, on MIPS it did some hacking to validate the basic ALU
operations before moving on to get the standard classes to initialize.

If you look up the MIPS patch that Charles sent out, I believe it still
contains my "SIMPLE_START" define hack.  That define basically causes the
DRLVM class initialization logic to not run a bunch of the standard
initialization logic.   I haven't gotten around to pulling it out yet...

Anyhow, I've also attached the simple kernel.jar and class files that
basically do a number of unit tests in the java.lang.Object() constructor.
When combined with SIMPLE_START, you can validate the generated assembly and
output without having to have everything working.  There are a number of
static native methods that the classes use to print output information, you
can also get the implementation for those from the MIPS patch as well.

Other than that I was using gdb a bunch and had the compile tracing turned
on to validate the assembly.  I was generally running drlvm with the
following command line:

java -Xem:jet -verbose -Xtrace:vm.core.init -Xtrace:init -Xtrace:em
-Xtrace:invoke -Xtrace:compile -Xtrace:harmonyvm -Xtrace:class
-Xtrace:natives -Xdumpstubs -XX:jit.JET.arg.log=ct,sum,cg,layout,code
-Xtrace:jitrino -Xtrace:vm.stack -Xtrace:exn -Xtrace:vm.helpers -jar dummy

Assuming you are running big endian, you may want to pick up the ENDIAN
changes from the MIPS patch, since those will be needed and are a pain to
find.

-Chris

On Mon, Dec 14, 2009 at 9:13 AM, Egor Pasko <egor.pasko@gmail.com> wrote:

> On the 0x687 day of Apache Harmony pillow wrote:
> > Hi all:
> >
> > We are new in Harmony porting work.
> >
> > Now we want to port harmony DRLVM's JET to Sparc. We have implemented
> > encoder and Lil compiler for this
>
> wow, that's cool! what a surprise!
>
> > platform and go to code generation phase.
> >
> > We want some advice that how to debug here easily.
>
> GDB/DDD debugger should work fine on linux. Do you have some specific
> problems to list here?
>
> > If we want to run a HelloWorld program out, is it necessary to
> > pass all library classes compilation with JET first?
>
> Yes, absolutely. Hello World is written mostly in java, you will need
> to compile a fair bunch of methods to run HelloWorld.
>
> --
> Egor Pasko
>
>

Mime
View raw message