5dfcc78af479937ba8dafceefd9b1931a88dfaaf |
|
11-Aug-2012 |
Ard Biesheuvel <ard.biesheuvel@gmail.com> |
hardening: eliminate all text relocations from lidbvm This patch consists of: - changes to mterp/ that turn all literals from absolute to PC relative, so the relocations can be resolved at (build) link time - changes to compiler/template/ that result in the compiler templates to live in the non-executable .data.rel.ro section (this code is never executed directly, only from the jit heap, so there is no reason to put it in the .text section) Change-Id: I2dc97bd4720b393a74b7277a188f0c7b681fc932 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@gmail.com>
|
64793fc548200f9b6da0782e7b276743a529c807 |
|
31-Jan-2012 |
Chris Dearman <chris@mips.com> |
Pad the 8 and 16 bit Jvalue members This allows them to be consistently accessed as either 8-bit, 16-bit or 32-bit values in bigendian and little-endian mode. Change-Id: I1be5519f3666a3553b404368075f5a7b5d9e6b32 Signed-off-by: Chris Dearman <chris@mips.com> Signed-off-by: Raghu Gandham <raghu@mips.com>
|
a8b91c52fd8a90b784835dfe1f8898035266c4dd |
|
02-May-2012 |
Raghu Gandham <raghu@mips.com> |
[MIPS] Dalvik fast interpreter support and JIT implementation Change-Id: I9bb4f6875b7061d3ffaee73f204026cb8ba3ed39 Signed-off-by: Raghu Gandham <raghu@mips.com> Signed-off-by: Chris Dearman <chris@mips.com> Signed-off-by: Douglas Leung <douglas@mips.com> Signed-off-by: Don Padgett <don@mips.com>
|
232c385b9ece322d677a48947ab1e052c1e2427c |
|
18-Jan-2012 |
Ben Cheng <bccheng@google.com> |
Bug fix for control-flow construction involving nested loops. Bug: 5884080 Change-Id: Ic2f42abae3e71f9c0729984902396f92902184a3
|
f36ff048fa354bcc7597a187002728106a8b9346 |
|
18-Jan-2012 |
Ben Cheng <bccheng@google.com> |
Bug fix for control-flow construction involving nested loops. Bug: 5884080 Change-Id: Ic2f42abae3e71f9c0729984902396f92902184a3
|
c1a4ab9c313d8a3d12007f2dbef7b5a6fa4ac2ef |
|
06-Jan-2012 |
Steve Block <steveblock@google.com> |
Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE See https://android-git.corp.google.com/g/#/c/157220 Also fix an occurrence of LOGW missed in an earlier change. Bug: 5449033 Change-Id: I2e3b23839e6dcd09015d6402280e9300c75e3406
|
ab35b50311951feea3782151dd5422ee944685c2 |
|
05-Jan-2012 |
Elliott Hughes <enh@google.com> |
Remove unsupported experimental opcodes. External developers were starting to try to get themselves into trouble with this stuff... Change-Id: I2b03bfeaa8c98b6a994bc7924fc8dcf4e4d4f6cb
|
60fc806b679a3655c228b4093058c59941a49cfe |
|
26-May-2011 |
Dan Bornstein <danfuzz@android.com> |
Further conservation of newlines. Friends don't let friends end LOG() strings with newlines. Change-Id: I5a18c766c90c4ab5f03caa6acd601d34d91beb00
|
cf4a20cf0cbc53f03a5b16c7152bbb29907f7108 |
|
25-May-2011 |
buzbee <buzbee@google.com> |
Interpreter/Debugger fix #4479968 This one was tricky to track down. The underlying problem arose with the consolidation of InterpState with Thread. Rather than having a state structure for each instance of the interpreter, we moved to a model that had a single thread-local struct shared by all interpreter instances running on that thread. A portion of interpreter state can't be shared - and thus was saved and restored on nested invocations of the interpreter. The bug here was that the storage for method return values was not included in the state that needed save/retore. In normal operation, it doesn't need to be saved - that storage isn't live across an invoke that could trigger a nested interpreter activation. However, when debugging, the debugger itself may hijack threads and create new interpreter instances for its own purposed - and there is a small window in which live retval can be trashed. The fix is simply to move retval into the InterpSave struct. Change-Id: Ib621824b799c5caa16fdfa8f5689a181159059df
|
a62c3a0ab3fcdde37f47d16e9699a935ae7a8e88 |
|
04-May-2011 |
Carl Shapiro <cshapiro@google.com> |
Establish a subclass relationship between ArrayObject and Object. Change-Id: I9f9fe52bd4ceebb6dde48251a89190ba6bb00ce4
|
c67c23bc6f5f3621f31c41bd48553b196ab0325e |
|
28-Apr-2011 |
Carl Shapiro <cshapiro@google.com> |
Eliminate the PROFILE_FIELD_ACCESS feature. Change-Id: I27bf2d18c4c0735913ea8698825b05e393b046b2
|
cf2aac7e6a29e7e1e5f622fd6123e0d1a9a75bda |
|
25-Apr-2011 |
buzbee <buzbee@google.com> |
Refine & simplify the interBreak mechanism Replace dvmUpdateInterpBreak() and friends with more direct enable/disable subMode calls. Hide breakFlags manipulation from higher-level callers and infer what is needed from the active subMode. Add documentation to the interpreter control section of mterp/README.txt Change-Id: If7ebee5d8e4db8154c4caed72cf89ec088045998
|
389e258a5b9b2afb7bfaee3344c615d3310fae4e |
|
23-Apr-2011 |
buzbee <buzbee@google.com> |
InterpBreak cleanup (part 1) Moved the suspend count variables from the interpBreak structure. These are already protected by a mutex, and we need the space in interpBreak for additional subMode flags. This CL just does the move and expands the width of subMode to 16-bits. Change-Id: I4a6070b1ba4fb08a0f6e0aba6f150b30f9159eed
|
30bc0d46ae730d78c42c39cfa56a59ba3025380b |
|
22-Apr-2011 |
buzbee <buzbee@google.com> |
Consolidate curFrame fields in thread storage We ended up with two locations in the Thread structure for saved Dalvik frame pointer. This change consolidates them. Change-Id: I78f288e4e57e232f29663be930101e775bfe370f
|
94d65255849ce9f195c971f726e8b09449ba4d14 |
|
25-Mar-2011 |
buzbee <buzbee@google.com> |
Add safepoint callback for gc This change adds a safepoint callback registration mechanism. On a per-thread (or all-thread) basis, you pass in a function to be called at the next safe point by the target thread. That if that function returns 0, it will be automatically disarmed. If not, the callback will stay in effect and the function will be called on all subsequent safe points. GC is the expected customer of this feature. Change-Id: Icd3b93128b1fd547e142d047a12df7ae8ee646e3
|
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
|
701abba5119f17a3b786fbb940aa62353a186100 |
|
09-Mar-2011 |
Carl Shapiro <cshapiro@google.com> |
Use indirect references in JNI by default. This change removes support for direct references. Change-Id: I2af043ecfc5811c16a7d02a5bbb6c071ec6f0a82
|
a7d59bbafea5430fe81fc21ba94ddf6f6a63b0b3 |
|
24-Feb-2011 |
buzbee <buzbee@google.com> |
New interpreter breakout mechanism Introduce parallel handler entry points for mterp interpreters as a step towards fully supporting debug, profile and JIT within mterp (instead of bailing out to the portable debug interpreter). This CL contains most of the structural changes that need to happen, but does not yet enable the new switch mode. In short, within the mterp assembly interpreter register rIBASE points to an array of handlers for Dalvik opcodes. Instead of periodically checking for suspend, debug, profiling and JIT trace selection breakouts, rIBASE may simply be altered to point to the parallel breakout handlers when control needs to be rerouted. This will enable us to eliminate the separate portable debug interpreter and the entire mechanism of switching between the fast and portable interpreters. The x86 implementation required a large number of changes because of the need to dedicate a register to holding the table base. It will now use %edx (which was previously scratch). Changes include: o Support for two styles of mterp assembly code generation: computed goto and jump table (ARM uses computed goto, x86 uses jump table) o New mterp config operators to trigger generation of alternate entry points. o Alternate entries route execution through new dvmCheckInst(). That's where the checking code will go. o For x86, reserved register edx as dedicated rIBASE. o For jump-table mterps, ignore "%break" operator and allow variable-sized handlers with no "sister" region. Note that the x86-atom implementation will need substantial changes to function in this new model. Change-Id: I3a22048adb7dcfdeba4f94fbb977b26c3ab2fcb3
|
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
|
6af2ddd107842c3737c04c37343cac9be17f4209 |
|
17-Feb-2011 |
Andy McFadden <fadden@android.com> |
Defer marking of objects as finalizable This shifts responsibility for marking an object as "finalizable" from object creation to object initialization. We want to make the object finalizable when Object.<init> completes. For performance reasons we skip the call to the Object constructor (which doesn't do anything) and just take the opportunity to check the class flag. Handling of clone()d object isn't quite right yet. Also, fixed a minor glitch in stubdefs. Bug 3342343 Change-Id: I5b7b819079e5862dc9cbd1830bb445a852dc63bf
|
cb3081f675109049e63380170b60871e8275f9a8 |
|
14-Jan-2011 |
buzbee <buzbee@google.com> |
Consolidate mterp's debug/profile/suspend control This is a step towards full debug & profiling support in JIT'd code. Previously, the interpreter made multiple distinct checks for pending suspend requests, debugger and profiler checks at each safe point. This CL moves the individual controls into a single control word, significantly speeding up the safe-point check code path in the common fast case. In short, any time some VM component wants control to break at a safe point it will set a bit in gDvm.interpBreak, which will be examined at the safe point check in footer.S. In the old code, the safe point check consisted of 11 instructions (including 6 loads). The new sequence is 6 instructions (4 loads - two of which are needed and two are speculative to fill otherwise stalling slots). This code path is hot enough in the interpreter that we actually see some measureable speedups in benchmarks. The old sieve benchmark improves from 252 to 256 (~1.5%). As part of the change, global debuggerActive and activeProfilers variables have been eliminated as redundant. Note also that there is a subtle change in thread suspension. Thread suspend request counts are kept on a per-thread basis, and previously each thread would only examine its own suspend count. With this change, a bit has been allocated in interpBreak to signify that at least one suspend request is active across all threads. This bit is treated as "some thread is supposed to suspend, check to see if it's me". Change-Id: I527dc918f58d1486ef3324136080ef541a775ba8
|
f415bcc7f5211acae4f081f5d003d27a97b9d51a |
|
06-Jan-2011 |
Ben Cheng <bccheng@android.com> |
Update field offsets in InterpState per Jit-to-Interp cleanup Change-Id: Icf4aeac2fabbd0b6cd33f4d946055a9dc7e49f49
|
2e152baec01433de9c63633ebc6f4adf1cea3a87 |
|
16-Dec-2010 |
buzbee <buzbee@google.com> |
[JIT] Trace profiling support In preparation for method compilation, this CL causes all traces to include two entry points: profiling and non-profiling. For now, the profiling entry will only be used if dalvik is run with -Xjitprofile, and largely works like it did before. The difference is that profiling support no longer requires the "assert" build - it's always there now. This will enable us to do a form of sampling profiling of traces in order to identify hot methods or hot trace groups, while keeping the overhead low by only switching profiling on periodically. To turn the periodic profiling on and off, we simply unchain all existing translations and set the appropriate global profile state. The underlying translation lookup and chaining utilties will examine the profile state to determine which entry point to use (i.e. - profiling or non-profiling) while the traces naturally rechain during further execution. Change-Id: I9ee33e69e33869b9fab3a57e88f9bc524175172b
|
dfd1bbf07d98c82a6072182f705f64a30ebf480b |
|
23-Sep-2010 |
buzbee <buzbee@google.com> |
Experimental x86 Jit trace selection Experimental support for trace selection for x86 host mode operation. Not enabled by default. Turned on by setting WITH_HOST_DALVIK true and WITH_JIT true. When enabled, profiles during x86 fast interpreter operation, selects hot traces and "compiles" traces consisting of jumps back to the interpreter. First in a series of experimental x86 support checkins. Change-Id: I0e423ec58a7bf01f226cb486f55de2841fab1002
|
b78c76f88ea42e7a3b295c210ca9ee86e7290043 |
|
01-Oct-2010 |
buzbee <buzbee@google.com> |
GC Card marking fix for SPUT_OBJECT - use correct object head Change-Id: I8b84a4f1e1690f5b62de7404ea6ede00317848bb
|
b5f3c0b8222efea953adb94b97a2c70ba58e26e3 |
|
24-Aug-2010 |
Andy McFadden <fadden@android.com> |
Change the way thread suspension works. There are at least three ways to handle detection of thread suspension correctly: (1) hold a mutex, (2) pile all state into a single 32-bit location and use atomic ops, and (3) order the operations carefully. Of these, #3 has the least overhead on uniprocessors, so we're going with that. It does introduce one quirk, because we're now changing to "running" mode before checking to see if we're allowed to run. This creates a tiny window of opportunity for assertions and thread dumps to see what appears to be a thread that's running when it shouldn't be. This is correctable with additional work (e.g. transitioning through a pre-running state) but probably not worth worrying about. This eliminates the separate self->isSuspended flag in favor of the new THREAD_SUSPENDED thread state. Bug 2667016. (cherry-pick from dalvik-dev) Change-Id: Ibc77ebbb03a7993bc4057c1c375498172ca8ff1c
|
6dce996e16e8a7f8d538910221aa29df43eed9ed |
|
24-Aug-2010 |
Andy McFadden <fadden@android.com> |
Change the way thread suspension works. There are at least three ways to handle detection of thread suspension correctly: (1) hold a mutex, (2) pile all state into a single 32-bit location and use atomic ops, and (3) order the operations carefully. Of these, #3 has the least overhead on uniprocessors, so we're going with that. It does introduce one quirk, because we're now changing to "running" mode before checking to see if we're allowed to run. This creates a tiny window of opportunity for assertions and thread dumps to see what appears to be a thread that's running when it shouldn't be. This is correctable with additional work (e.g. transitioning through a pre-running state) but probably not worth worrying about. This eliminates the separate self->isSuspended flag in favor of the new THREAD_SUSPENDED thread state. Bug 2667016. Change-Id: I05c22ac5307fa3056fab854dfeed7aa1d76542f4
|
0d615c3ce5bf97ae65b9347ee77968f38620d5e8 |
|
18-Aug-2010 |
Andy McFadden <fadden@android.com> |
Always support debugging and profiling. This eliminates the use of the WITH_DEBUGGER and WITH_PROFILER conditional compilation flags. We've never shipped a device without these features, and it's unlikely we ever will. They're not worth the code clutter they cause. As usual, since I can't test the x86-atom code I left that alone and added an item to the TODO list. Bug 2923442. Change-Id: I335ebd5193bc86f7641513b1b41c0378839be1fe
|
7a2697d327936e20ef5484f7819e2e4bf91c891f |
|
07-Jun-2010 |
Ben Cheng <bccheng@android.com> |
Implement method inlining for getters/setters Changes include: 1) Force the trace that ends with an invoke instruction to include the next instruction if it is a move-result (because both need to be turned into no-ops if callee is inlined). 2) Interpreter entry point/trace builder changes so that return target won't automatically be considered as trace starting points (to avoid duplicate traces that include the move result instructions). 3) Codegen changes to handle getters/setters invoked from both monomorphic and polymorphic callsites. 4) Extend/fix self-verification to form identical trace regions and handle traces with inlined callees. 5) Apply touchups to the method based parsing - still not in use. Change-Id: I116b934df01bf9ada6d5a25187510e352bccd13c
|
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
|
d4f78d3a764e6aa8f7174c78f537c016dac7f7ec |
|
08-Jun-2010 |
Barry Hayes <bhayes@google.com> |
ALLOC_NO_GC is no longer used; remove it, and the nonCollectableRefs table. Clean up dvmHeapInitHeapRefTable's interface to know the default size. Change-Id: I535fdfe39924f6f65f286e2809002c2a0e6411b6
|
fbdcfb9ea9e2a78f295834424c3f24986ea45dac |
|
29-May-2010 |
Brian Carlstrom <bdc@google.com> |
Merge remote branch 'goog/dalvik-dev' into dalvik-dev-to-master Change-Id: I0c0edb3ebf0d5e040d6bbbf60269fab0deb70ef9
|
b88ec3cbb419b5eac23508dc6b73de2620d7521a |
|
17-May-2010 |
Ben Cheng <bccheng@android.com> |
Remove the write permission for the JIT code cache when not needed To support the feature, redesigned the predicted chaining mechanism so that the profile count is shared globally in InterpState. Bug: 2690371 Change-Id: Ifed427e8b1fa4f6c670f19e0761e45e2d4afdbb6
|
a497359afa1abe4c5780c8799c6fe0edab551c2d |
|
31-Mar-2010 |
Ben Cheng <bccheng@android.com> |
Fix a race condition in JIT state refresh under debugging / misc code cleanup. Bug: 2561283 Change-Id: I9fd94928f3e661de97098808340ea92b28cafa07
|
d5adae17d71e86a1a5f3ae7825054e3249fb7879 |
|
27-Mar-2010 |
Ben Cheng <bccheng@android.com> |
Improve JIT self verifier test coverage to follow single-step instructions. Bug: 2549326 Change-Id: I01412d4aac1379b61c90fe6e59c534b33be93f66
|
40094c16d9727cc1e047a7d4bddffe04dd566211 |
|
25-Feb-2010 |
Ben Cheng <bccheng@android.com> |
Tweak the interpreter entries and 2nd level trace filter to capture more traces. Real changes: 1) Add a new entry point from JIT to the interpreter to request hot traces w/o doing chaining. 2) Increase the granularity of the secondary profile filter to match 64-byte chunks using 64 entries. The remaining are just cosmetic changes.
|
fccb31dd58e5cb9f7a3f6e128d481f0ff35a51f0 |
|
05-Feb-2010 |
Bill Buzbee <buzbee@google.com> |
Jit: Start the Jit when framework signals on first screen draw Cleanup of delayed start - introduce dvmRelativeCondWait in Sync.c. Additionally, support for deadman timer to start Jit when no screen draws happen, and to start immediately when running stand-alone. Fixed bug in assert variant of libdvm - recent MONITOR change had neglected to add a new type of exit to the exit stats.
|
eb695c6f814f6b0bdbba0e837555d3fe5ad23104 |
|
05-Feb-2010 |
Bill Buzbee <buzbee@google.com> |
Jit: Start the Jit when framework signals on first screen draw Cleanup of delayed start - introduce dvmRelativeCondWait in Sync.c. Additionally, support for deadman timer to start Jit when no screen draws happen, and to start immediately when running stand-alone. Fixed bug in assert variant of libdvm - recent MONITOR change had neglected to add a new type of exit to the exit stats.
|
c3b92b26df6416d3179e865adccb283ee4170ab1 |
|
27-Jan-2010 |
Ben Cheng <bccheng@android.com> |
Fix performance issues related to chaining and unchaining. 1) Patching requests for predicted chaining cells (used by virtual/interface methods) are now batched in a queue and processed when the VM is paused for GC. 2) When the code cache is full the reset operation is also conducted at the end of GC pauses so this totally eliminates the need for the compiler thread to issue suspend-all requests. This is a very rare event and when happening it takes less than 5ms to finish. 3) Change the initial value of the branch in a predicted chaining cell from 0 (ie lsl r0, r0, #0) to 0xe7fe (ie branch to self) so that initializing a predicted chaining cell doesn't need to suspend all threads. Together with 1) seeing 20% speedup on some benchmarks. 4) Add TestCompability.c where defining "TEST_VM_IN_ECLAIR := true" in buildspec.mk will activate dummy symbols needed to run libdvm.so in older releases. Bug: 2397689 Bug: 2396513 Bug: 2331313
|
f5ceaebfe5633a16b11a7073d2bf36b5bb0c9945 |
|
02-Feb-2010 |
Bill Buzbee <buzbee@google.com> |
Jit: Rework monitor enter/exit to simplify thread suspension The Jit must stop all threads in order to flush the translation cache (and other tables). Threads which are blocked in a monitor wait cause some headache here because they effectively hold a references to the translation cache (though the return address on the native stack). The new model introduced in this CL is that for the fast path of monitor enter, control is allowed to resume in the translation cache. However, if we need to do a heavyweight lock (which may cause us to block) control does not return to the translation cache but instead bails out to the interpreter. This allows us to safely clear the code cache even if some threads are in THREAD_MONITOR state.
|
6999d84e2c55dc4a46a6c311b55bd5811336d9c4 |
|
27-Jan-2010 |
Ben Cheng <bccheng@android.com> |
Fix performance issues related to chaining and unchaining. 1) Patching requests for predicted chaining cells (used by virtual/interface methods) are now batched in a queue and processed when the VM is paused for GC. 2) When the code cache is full the reset operation is also conducted at the end of GC pauses so this totally eliminates the need for the compiler thread to issue suspend-all requests. This is a very rare event and when happening it takes less than 5ms to finish. 3) Change the initial value of the branch in a predicted chaining cell from 0 (ie lsl r0, r0, #0) to 0xe7fe (ie branch to self) so that initializing a predicted chaining cell doesn't need to suspend all threads. Together with 1) seeing 20% speedup on some benchmarks. 4) Add TestCompability.c where defining "TEST_VM_IN_ECLAIR := true" in buildspec.mk will activate dummy symbols needed to run libdvm.so in older releases. Bug: 2397689 Bug: 2396513 Bug: 2331313
|
c1d9ed490a7bd6caab51df41f3c9e590fcecb727 |
|
02-Feb-2010 |
Bill Buzbee <buzbee@google.com> |
Jit: Rework monitor enter/exit to simplify thread suspension The Jit must stop all threads in order to flush the translation cache (and other tables). Threads which are blocked in a monitor wait cause some headache here because they effectively hold a references to the translation cache (though the return address on the native stack). The new model introduced in this CL is that for the fast path of monitor enter, control is allowed to resume in the translation cache. However, if we need to do a heavyweight lock (which may cause us to block) control does not return to the translation cache but instead bails out to the interpreter. This allows us to safely clear the code cache even if some threads are in THREAD_MONITOR state.
|
964a7b06a9134947b5985c7f712d18d57ed665d2 |
|
28-Jan-2010 |
Bill Buzbee <buzbee@google.com> |
Jit: Rework delayed start plus misc. cleanup Defer initialization of jit to support upcoming feature to wait until first screen is painted to start in order to avoid wasting effort on jit'ng initialization code. Timed delay in place for the moment. To change the on/off state, call dvmSuspendAllThreads(), update the value of gDvmJit.pJitTable and then dvmResumeAllThreads(). Each time a thread goes through the heavyweight check suspend path, returns from a monitor lock/unlock or returns from a JNI call, it will refresh its on/off state. Also: Recognize and handle failure to increase size of JitTable. Avoid repeated lock/unlock of JitTable modification mutex during resize Make all work order enqueue actions non-blocking, which includes adding a non-blocking mutex lock: dvmTryLockMutex(). Fix bug Jeff noticed where we were using a half-word form of a Thumb2 instruction rather than the byte form. Minor comment changes.
|
7a0bcd0de6c4da6499a088a18d1750e51204c2a6 |
|
23-Jan-2010 |
Ben Cheng <bccheng@android.com> |
Tighten the safe points for code cache resets to happen. Add a new flag in the Thread struct to track the whereabout of the top frame in each Java thread. It is not safe to blow away the code cache if any thread is in the JIT'ed land.
|
fcccb3bfa5f42fc728c307cfcf77db4d685583c0 |
|
30-Oct-2009 |
Barry Hayes <bhayes@google.com> |
Remove arrayClass from ClassObject. It seems to get only dozens of hits in all of Zygote start-up. There doesn't seem to be a measurable difference in the time printed in: I/Zygote ( 2247): ...preloaded 1147 classes in NNNNms.
|
342806dae77556290dfe0760e6fe3117d812c7ba |
|
08-Dec-2009 |
Bill Buzbee <buzbee@google.com> |
Jit: Save/restore callee-save floating point registers at interpreter entry/exit
|
72e93344b4d1ffc71e9c832ec23de0657e5b04a5 |
|
13-Nov-2009 |
Jean-Baptiste Queru <jbq@google.com> |
eclair snapshot
|
d726991ba52466cde88e37aba4de2395b62477fa |
|
10-Nov-2009 |
Bill Buzbee <buzbee@google.com> |
Jit stress mode: translate everything we can and self verify. This represents a general clean-up of some existing command-line options: -Xjitthreshold:num and -Xjitblocking. The jit threshold controls how quickly we treat a Dalvik address as a potential trace head. Normally this is set around 200 (and the range is 0..255, where 0 is in effect 256 and 1 means begin trace selection on first visit). -Xjitblocking forces the system to pause execution whenever a translation request is made and resume when that translation is complete. Normally the system make a request but continues execution (to avoid jitter). Additionally, if WITH_SELF_VERIFICATION is defined, we force blocking to be true, and set the threshold to 1. And finally, we treat threshold==1 as a special case and disable the 2nd-level trace-building filter - which causes the system to immediately start trace selection.
|
93c995b8eab585a05b058ed17ec1b391c4946d77 |
|
03-Nov-2009 |
Ben Cheng <bccheng@google.com> |
Hide JIT-specific constants when JIT is not configured.
|
6c10a977ec892c26c8e306356491833bbb073d40 |
|
29-Oct-2009 |
Ben Cheng <bccheng@google.com> |
Implement chaining up to the first 64 cases in a switch statement.
|
fd023aaec5f2b0df61d1702ea2f29a70abe90158 |
|
02-Nov-2009 |
Bill Buzbee <buzbee@google.com> |
Jit - optimized inline string compareto, indexof; fill_array_data bug fix Added flushAllRegs() prior to C handlers in preparation for upcoming support for holding live/dirty values in physical registers.
|
ccd6c0102d1f898aaea1c94761167fdd083b5275 |
|
15-Oct-2009 |
Ben Cheng <bccheng@google.com> |
Make the traige process for self-verification found divergence easier. 1. Automatically replay the code compilation with verbose mode turned on for the offending compilation. 3. Mark the registers with divergence explicitly. 2. Print accurate operand names using the dataflow attributes. Constant values are still printed for reference only. 3. Fixed a few correctness/style issues in self-verification code.
|
d5ab726b65d7271be261864c7e224fb90bfe06e0 |
|
25-Aug-2009 |
Andy McFadden <fadden@android.com> |
Another round of scary indirect ref changes. This change adds a not-really-working implementation to Jni.c, with various changes #ifdefed throughout the code. The ifdef is currently disabled, so the old behavior should continue. Eventually the old version will be stripped out and the ifdefs removed. This renames the stack's "localRefTop" field, which nudged a bunch of code. The name wasn't really right before (it's the *bottom* of the local references), and it's even less right now. This and one other mterp-visible constant were changed, which caused some ripples through mterp and the JIT, but the ifdeffing was limited to one in asm-constants.h (and the constant is the same both ways, so toggling the ifdef won't require rebuilding asm sources). Some comments and arg names in ReferenceTable were updated for the correct orientation of bottom vs. top. Some adjustments were made to the JNI code, e.g. dvmCallMethod now needs to understand if it needs to convert reference arguments from local/global refs to pointers (it's called from various places throughout the VM).
|
97319a8a234e9fe1cf90ca39aa6eca37d729afd5 |
|
13-Aug-2009 |
Jeff Hao <jeffhao@google.com> |
New changes to enable self verification mode.
|
d51370ff814e88b63baa3b1f5300b6560330c12d |
|
06-Aug-2009 |
Andy McFadden <fadden@android.com> |
Switch to <stdbool.h> in the VM. We were using an enum that made the compiler unhappy on MacOS X. This switches us to using <stdbool.h> when it's available. The size of a "bool" is either sizeof(_Bool) or sizeof(enum bool), and the assembly sources dislike ambiguity, so this also changes gDvm.debuggerActive to always be a single byte. The ARM and x86 code was already assuming that -- held over from when enums were variable-width, and never fixed because we get the right answer on little-endian platforms -- so it doesn't look like we need to change anything in mterp.
|
2717622484eb0f7ad537275f7260b2f93324eda2 |
|
09-Jun-2009 |
Bill Buzbee <buzbee@google.com> |
Makes the primary Jit table growable. Also includes a change suggested earlier by Dan to use a pre-defined mask in the hash function. Reduce the default JitTable size from 2048 entries to 512 entries. Update per Ben's comments.
|
ba4fc8bfc1bccae048403bd1cea3b869dca61dd7 |
|
01-Jun-2009 |
Ben Cheng <bccheng@android.com> |
Initial port of the Dalvik JIT enging to the internal repository. Fixed files with trailing spaces. Addressed review comments from Dan. Addressed review comments from fadden. Addressed review comments from Dan x 2. Addressed review comments from Dan x 3.
|
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
|
bcd637a94f10b49d18b87a74a015f9d3453ed77a |
|
22-Jan-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //branches/cupcake/...@127436
|
cc05ad238516f1303687aba4a978e24e57c0c07a |
|
10-Jan-2009 |
The Android Open Source Project <initial-contribution@android.com> |
auto import from //branches/cupcake/...@125939
|
2ad60cfc28e14ee8f0bb038720836a4696c478ad |
|
21-Oct-2008 |
The Android Open Source Project <initial-contribution@android.com> |
Initial Contribution
|