harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Shipilev" <aleksey.shipi...@gmail.com>
Subject Re: Anyone plans to enable interpreter + jit in client mode?
Date Wed, 12 Nov 2008 07:35:33 GMT
Hi Wenlong,

On Wed, Nov 12, 2008 at 9:28 AM, Wenlong Li <wenlong@gmail.com> wrote:
> As for interpreter vs. jet or client, I measured the VM creation time
> of Harmony, and found interpreter takes the least time to create
> Harmony VM, e.g., 94 ms, while jet takes 121 ms, and client takes 140
> ms (all these time are for Harmony).
How exactly are you measuring the startup of VM? What workload do you run?

What's important here is the right balance between compilation
overhead and the benefits compilation brings. If your code is not
getting executed, then you measuring compilation overhead only -- not
surprisingly, JET will slow things down.

I suggest you to make two experiments:

 1. Compare the *code* performance generated by JET vs. interpreter.
Take some long-running benchmark (like SPECjbb2005) and run in two
modes: (a) -Xem:jet, (b) -Xem:interpreter

 2. Measure the compilation overhead. Take some real startup benchmark
(some of SPECjvm2008:startup would fit nicely, I guess) and measure
what fraction of overall time Jitrino spend compiling, in case of (a)
JET only, (b) client mode, (c) server mode. There should be the
facility inside Jitrino to collect timer stats [1], should be enabled
with -XX:jit.arg.time=on (?).

>From experiment 1, you should see that code generated by JET is
actually faster. From experiment 2, you would see where's the time is
spent on compilation.


[1] http://harmony.apache.org/subcomponents/drlvm/JIT.html#Timers

At the same time, I compared
> Harmony with RI in client mode for JVM2008 startup benchmarks. Results
> show RI is around 2x faster than Sun's 1.5.0_15.
> Any thought or comment?
> Thx,
> Wenlong
> On Wed, Nov 12, 2008 at 2:09 PM, Aleksey Shipilev
> <aleksey.shipilev@gmail.com> wrote:
>> Harmony's way to "interpret bytecode" is to compile it with JET. Last
>> time I measured JET overhead, it was relatively small, like 5% of
>> overall execution time on Eclipse startup. On another hand, if you
>> compare performance on JET-compiled code of Harmony (-Xem:jet) with
>> performance of code interpreted by any  RI, you will see JET rocks. My
>> other measurements shows JET-compiled code is like 3x times faster
>> than Sun's 1.5.0_10 interpretation ;)
>> Have you any data supporting your proposal?
>> Thanks,
>> Aleksey.
>> On Wed, Nov 12, 2008 at 6:52 AM, Wenlong Li <wenlong@gmail.com> wrote:
>>> Hello, all,
>>> Harmony now uses jet+jit in client mode, does anybody know why? Seems
>>> RI uses interpreter + jit or jit only to compile target program. Does
>>> anybody have done or plan to support the interpreter + jit in client
>>> mode? I am asking this question because RI has good startup
>>> performance, but Harmony has not good startup performance (one of the
>>> problems is compilation overhead).
>>> Thx,
>>> Wenlong

View raw message