Skip to content
Commits on Jan 26, 2010
  1. Cause dex verification to fail if the class_defs section contains more

    Dan Bornstein committed
    than one definition for any given class.
    Bonus: Killed off a bunch of trailing whitespace, to reduce the gerrit
    Change-Id: Idc599364f1a38887fb4b9f91dc91b9b53343ca03
    Bug: 2382215
Commits on Dec 4, 2009
  1. @fadden

    Added additional DEX checksum.

    fadden committed
    We have a checksum on the base DEX data, but not on the stuff that
    dexopt appends.  If a flash block goes "funny" we might not be able to
    detect the problem.  This change adds a checksum field to the
    "optimized" header.
    The new checksum is verified under the same circumstances as the base
    DEX checksum: when you use "dexdump", and when you enable additional
    checking with -Xcheckdexsum (or the property dalvik.vm.check-dex-sum
    is set to "true").
    For bug 2255640.
Commits on Nov 24, 2009
  1. @fadden

    Fix windows SDK build.

    fadden committed
    Broken by 9651693.
Commits on Nov 20, 2009
  1. @fadden

    Add execute-inline/range instruction.

    fadden committed
    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.
Commits on Nov 17, 2009
  1. @fadden

    Restore support for DEX on FAT.

    fadden committed
    The recent change to mmap(read-write)+mprotect(read-only) doesn't seem
    to work on FAT filesystems like /sdcard.  This caused problems for the
    code that opens Zip files and the code that opens DEX files.
    This change splits the "map file" function into "read only" and
    "writable read only" versions, using the former for Zip and the latter
    for DEX.  Further, failure to mprotect(read-only) is now considered a
    soft failure and only causes a warning.
    The only apps that will be affected by this are those using /sdcard to
    hold optimized DEX data for "plugin" APKs.
    Also: moved the non-HAVE_POSIX_FILEMAP implementation of file mapping
    into a shared function.  (Could probably go away entirely.)
    Also: fixed the expected output for test 071.
Commits on Nov 16, 2009
  1. @fadden

    Change the way breakpoints work.

    fadden committed
    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.
Commits on Sep 21, 2009
  1. Allow dalvik pre-optimization to run in ARMv7 emulator.

    David 'Digit' Turner committed
    This sad hack is used to allow the Dex preopt pass to run properly
    in ARMv7 emulation mode. Without it, the function dvmComputeWidths()
    aborts the VM in ways that are hard to properly understand.
    This issue has been discussed extensively with fadden, which provided
    the patch. It seems that adding both log lines fixes it, but only using
    one will not. I'm suspecting an emulation bug, or even worse, a C compiler
    bug that would generate invalid machine code.
    NOTE: The dex pre-optimization pass of user builds requires to run
          the DexOpt in the emulator for all -user builds. While this patch
          might not fix the underlying issue, it allows us to generate these
          images correctly (along with a few other system hacks).
Commits on Jul 10, 2009
  1. Inline-execute for Java.Lang.Math routines, jit codegen restructure, …

    Bill Buzbee committed
    …various bug fixes.
Commits on Jun 4, 2009
  1. Initial port of the Dalvik JIT enging to the internal repository.

    Ben Cheng committed
    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.
Commits on May 18, 2009
  1. @fadden

    Defer reporting of certain verifier failures.

    fadden committed
    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, ...).
Commits on May 7, 2009
  1. @fadden

    Added throw-verification-error instruction.

    fadden committed
    This is for the deferred verifier error reporting.  It replaces OP_UNUSED_ED.
    The instructions aren't actually used yet, which is good since the x86
    version hasn't been written yet.
    The mterp regen also pushed out some recent-ish changes that hadn't
    propagated to the armv4t sources.
Commits on May 6, 2009
  1. @fadden
  2. @fadden

    Added XML output mode for dexdump.

    fadden committed
    This adds an output mode that looks similar to the "current.xml" we
    generate for our public APIs.  There are a number of differences in
    content.  The original ("plain") output has not been altered.
    I pulled in the bad checksum handling change (internal 142686) since
    it's small, has turned out to be useful, and might make the merge of
    this to master slightly easier.
    This also renames a buffer in the ongoing temp file variable saga.
Commits on May 5, 2009
  1. am 6d874d2: Merge change 993 into donut

    Android (Google) Code Review committed with The Android Open Source Project
    Merge commit '6d874d2bda563ada1034d2b3219b35d800fc6860'
    * commit '6d874d2bda563ada1034d2b3219b35d800fc6860':
      Pull fix from master branch, and correct filename juggling.
  2. @fadden

    Pull fix from master branch, and correct filename juggling.

    fadden committed
    The original fix was in p4 144906.  This also corrects some problems that
    arise when the temp file is specified.
Commits on Apr 8, 2009
  1. AI 144906: Default to failure, not success.

    Andy McFadden committed with The Android Open Source Project
    Automated import of CL 144906
Commits on Apr 2, 2009
  1. AI 144278: Some changes to make examination of flaky devices easier.

    Andy McFadden committed with The Android Open Source Project
      Added "dexcheck" shell script, which runs the dexdump checksum
      verification against every file in /data/dalvik-cache.
      Added "-c" flag to dexdump, which quits after the checksum test
      (faster than sending everything to /dev/null).
      Initialize a ZipArchive struct earlier; without this dexdump was
      crashing in some situations when dealing with a nonexistent file.
    Automated import of CL 144278
Commits on Mar 30, 2009
  1. AI 143506: Fix swap issue affecting big-endian machines.

    Andy McFadden committed with The Android Open Source Project
      Reported on android-porting mailing list (by "Anand Android").
      Also renamed a local that shadowed an earlier local.
    Automated import of CL 143506
Commits on Mar 27, 2009
  1. AI 143123: Three minor changes.

    Andy McFadden committed with The Android Open Source Project
      1. detab "dx" script
      2. log an error when annotation value parsing fails
      3. slightly improve a resolver failure message
    Automated import of CL 143123
Commits on Mar 25, 2009
  1. Automated import from //branches/master/...@141645,141645

    Andy McFadden committed with The Android Open Source Project
Commits on Mar 19, 2009
  1. auto import //branches/master/...@140412

    The Android Open Source Project committed
Commits on Mar 4, 2009
  1. auto import from //depot/cupcake/@135843

    The Android Open Source Project committed
  2. auto import from //depot/cupcake/@135843

    The Android Open Source Project committed
Commits on Feb 13, 2009
  1. auto import from //branches/cupcake/...@131421

    The Android Open Source Project committed
Commits on Feb 10, 2009
  1. auto import from //branches/cupcake/...@130745

    The Android Open Source Project committed
Commits on Jan 20, 2009
  1. auto import from //branches/cupcake/...@127101

    The Android Open Source Project committed
Commits on Jan 10, 2009
  1. auto import from //branches/cupcake/...@125939

    The Android Open Source Project committed
Commits on Dec 18, 2008
  1. Code drop from //branches/cupcake/...@124589

    The Android Open Source Project committed
Commits on Oct 21, 2008
  1. Initial Contribution

    The Android Open Source Project committed
Something went wrong with that request. Please try again.