A Brief Introduction on Dalvik Virtual Machine
Jing (mqJing@msn.com)
The Dalvik virtual machine is a register-based virtual machine. It is optimized for low memory requirements, and is designed to allow multiple VM instances to run at once, relying on the underlying operating system for process isolation, memory management and threading support. Join the talk, you can get a brief introduction on how a interpreter works, detail of memory usage and optimization strategy in Dalvik VM. Moreover, we had known that the Just In Time (JIT) compiler boosts the performance of VM in 4 ~ 5 times from Android 2.1. This talk will show you the basic idea of JIT and the function block that used in Android.
Keywords: Virtual Machine (VM), Just in Time compiler (JIT), Interpreter, Compiler, Android
Outline
Interpreter
- Switch dispatch
- Direct call threading interpreter
- Direct threading
- The context problem (HW architecture / branch perdition)
- Subroutine threading
- Let's talk about Dalvik interpreter
JIT (Just in Time) Compiler
- Basic Idea
- How to identify hot path
- Hot and Cold traces
- Dalvik Trace JIT Flow
- Trace-based vs. Method based JIT
- The Decision & Future Directions