据我所知,Java JIT 编译器跟踪调用的方法,并在执行一定量的方法/循环后编译代码或根据迄今为止执行的代码路径对其进行优化。方法执行的数量大约为 10000(取决于 JVM 和设置),并且有一些老化。
我想知道 Android JIT 编译器何时真正启动(方法调用数量和其他指标)。原因是我使用 android.os.Process.getElapsedCpuTime() 记录了代码部分的已用 CPU 时间,现在想知道什么时候应该看到一些改进(如果有的话)。
From my knowledge the Java JIT compiler traces called methods and after a certain amount of method/loop executions compiles the code or optimizes it based on the executed code paths so far. The number of method executions is something like 10000 (depends on JVM and settings) with some aging.
I am wondering when the Android JIT compiler actually kicks in (number of method invocations and other metrics). The reason is that I logged the used CPU time for a code part with android.os.Process.getElapsedCpuTime() and now wonder when I should expect to see some improvements (if any at all).
发布评论
评论(1)
如果您还没有看过,也许这会给您一些见解:http://www.google.com/events/io/2010/sessions/jit-compiler-androids-dalvik-vm.html
Maybe this will give you some insight if you haven't watched it already: http://www.google.com/events/io/2010/sessions/jit-compiler-androids-dalvik-vm.html