[kaffe] Kaffe JIT on Alpha (and Amiga)

Tony Wyatt wyattaw at optushome.com.au
Sun Apr 20 18:44:01 PDT 2003


Hi Kevin,

On 21-Apr-03, you wrote:

> . . . .  I have generated JIT translation traces and used
> gdb to try to isolate them, and they seem to be due to null pointers
> in data structures that are otherwise OK, as if the JIT code was
> somehow fogetting to commit a non-zero result to memory in
> some unusual case(s).  

It seems I've heard this song before. I'm currently trying to get the JIT
working on an m68k Amiga, and it crashes and burns while trying to 
load the rt.jar classes. The cause is an illegal instruction exception,
sometimes some other type like "EMT" (sic), but early in the initialiseKaffe() 
process.

So far I have found that the cause is that, in executing translated code,
the runtime has come across virgin memory in the buffer, and tried to 
execute that. The native code buffer has "f4f4f4f4" from the GC_ALLOC(),
and no code. However, it does contain the offsets of all the branches and
JSRs - so the labels have been filled in after the "code" has been "copied"!

My problem sounds suspiciously like that that Kevin has described. The
trouble with finding it is that it doesn't seem to happen while stepping
through with gdb - only if I let the program run. Or maybe I just haven't
stepped far enough yet.

If it's any use to anyone, there is one problem I've found and fixed, but
haven't yet seen any benefit. In jit/machine.c, the three static variables:

code_generated,
bytecode_processed,
codeperbytecode

are never initialised, and I have seen some crazy values in there. Their
values are used to calculate the size of the next code block allocation.

The hunt goes on . . .

tony





More information about the kaffe mailing list