decoration decoration
Stories

GROKLAW
When you want to know more...
decoration
For layout only
Home
Archives
Site Map
Search
About Groklaw
Awards
Legal Research
Timelines
ApplevSamsung
ApplevSamsung p.2
ArchiveExplorer
Autozone
Bilski
Cases
Cast: Lawyers
Comes v. MS
Contracts/Documents
Courts
DRM
Gordon v MS
GPL
Grokdoc
HTML How To
IPI v RH
IV v. Google
Legal Docs
Lodsys
MS Litigations
MSvB&N
News Picks
Novell v. MS
Novell-MS Deal
ODF/OOXML
OOXML Appeals
OraclevGoogle
Patents
ProjectMonterey
Psystar
Quote Database
Red Hat v SCO
Salus Book
SCEA v Hotz
SCO Appeals
SCO Bankruptcy
SCO Financials
SCO Overview
SCO v IBM
SCO v Novell
SCO:Soup2Nuts
SCOsource
Sean Daly
Software Patents
Switch to Linux
Transcripts
Unix Books

Gear

Groklaw Gear

Click here to send an email to the editor of this weblog.


You won't find me on Facebook


Donate

Donate Paypal


No Legal Advice

The information on Groklaw is not intended to constitute legal advice. While Mark is a lawyer and he has asked other lawyers and law students to contribute articles, all of these articles are offered to help educate, not to provide specific legal advice. They are not your lawyers.

Here's Groklaw's comments policy.


What's New

STORIES
No new stories

COMMENTS last 48 hrs
No new comments


Sponsors

Hosting:
hosted by ibiblio

On servers donated to ibiblio by AMD.

Webmaster
0292.pdf as text as html | 96 comments | Create New Account
Comments belong to whoever posts them. Please notify us of inappropriate comments.
0292.pdf as text as html
Authored by: indyandy on Sunday, May 20 2012 @ 07:48 AM EDT
For the eight-month period from 1-Jan-2007 to 31-Aug-2007 ...<br>
<br>
I spent most of my time working on the Dalvik VM (the Java-ish virtual machine used on the Android platform).<br>
The VM was first made generally available within Android in January, replaced our previous VM (JamVM) as the default in March, and was sufficiently fast and trouble-free that we dropped support for JamVM in July.<br>
<br>
Highlights:<br>
<br>
- Reworked various pieces to maximize data-sharing between processes. For example, the Dalvik classfiles are now uncompressed to cache files after being byte-swapped and aligned, allowing direct access from C to shared read-only memory-mapped pages. The VM' s &quot;write once&quot; data, such as method names and signatures, are stored in a separate allocation area to minimize the ''write'' in ''copy-on-write'' after a fork().<br>
<br>
- Improved VM performance significantly. I developed a &quot;DEX optimizer&quot; that rewrites bytecodes as the classfiles are uncompressed, and created a low-overhead &quot;inline&quot; native call mechanism. I removed debugger overhead from the interpreter while retaining support for the debugger. I learned ARM assembly and rewrote the JNI call bridge in it. I wrote several Java performance tests to exercise the VM, and ran them frequently to measure results.<br>
<br>
- Implemented bytecode verification. This involves verifying that classes are constructed properly, and &quot;executing&quot; every bit of code in every class to ensure that &quot;bad stuff&quot; can't happen, e.g. passing an integer when an obJect reference is expected.<br>
<br>
- Continued development of core features. Most of the major items were in place, but we still needed a lot of little things (uncaught exception handling, Java language asserts, etc.) that are expected in a commercial VM.<br>
<br>
- Improved support for Java debuggers. IntelliJ is now fully supported, and all common JDWP command-line options are handled.<br>
<br>
For the first half of the year we supported both Dalvik VM and JamVM simultaneously (switchable at runtime).<br>
I maintained JamVM until we dropped it.<br>
<br>
<br>
Another major item was the development of the Dalvik Debug Monitor system. Debugging a Java app on the device required a complicated series of steps. The Dalvik Debug Monitor Server (DDMS) monitors all Java processes running on a device, allows you to examine thread and heap information, and provides pass-through ports for easy debugger connections. I borrowed a book on the SWT toolkit to write the GUI interface, and piggybacked the DDM messages on top of JDWP (the Java Debug Wire Protocol) . (The stand-alone DDMS app has since been transformed by xav into a much nifter Eclipse plug-in.)<br>
<br>
I used what I learned while working on the Dalvik VM to significantly rewrite and expand our &quot;Efficient Java&quot; document, which describes best practices for Java development on small embedded systems.<br>
<br>
I frequently worked with others to measure and resolve performance problems, providing analysis or adding instrumentation to the VM.<br>
<br>
<br>
<br>
- I write good code. It does what it's supposed to, and is well commented. (The Dalvik VM sources have extensive descriptions of ''why'' as well as ''what''.) I fix bugs as they come up, even if they're not related to the feature I'm currently working on.<br>
<br>
- I find and fill needs before their absence becomes critical. Debugging Java apps on the device was difficult, so I made it easy with DDMS. The tools were developed and stable before the team shifted from the simulator to the device as the primary development platform.<br>
<br>
- I pick up new technologies quickly. I learned how to write GUI apps with the SWT toolkit so I could develop DDMS, and I learned how to program in ARM assembly language to make a piece of the VM run correctly (and quickly!).<br>
<br>
<br>
<br>
Last review, horowitz wrote:<br>
<br>
&quot;I would like to see Andy reach out more and offer his advice and guidance on system level architecture, even in areas he is not responsible for.''<br>
<br>
I've stayed pretty focused on the VM.<br>

[ Reply to This | Parent | # ]

Groklaw © Copyright 2003-2013 Pamela Jones.
All trademarks and copyrights on this page are owned by their respective owners.
Comments are owned by the individual posters.

PJ's articles are licensed under a Creative Commons License. ( Details )