History log of /dalvik/vm/mterp/out/InterpC-x86.c
Revision Date Author Comments
5540f6e420ffab7bb0c39dc508bdc3a2e0d67507 08-Feb-2010 Bill Buzbee <buzbee@google.com> Jit: Remove references to interpState from C interpreter

Fix for Issue 2157987:
Eventual isssue with interpState->jitState in <dalvik/vm/mterp/c/header.c
4fbba1f95b3e27bdc5f5572bb0420b5f928aa54e 03-Feb-2010 Andy McFadden <fadden@android.com> Fix stack overflow edge case.

When a stack overflows, Dalvik allows the stack to expand into a
"reserved" area, so that it has enough room to create and initialize the
StackOverflowError object. While the stack is expanded we also do the
search for an appropriate "catch" block, which may require resolving
some exception classes.

As it happens, things go badly when the "catch" resolution throws an
exception. The VM tries to shrink the stack back down after the second
exception is finished, rather than waiting for the initial SOE to
finish. Since we still have some additional frames on the stack, we're
still occupying the "reserved" area, and the VM aborts when it detects
the situation.

This changes the stack cleanup to wait until the SOE is being dealt
with.

For bug 2398031.
b0a0541b59d1126ff77c88de742b4a74579fe296 19-Nov-2009 Andy McFadden <fadden@android.com> Add execute-inline/range instruction.

Like "execute-inline", this is an instruction generated by dexopt that
replaces a method invoke instruction. It's useful for small, frequently
called methods in the core libs.

As with execute-inline, we allow at most 4 arguments, but with /range
we're no longer limited to the low 16 registers.

Also: marked execute-inline as being able to throw an exception.

Needed: native x86 implementation; support in JIT.

For bug 2268232.
96516932f1557d8f48a8b2dbbb885af01a11ef6e 29-Oct-2009 Andy McFadden <fadden@android.com> Change the way breakpoints work.

This replaces the breakpoint mechanism with a more efficient approach.
We now insert breakpoint instructions into the bytecode stream instead of
maintaining a table. This requires mapping DEX files as private instead
of shared, which allows copy-on-write to work. mprotect() is used to
guard the pages against inadvertent writes.

Unused opcode EC is now OP_BREAKPOINT. It's not recognized by dexdump or
any interpreter except portdbg, but it can be encountered by the bytecode
verifier (the debugger can request breakpoints in unverified code).
Breakpoint changes are blocked while the verifier runs to avoid races.

This eliminates method->debugBreakpointCount, which is no longer needed.
(Also, it clashed with LinearAlloc's read-only mode.)

The deferred verification error mechanism was using a code-copying
approach to modify the bytecode stream. That has been changed to use
the same copy-on-write modification mechanism.

Also, normalized all PAGE_SIZE/PAGESIZE references to a single
SYSTEM_PAGE_SIZE define.

Simple Fibonacci computation test times (opal-eng):
JIT, no debugger: 10.6ms
Fast interp, no debugger: 36ms
Portable interp, no debugger: 43.8ms

ORIG debug interp, no breakpoints set: 458ms
ORIG debug interp, breakpoint set nearby: 697ms

NEW debug interp, no breakpoints set: 341ms
NEW debug interp, breakpoints set nearby: 341ms

Where "nearby" means there's a breakpoint in the method doing the
computation that isn't actually hit -- the VM had an optimization where
it flagged methods with breakpoints and skipped some of the processing
when possible.

The bottom line is that code should run noticeably faster while a
debugger is attached.
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.
dc84bb2b1657d88c5543eb22b875c297d49e709d 02-Oct-2009 Ben Cheng <bccheng@google.com> Fix trace builder to not confuse self-verification.
79d173cad420b2ef99a09688e603df7ea4f890e9 30-Sep-2009 Ben Cheng <bccheng@google.com> Fixed the trace builder to correctly handle excpetion throwing instruction.

Added a new unit test 081-hot-exceptions to target this problem.
6ed1a0f396a1857c31b486d3e93ee2dbeb49a6cd 11-Sep-2009 Andy McFadden <fadden@android.com> Display additional information on stack overflow.

This required passing an additional argument into dvmHandleStackOverflow,
which is called directly from mterp. Fortunately the method being
called is sitting in a register for both ARM and x86, so this is a
fairly simple change.

For internal bug 2110533.
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).
080ca4a5498eab5548856a0b8de91e3ab1e89a64 05-Aug-2009 Andy McFadden <fadden@android.com> Regenerate mterp.

Whoops! Should've been part of d33b0c3fbd81ae96c5d5c034030d62caac33c310.
be74aeb457df67355ce7c16721ecc436c8fd770a 29-Jul-2009 Bill Buzbee <buzbee@google.com> Fix for 1857865: Need x86 implementation for OP_THROW_VERIFICATION_ERROR
85745e148153894aac52ad3d7f6a36a7767b45a0 08-Jul-2009 Mike Lockwood <lockwood@android.com> Fix variable names related to bytecode tracing.

Signed-off-by: Tony Yokoyama <chuuoudai@gmail.com>

The compile errors, encountered in the case that macro LOG_INSTR is
turned on, are fixed.

On branch log_instr
Changes to be committed:

modified: vm/mterp/armv5te/debug.c
modified: vm/mterp/c/gotoTargets.c
modified: vm/mterp/out/InterpC-allstubs.c
modified: vm/mterp/out/InterpC-armv4.c
modified: vm/mterp/out/InterpC-armv5te.c
modified: vm/mterp/out/InterpC-portdbg.c
modified: vm/mterp/out/InterpC-portstd.c
modified: vm/mterp/out/InterpC-x86.c
modified: vm/mterp/portable/debug.c
modified: vm/oo/Class.c
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.
b51ea11c70602918c42764bfafe92a997d3b1803 09-May-2009 Andy McFadden <fadden@android.com> Defer reporting of certain verifier failures.

The verifier currently reports all failures immediately. Certain failures,
such as the failure to resolve a method, or the determination that access
to a field is not allowed, are supposed to deferred until the first time
that executing code does something that could cause the resolution.

With this change, several kinds of verification failures are deferred.
This is done by making a writable copy of the bytecode and replacing the
failing instruction with an "always throw" opcode.

Gory details:
- Added throw-verification-error instruction. Implemented in "portable"
and ARM interpreters. x86 uses portable form through stub.
- Added a function that creates a copy of a DexCode area and makes the
bytecodes writable.
- Added code that replaces a single instruction with an "always throw".
- Replaced runtime check for abstract/interface in new-instance with a
check at verification time.
- Added a test to exercise the deferred error mechanism.
- Minor cleanups (replaced tab, bad valgrind command, ...).
99409883d9c4c0ffb49b070ce307bb33a9dfe9f1 19-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import //branches/master/...@140412
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
31e30105703263782efd450d356cd67ea01af3b7 03-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@132589
6dcac3deb3c19dc634470eb30b2daedf2b201bd4 03-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@137055
5d709784bbf5001012d7f25172927d46f6c1abe1 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
89c1feb0a69a7707b271086e749975b3f7acacf7 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589