2011年4月4日 星期一

[Android] A Brief Introduction on Dalvik Virtual Machine

A Brief Introduction on Dalvik Virtual Machine

Jing (mqJing@msn.com)


**


Download: odp, pdf


Abstract

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
Note:
This is a talk about Dalvik VM topic.Some Java byte codes are used to introduce the basic idea of interpreter. The main contents of this slides are taken from the Dalvik VM Internal on Google I/O. You can download the original slide from here.

Enjoy.
by Jing.

Reference