Google I/O 2008 - Dalvik Virtual Machine Internals
Google for Developers1 HN recommender · recommended in 1 month, 2012-2018
188K views · 18 years ago · talk · dated
Dan Bornstein's Google I/O 2008 talk on the internals of Dalvik, the virtual machine that runs Android code. It covers the motivation for its design, the dex format and its register-based interpreter, plus tips for writing code that suits the platform.
HN points to it as the primary source on Dalvik's dex bytecode, register-based design and memory-saving choices.
48:32Google I/O 2014 - Android fireside chat
Google for Developers
19K views • 12 years ago
1:21:25Let's prototype a JavaScript JIT compiler!
Andreas Kling
49K views • 3 years ago
1:15:09Cliff Click @ VMSS16: Bits of Advice For the VM Writer
softdevteamuk
4K views • 10 years ago
2:02:18The Mill CPU Architecture – The Compiler (10 of 13)
Mill Computing, Inc.
12K views • 11 years ago
52:38A JVM Does That?
Google TechTalks
80K views • 15 years ago
1:00:29Google I/O 2012 - Meet the Go Team
Google for Developers
108K views • 14 years ago
47:51Brandt Bucher – A JIT Compiler for CPython
encukou
14K views • 2 years ago
1:12:02Java on a 1000 Cores - Tales of Hardware / Software CoDesign
Google TechTalks
23K views • 17 years ago
40:03Google I/O 2013 - High Performance Audio
Google for Developers
62K views • 13 years ago
51:12Google I/O 2011: Writing Web Apps in Go
Google for Developers
135K views • 15 years ago
50:06Protected KVM on Arm64: A Technical Deep Dive - Quentin Perret, Google
The Linux Foundation
6K views • 4 years ago
1:20:29Stanford Seminar - Google's Steve Yegge on GROK
Stanford Online
30K views • 14 years ago
9:03NixOS VM on Mac Setup
Mitchell Hashimoto
31K views • 5 years ago
1:06:20Lars Bak - The Making of a Secure and Robust IoT Development Platform
Curry On!
3K views • 7 years ago
23:57GopherCon 2016: The Design of the Go Assembler - Rob Pike
Gopher Academy
116K views • 10 years ago
1:01:37Compiling and Optimizing Scripting Languages
Google TechTalks
21K views • 17 years ago
1:08:52JVMLS 2015 - Compilers are Databases
Java
16K views • 11 years ago
1:14:32Building Your Own Dynamic Language
Stanford
21K views • 18 years ago
44:59Google I/O 2011: Kick-Ass Game Programming with Google Web Toolkit
Google for Developers
106K views • 15 years ago
1:00:21CppCon 2019: Matt Godbolt “Compiler Explorer: Behind The Scenes”
CppCon
29K views • 7 years ago
4 comments from Hacker News
There's an experimental branch for Ruby: link Dalvik also uses a register-based bytecode. The early versions of Android needed a more efficient interpreter. Dan Bornstein's talk: ▶ this video A classic paper on Register vs Stack VMs: link
This is a great post. I like how they walked through all the steps and especially the "perf" tool. Ruby has a patch to do the same thing -- increase sharing by moving reference counts out of the object itself: Index here: link First post in a long series: link I think these patches or something similar may have made it into Ruby 2.0: link link The Dalvik VM (now replaced by ART) also did this to run on phones with 64 MiB of memory: ▶ this video I think PHP might do it too. It feels like Python should be doing this as well.
I agree: within the Android ecosystem and even within the ARM family, bytecode provides portability: you don't have to compile and distribute apps for different versions of the ARM architecture. It's paradoxical however that to increase the portability of certain types of apps across mobile ecosystems, eg. iOS and Android, and now Ubuntu, your best bet can be to write the portable part in native C or C++, bypassing the Dalvik layer using JNI/NDK. This is apparently the common way to make cross-platform mobile games. On memory consumption: I haven't made any measurements, but the Android .dex bytecode format has been designed with low space requirements in mind. See ▶ this video . However, all apps run in their own VM process, with lots of common structures shared with them using an initial shared VM process and clever forking. I always thought one of the main original motivations to use Java was because it's so well spread among developers. Since in the early days before the JIT compiler, there must have been a really obvious overhead even with the interpreter hand-coded in assembly. But they must have wanted to use a well known higher level language with good IDE support etc. Ubuntu mobile apparently uses Qt: "It uses QML to give you a really slick, easy development experience for native apps with engines in C or C++, and JavaScript for UI glue that isn’t performance critical. We also give you full native OpenGL, which the top games companies are using to make incredible games."
Here's Dan Bornstein's talk at Google I/O 2008 about the dex format and the original Dalvik interpreter: ▶ this video I'm not sure how useful it is in comparing the Dalvik JIT to MonoTouch though.