RTC Thumb2 JIT enhancements
Xerxes RĂ„nby
xerxes at zafena.se
Wed Mar 17 07:01:03 PDT 2010
Hi!
On 2010-03-11 12:23, ed at camswl.com wrote:
> Hi folks,
>
> The following are some enhancements I have made to the T2JIT over the past
> month.
>
> I have tested the changes with various benchmarks, with Think Free Office,
> and with the hotspot and lang portions of JTreg which all pass. The jdk
> portion is still running.
>
> Unfortunately the diffs are quite large so I am submitting the diffs to
> the list as 4 separate sets of diffs.
>
> Has the b18 release been split off yet? I would prefer these changes not
> to go into the b18 release as they have not had sufficient testing yet.
>
>
A bit strange to have them left in limbo.. surely they are designed and
tested to work with the openjdk used in 1.7.x but they are also too new
to be included in that release branch since icedtea6 1.7.x only accepts
bugfixes and no new features....
The new icedtea6 1.8 release using openjdk b18 that will branch any time
now from icedtea6 trunk do already contain the first implementation of
the t2jit and does also full bootstrap compile and runs with these four
new patches applied when I tested it.
If we do not include these new t2 fixes for the 1.8 branch then we have
to play catchup with the upcoming openjdk b19 and potentially with a new
hotspot hs17.
Both icedtea6 1.7.x and icedtea6 1.8 uses the same hotspot, hs16, so
they should both be ok I think.
With all this said I think the patches looks great, they apply build and
run using icedtea6 trunk, and I am in favour for them to go in so that
they can be included in the next 1.8 release.
Cheers
Xerxes
> Regards,
> Ed.
>
> - Support for frameless compilation
>
> Local variables and interpreter state are now addressed from Java SP
> rather than separate 'istate' (R8) register. R8 now free for register
> allocation giving 6 allocatable registers instead of 5.
>
> - Support for compilation of methods containing monitorenter / monitorexit
>
> monitorenter / monitorexit moved from asm to C so they can be called
> by JIT code compilation of monitorenter / monitorexit containinng
> methods uses frame adressing because stack can expand dynamically to
> accomodate monitors.
>
> - Interpreter caches 'thread' in a register
>
> Interpreter reworked to cache 'thread' in a register. Involved
> removal of one 'tmp' register in interpreter to make room for
> 'thread' register. Interpreter and JIT are now consistent in register
> usage.
>
> - Compression of JIT 'header'
>
> Removed the OSR entry from the JIT header. Previously, each JITted
> method had an individual piece of code in the header to load the
> appropriate registers from locals and the jump to the OSR entry
> point. This is changed so the the OSR caller (the interpreter), uses
> the 'regusage' array in the JIT header to load the correct registers
> and then just jumps directly to the entry point in the method.
> Saving is 24 bytes per method.
>
> - Backwards branch targets now doubleword aligned.
>
> Pads with no ops before a backwards branch target to ensure backwards
> branch target is 64 bit aligned. Small performance benefit.
>
> - Addition of OSPACE flag
>
> Setting environment variable T2_OSPACE will cause the JIT to optimise
> for space as opposed to time. OSPACE does the following.
>
> o Tweaks the register allocation to allocate register based on space
> o Enables tailing of returns. IE does a branch to the return.
> o Disables doubleword alignment of backwards branch targets
> o Disables inlining invoke virtual/static/special wrappers
>
> OSPACE has a small performance effect on benchmarks (~10% on ECM) but
> has no noticeable effect on large applications.
>
> Default is compile for time (OSPACE disabled)
>
> - Removed a pass from the compiler
>
> The JIT had an additional pass to detect 'zombie' code (ie code which
> could be, but has never been called). Zombie code removal was
> disabled in prior versions because it was unreliable, however the
> additional pass was still there.
>
> - Removed vestigal and debug code
>
> Removed #if 0 code and debug code which was no longer functional
>
More information about the distro-pkg-dev
mailing list