harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wenlong Li" <wenl...@gmail.com>
Subject Re: Anyone plans to enable interpreter + jit in client mode?
Date Wed, 12 Nov 2008 11:50:25 GMT
Thx for sharing this interesting information. Alexey. I will read
through the documents.
Other comments are welcome and appreciated.

Thx, Wenlong

On Wed, Nov 12, 2008 at 4:13 PM, Alexei Fedotov
<alexei.fedotov@gmail.com> wrote:
> I've recently visited Google talk on V8 [1]. They describe their
> strategy on slide 23. Lars clarified that pre-compiled meant
> "pre-parsed": they did not use any byte code for javascript and
> populated interal strucutres efficiently from cache. They still
> compile things to assembly on fly.
>
> Wenlong, hope you find Google's work encouraging to implement these
> features in DRLVM.
>
> [1] Slides 23, 26 at http://www.scribd.com/doc/7679898/V8DelevopersDaysodp
>
> On Wed, Nov 12, 2008 at 10:52 AM, Wenlong Li <wenlong@gmail.com> wrote:
>> Aleksey,
>>
>> I totatlly agree with your point. There is a trade-off between
>> compilation overhead and code performance.
>>
>> In my understanding (also from some related work[1]), the startup
>> means the work before executing user's code in main(). So for startup
>> optimization, we may think how to reduce the VM creation time, etc. As
>> for test case, I just use the simple helloworld program to study the
>> performance bottleneck. I saw there is some work in [1][2] to reduce
>> the startup cost.
>>
>> What do you think?
>> [1] http://edocs.bea.com/jrockit/geninfo/diagnos/tune_startup.html
>> [2] http://www.ibm.com/developerworks/java/library/j-ibmjava4/
>>
>> Thx, Wenlong
>> On Wed, Nov 12, 2008 at 3:35 PM, Aleksey Shipilev
>> <aleksey.shipilev@gmail.com> wrote:
>>> 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.
>>>
>>> Thanks,
>>> Aleksey.
>>>
>>> [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
>>>>>>
>>>>>
>>>>
>>>
>>
>
>
>
> --
> С уважением,
> Алексей Федотов,
> Телеком Экспресс
>
Mime
View raw message