4185972e211b0c84b9fe7d90c56b28cc15e474fa |
|
27-Sep-2011 |
buzbee <buzbee@google.com> |
Fix memory barriers (Issue 3338450) Add extra memory barrier on volatile stores. Change-Id: Id4a4750cdfc910eda2f0b44ead0af2a569b5735e
|
9a3147c7412f4794434b4c2604aa2ba784867774 |
|
03-Mar-2011 |
buzbee <buzbee@google.com> |
Interpreter restructuring This is a restructuring of the Dalvik ARM and x86 interpreters: o Combine the old portstd and portdbg interpreters into a single portable interpreter. o Add debug/profiling support to the fast (mterp) interpreters. o Delete old mechansim of switching between interpreters. Now, once you choose an interpreter at startup, you stick with it. o Allow JIT to co-exist with profiling & debugging (necessary for first-class support of debugging with the JIT active). o Adds single-step capability to the fast assembly interpreters without slowing them down (and, in fact, measurably improves their performance). o Remove old "polling for safe point" mechanism. Breakouts now achieved via modifying base of interpreter handler table. o Simplify interpeter control mechanism. o Allow thread-granularity control for profiling & debugging The primary motivation behind this change was to improve the responsiveness of debugging and profiling and to make it easier to add new debugging and profiling capabilities in the future. Instead of always bailing out to the slow debug portable interpreter, we can now stay in the fast interpreter. A nice side effect of the change is that the fast interpreters got a healthy speed boost because we were able to replace the polling safepoint check that involved a dozen or so instructions with a single table-base reload. When combined with the two earlier CLs related to this restructuring, we show a 5.6% performance improvement using libdvm_interp.so on the Checkers benchmark relative to Honeycomb. Change-Id: I8d37e866b3618def4e582fc73f1cf69ffe428f3c
|
9f601a917c8878204482c37aec7005054b6776fa |
|
12-Feb-2011 |
buzbee <buzbee@google.com> |
Interpreter restructuring: eliminate InterpState The key datastructure for the interpreter is InterpState. This change eliminates it, merging its data with the Thread structure. Here's why: In principio creavit Fadden Thread et InterpState. And it was good. Thread holds thread-private state, while InterpState captures data associated with a Dalvik interpreter activation. Because JNI calls can result in nested interpreter invocations, we can have more than one InterpState for each actual thread. InterpState was relatively small, and it all worked well. It was used enough that in the Arm version a register (rGLUE) was dedicated to it. Then, along came the JIT guys, who saw InterpState as a convenient place to dump all sorts of useful data that they wanted quick access to through that dedicated register. InterpState grew and grew. In terms of space, this wasn't a big problem - but it did mean that the initialization cost of each interpreter activation grew as well. For applications that do a lot of callbacks from native code into Dalvik, this is measurable. It's also mostly useless cost because much of the JIT-related InterpState initialization was setting up useful constants - things that don't need to be saved and restored all the time. The biggest problem, though, deals with thread control. When something interesting is happening that needs all threads to be stopped (such as GC and debugger attach), we have access to all of the Thread structures, but we don't have access to all of the InterpState structures (which may be buried/nested on the native stack). As a result, polling for thread suspension is done via a one-indirection pointer chase. InterpState itself can't hold the stop bits because we can't always find it, so instead it holds a pointer to the global or thread-specific stop control. Yuck. With this change, we eliminate InterpState and merge all needed data into Thread. Further, we replace the decidated rGLUE register with a pointer to the Thread structure (rSELF). The small subset of state data that needs to be saved and restored across nested interpreter activations is collected into a record that is saved to the interpreter frame, and restored on exit. Further, these small records are linked together to allow tracebacks to show nested activations. Old InterpState variables that simply contain useful constants are initialized once at thread creation time. This CL is large enough by itself that the new ability to streamline suspend checks is not done here - that will happen in a future CL. Here we just focus on consolidation. Change-Id: Ide6b2fb85716fea454ac113f5611263a96687356
|
919eb063ce4542d3698e10e20aba9a2dfbdd0f82 |
|
12-Jul-2010 |
buzbee <buzbee@google.com> |
Interpreter & JIT support for write barriers In this iteration, cards are marked on either the store address or the object head (whichever leads to faster code). In all cases, though, card marks are deferred until after the associated store has completed. Change-Id: I633d6e8c3bebdb80bde92efb4fa6fc7cc84f60fc
|
0890e5bf0b2a502ca1030e9773fabc16ef1b5981 |
|
18-Jun-2010 |
Andy McFadden <fadden@android.com> |
Fiddle with SMP_DMB. This changes it from a macro that takes an argument to a simpler macro that is named explicitly by the 8 instructions that want it. Change-Id: Ie17a9722823d590851776b6b9b057eadf22fa6a8
|
c35a2ef53d0cccd6f924eeba36633220ec67c32e |
|
17-Jun-2010 |
Andy McFadden <fadden@android.com> |
Add opcodes for volatile field accesses This adds instructions for {i,s}{get,put}{,-object}-volatile, for a total of eight new instructions. On SMP systems, these instructions will be substituted in for existing field access instructions, either by dexopt or during just-in-time verification. Unlike the wide-volatile instructions, these will not be used at all when the VM is not built for SMP. (Ideally we'd omit the volatile instruction implementations entirely on non-SMP builds, but that requires a little work in gen-mterp.py.) The change defines and implements the opcodes and support methods, but does not cause them to be used. Also, changed dvmQuasiAtomicRead64's argument to be const. Change-Id: I9e44fe881e87f27aa41f6c6e898ec4402cb5493e
|
7365493ad8d360c1dcf9cd8b6eee62747af01cae |
|
09-Jun-2010 |
Carl Shapiro <cshapiro@google.com> |
Remove repeated newlines at the end of files. Change-Id: I1e3d103a7b932ef21acedb6438c0f26b315df28f
|
f6c387128427e121477c1b32ad35cdcaa5101ba3 |
|
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
|
f72d5de56a522ac3be03873bdde26f23a5eeeb3c |
|
04-Mar-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //depot/cupcake/@135843
|
89c1feb0a69a7707b271086e749975b3f7acacf7 |
|
18-Dec-2008 |
The Android Open Source Project <initial-contribution@android.com> |
Code drop from //branches/cupcake/...@124589
|