当 Just in Time 编译器在 2.2 版中添加到 Android 中时,也发布了很多关于它如何工作的详细信息。Android 3.0的官方描述也提到了“对 JIT 基础设施的各种改进”,但我无法找到有关这些改进的任何信息,也没有找到有关 Android 4.0 中 JIT 的任何详细信息。JIT 在最新版本中是否保持相对不变,或者是否有任何关于这些改进的信息?
编辑:正如我在下面的回答中所述,我发现了一些描述改进的变更日志条目。任何其他信息仍将不胜感激。
在从其公共 GIT 存储库中查看 Dalvik VM 源代码并按照此处所述搜索其更改日志后,我发现除了错误修复之外,最近唯一与 JIT 相关的主要更改似乎是:
Date: Tue Jul 3 13:13:07 2012 -0700
[X86] X86 trace JIT compiler support
This patch provides a fully functional x86 trace JIT compiler for Dalvik
VM. It is built on top of the existing x86 fast interpreter
with bug fixes and needed extension to support trace JIT interface. The
x86 trace JIT code generator was developed independent of the existing
template-based code generator and thus does not share exactly the same
infrastructure. Included in this patch are:
* Deprecated and removed the x86-atom fast interpreter that is no
longer functional since ICS.
* Augmented x86 fast interpreter to provide interfaces for x86 trace JIT
compiler.
* Added x86 trace JIT code generator with full JDWP debugging support.
* Method JIT and self-verification mode are not supported.
The x86 code generator uses the x86 instruction encoder/decoder library
from the Apache Harmony project. Additional wrapper extension and bug
fixes were added to support the x86 trace JIT code generator. The x86
instruction encoder/decoder is embedded inside the x86 code generator
under the libenc subdirectory.
和
Date: Wed May 2 14:27:16 2012 -0700
[MIPS] Dalvik fast interpreter support and JIT implementation