JIT enabling for armv5te

68 views
Skip to first unread message

Andy Quan

unread,
Oct 27, 2010, 12:12:33 PM10/27/10
to android-...@googlegroups.com
Hi,
I notice that on armv5te platform, JIT is turned off by default on Froyo. I wonder whether there would be any performance or functionality penalty if we turn it on for v5te arch,
 
Any comment or suggestion is welcome.

--
Thanks,
Andy

Anand Android

unread,
Oct 28, 2010, 5:33:47 AM10/28/10
to android-...@googlegroups.com
Hi Andy ,
can i know which part of code does this ?

-
Anand

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.

Andy Quan

unread,
Oct 28, 2010, 5:36:10 AM10/28/10
to android-...@googlegroups.com
It is under dalvik folder.
--
Thanks,
Andy

Javed Absar

unread,
Oct 28, 2010, 10:17:46 AM10/28/10
to android-...@googlegroups.com
 The performance should typically get better if you switch on the JIT. 
BR 
J

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.



--
my homepage: http://www.javedabsar.com

fengyuan Ivan

unread,
Oct 30, 2010, 5:24:15 AM10/30/10
to android-...@googlegroups.com
Yes. I can get armv5t is turned off code.  
you can get from dalvkit/vm

ifeq ($(TARGET_ARCH_VARIANT),armv5te)
    WITH_JIT := false
endif

So I want to know why android want to disable JIT for armv5te. 




2010/10/28 Javed Absar <javed...@gmail.com>



--
Thanks,
Ivan

Ben Cheng

unread,
Nov 1, 2010, 2:19:20 AM11/1/10
to android-...@googlegroups.com
Although we monitored the JIT resource consumption closely, it still adds one compiler thread and a couple hundred KBs of code cache to each process, which might be a burden to lower-end devices. Since the CPU frequency for v5te cores and RAM amount vary from platform to platform, we decided to disable the JIT for v5te by default in the makefile, but platform developers can easily enable it once the underlying system is measured to be fast enough. 

-Ben

James

unread,
Nov 1, 2010, 3:47:49 AM11/1/10
to android-platform
Hi Ben, What do you mean by the underlying system is measured to be
fast enough? I've enabled JIT on my device, But it seems to be
useless, as power on costs me exactly the same time.One thing more,
Device with what HW would probably benefit from JIT ?? Thank you!

On Nov 1, 2:19 am, Ben Cheng <bcch...@android.com> wrote:
> Although we monitored the JIT resource consumption closely, it still adds
> one compiler thread and a couple hundred KBs of code cache to each process,
> which might be a burden to lower-end devices. Since the CPU frequency for
> v5te cores and RAM amount vary from platform to platform, we decided to
> disable the JIT for v5te by default in the makefile, but platform developers
> can easily enable it once the underlying system is measured to be fast
> enough.
>
> -Ben
>
> - Hide quoted text -
>
> - Show quoted text -
>
>
>
> On Sat, Oct 30, 2010 at 2:24 AM, fengyuan Ivan <redyua...@gmail.com> wrote:
> > Yes. I can get armv5t is turned off code.
> > you can get from dalvkit/vm
>
> > ifeq ($(TARGET_ARCH_VARIANT),armv5te)
> >     WITH_JIT := false
> > endif
>
> > So I want to know why android want to disable JIT for armv5te.
>
> > 2010/10/28 Javed Absar <javed.ab...@gmail.com>
>
> >  The performance should typically get better if you switch on the JIT.
> >> BR
> >> J
>
> >> On 27 October 2010 21:42, Andy Quan <androidr...@gmail.com> wrote:
>
> >>> Hi,
> >>> I notice that on armv5te platform, JIT is turned off by default on Froyo.
> >>> I wonder whether there would be any performance or functionality penalty if
> >>> we turn it on for v5te arch,
>
> >>> Any comment or suggestion is welcome.
>
> >>> --
> >>> Thanks,
> >>> Andy
>
> >>> --
> >>> You received this message because you are subscribed to the Google Groups
> >>> "android-platform" group.
> >>> To post to this group, send email to android-...@googlegroups.com.
> >>> To unsubscribe from this group, send email to
> >>> android-platfo...@googlegroups.com<android-platform%2Bunsubscrib e...@googlegroups.com>
> >>> .
> >>> For more options, visit this group at
> >>>http://groups.google.com/group/android-platform?hl=en.
>
> >> --
> >> my homepage:http://www.javedabsar.com
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "android-platform" group.
> >> To post to this group, send email to android-...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> android-platfo...@googlegroups.com<android-platform%2Bunsubscrib e...@googlegroups.com>
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/android-platform?hl=en.
>
> > --
> > Thanks,
> > Ivan
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "android-platform" group.
> > To post to this group, send email to android-...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > android-platfo...@googlegroups.com<android-platform%2Bunsubscrib e...@googlegroups.com>
> > .

Ben Cheng

unread,
Nov 1, 2010, 3:31:03 PM11/1/10
to android-...@googlegroups.com
Hi James,

Glad you mentioned the device boot time. The Dalvik VM uses the interpreter to make forward progress unless frequently executed code traces are detected, and the JIT will only help the performance if the majority cycles are spent in the VM interpreter. The boot process happens to execute code from a relatively large footprint with low repeat rates, and less than 30% of the cycles are in the VM to begin with, so "exactly the same time" is the expected behavior.

The transition from the interpreter to the JIT compiler can be tuned via the parameters in the ArchVariant.c file under dalvik/vm/compiler/codegen/arm/<arch>. For example, currently armv5te says:

    gDvmJit.threshold = 200;
    gDvmJit.codeCacheSize = 512*1024;

That is, only traces that are executed more than 200 times before are considered JIT-worthy, and the upper-bound for the code cache size for each process is 512K. If the underlying CPU is not fast enough and the threshold is set too low, the device may feel sluggish since the compiler threshold is using the CPU more often. Also if RAM is not abundant on the device while the code cache size is too big, the overall system performance may degrade due to memory contentions. The sweet-spot setting for different devices (especially for lower-end ones) varies and some benchmarking effort is probably required.

That said, for CPU intensive workloads both the v5te and v7 JIT will provide significant speedups over the base line, but the actual ratio varies case by case and you can look at our I/O presentation on how to use profiling tools to find out  the expected behavior. Lower-end devices are more sensitive to the JIT parameters and may require individual tuning, so the JIT is disabled by default for the v5te target.

-Ben

To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages