1. 27 Jan, 2011 1 commit
  2. 14 Jan, 2011 2 commits
  3. 13 Jan, 2011 2 commits
  4. 12 Jan, 2011 1 commit
    • Carl Shapiro's avatar
      Handle the case of referent clearing during tracing. · 4d7dd569
      Carl Shapiro authored
      Reference objects with non-null referent fields are collected during
      tracing for processing after the trace has completed.  Before the
      trace was made concurrent there was no way for a reference with a
      non-null referent field to have its referent become null by any action
      of the garbage collector after it was discovered.  Assertions were
      placed in the reference processing code to check this invariant.
      
      After the trace was made concurrent it became possible for a user to
      clear the referent field of an already discovered reference.  This
      violates the assertions in the reference processing code.
      
      This change replaces the assertions in the reference processing code
      with logic to deal with null referent fields.  The assert in the
      SoftReference preservation code has been converted to a continue that
      short circuits the preservation logic.  The assert in the white
      reference clearing code short circuits the clearing and enqueueing.
      
      Bug: 3342757
      Change-Id: I967b011485e2691b2752500a3488fbcb54f129d3
      4d7dd569
  5. 05 Jan, 2011 1 commit
  6. 30 Nov, 2010 1 commit
    • buzbee's avatar
      Fix for Issue 3161543 - Remove stray line of code in JIT · ebcd8646
      buzbee authored
      During Change 22370 "Thumb/Thumb2 instruction selection rework"
      line 1689 of Codegen.c was inadvertently duplicated and deposited
      in the unrelated function genPuntToInterp() at line 1732.
      
      genPuntToInterp() is rarely used and half of the time (if the
      roll-back Dalvik PC was word-aligned) the error would have been
      benign.  However, if the Dalvik PC is not word-aligned, the result
      would be a seg fault.
      
      The fix is to remove the line of code.
      
      Change-Id: Ib2ffb80059a639923c342a36797eb6c4995c5218
      ebcd8646
  7. 09 Nov, 2010 2 commits
    • Andy McFadden's avatar
      am 886130bc: (-s ours) Two patches. · e9503ef8
      Andy McFadden authored
      * commit '886130bc':
        Two patches.
      e9503ef8
    • Andy McFadden's avatar
      Two patches. · 886130bc
      Andy McFadden authored
      Patch 1a+1b: Set capabilities sooner.
      
      (cherry-pick from gingerbread I22fde728bd5d65774f8fdf1fa45956fe18358c4c)
      (hand-pick from gingerbread Ief58bdfff2cb82d7824ef796c2c1031f525f6ee9,
       plus minor tweak to avoid altering the API)
      
      Patch 3: If there's an error dropping privileges, abort.
      
      (cherry-pick from gingerbread I85ce12e93cb8c297add756dc3b872b8346eda00b)
      
      Bug 3176774
      
      Change-Id: If8285d7bfd5a466bd77c0f7ffadf1bf96d31db06
      886130bc
  8. 30 Oct, 2010 3 commits
  9. 29 Oct, 2010 1 commit
  10. 27 Oct, 2010 1 commit
  11. 26 Oct, 2010 1 commit
    • Ben Cheng's avatar
      Fix for array lower-bound check for count-down loops. · 36bd1345
      Ben Cheng authored
      If the counted loop is composed as
      
      for (int i = hi; i >= lo; i--) {
          .. = array[i];
      }
      
      The hoisted lower-bound check should be asserting "lo >= 0".
      On the other hand if the counted loop is composed as
      
      for (int i = hi; i > lo; i--) {
          .. = array[i];
      }
      
      The hoisted lower-bound check should be asserting "lo + 1 >= 0".
      Previously these two checks are reversed.
      
      Bug: 3130818
      Change-Id: Ibc5a6daa837880e9986e45bbc29d1a5e548be3ae
      36bd1345
  12. 20 Oct, 2010 1 commit
    • Carl Shapiro's avatar
      Fix class loader interning following a String.intern. · 2e3ec716
      Carl Shapiro authored
      Strings can be intered by the class loader, in the case of string
      literals, or by the user, through String.intern.  Literal strings
      exist for the life of their referencing classes.  User strings are
      weak and may be garbage collected when unreferenced.  These two
      classes of strings are kept in seprate tables for the conveniance of
      the garbage collector during root traversal.
      
      When a class loader interns a string that was already interned by the
      user the runtime must move the string from the intern table to the
      literal table to increase the reference strength.  Previously, this
      was implemented by inserting the incoming string into the literal
      table and removing any matching strings in the intern table.  This
      transition lost pointer equality.  With this change we first insert
      the exact string from the intern table into the literal table and
      secondly remove its reference from the intern table.  By moving the
      string between tables pointer equality is preserved.
      
      At this point lookupInternedString should be split into two functions,
      possibly by pulled up the relevant bits into the public interface
      functions.  Since this change will be merged to gingerbread I will
      leave the clean up to a separate change.
      
      Bug: 3098960
      2e3ec716
  13. 19 Oct, 2010 3 commits
  14. 18 Oct, 2010 2 commits
    • Carl Shapiro's avatar
      Exit early if the we encounter a null reference. · 8e14bc72
      Carl Shapiro authored
      Bug: 3108418
      Change-Id: I057e7a674e2ab96671f4651811071b6810250528
      8e14bc72
    • Andy McFadden's avatar
      Pop call frame before boxing result · 7b4c1d52
      Andy McFadden authored
      After reflective method calls, primitive results need to be boxed
      up in an appropriate object.  This generally requires allocating an
      object of the appropriate type.  We were doing this before popping
      the call frame, which meant that if the allocation caused a GC we
      would be scanning results out of a "dead" stack frame.
      
      We hit a case where a register went from holding a reference to
      holding a primitive right before the method returned.  The exported
      PC was pointing at the last GC point, where the register was expected
      to hold a reference, so precise GC was getting very confused.
      
      Bug 3102352.
      
      (cherry-pick from dalvik-dev)
      
      Change-Id: I21f59f1d70689d9e4901deb3100c756fd85223e7
      7b4c1d52
  15. 14 Oct, 2010 1 commit
  16. 13 Oct, 2010 1 commit
  17. 11 Oct, 2010 5 commits
    • Andy McFadden's avatar
      3f01142e
    • Carl Shapiro's avatar
      Add include guards to avoid multiple definitions. · 44dcf29d
      Carl Shapiro authored
      Change-Id: I2a52823325a0a582a746890af7f040324d671806
      44dcf29d
    • Andy McFadden's avatar
      Added some threading notes · 8eb34d5a
      Andy McFadden authored
      Explain thread attach/detach, behavior of threads running native code.
      Added pthread_key_create destructor note to backward compatibility
      section.
      
      Change-Id: I954708c9ec7c83ba951c0f512c88d5c610a49411
      8eb34d5a
    • Carl Shapiro's avatar
    • Carl Shapiro's avatar
      Use the break position of the current mspace for sizing the zygote heap. · 88c57e18
      Carl Shapiro authored
      Previously, the mspace footprint used the "overhead" of a heap which
      underestimates the size of the zygote heap by 16 bytes, the specific
      size of a descriptor deposited at the start of an mspace containing
      the control information about that mspace.  If a heap is a multiple of
      a page or within 15 bytes of it, the size of the new heap would be
      underestimated.
      
      Bad things happened when this underestimate was used to create an
      application heap.  The starting address of the application heap was
      based on a correctly computed value instead of the underestimate.
      This caused the application heap to be one page to large and end one
      page beyond where it should.  This additional page happened to overlap
      the first page one of the heap bitmaps.  Furthermore, the mspace
      routine would proceed access protect that page thinking it was unused
      free space.  During the next GC reads to the first page of the bitmap
      would generate a SIGSEGV.
      
      By using the break position, correctly rounded, for all sizing
      computations this problem no longer exists.
      
      Change-Id: Icb3c82731e589747e8e4cf16d0797052e64b3ad5
      88c57e18
  18. 10 Oct, 2010 2 commits
    • Andy McFadden's avatar
      Verify method invocation type. · 5276cccb
      Andy McFadden authored
      Dalvik provides five different ways to invoke a method (virtual, super,
      direct, static, interface).  Using a virtual invoke instruction to call
      a direct method will not produce the desired results.
      
      This adds a test to the verifier that ensures the method targeted by
      an invocation instruction is of an appropriate kind.
      
      Bug 3082885.
      
      (cherry-pick from dalvik-dev)
      
      Change-Id: I3237cbefc7314f0b9d7557fc0bfd2b548ea30938
      5276cccb
    • Dan Bornstein's avatar
      Clarify the invoke-* opcodes. · 9be25d09
      Dan Bornstein authored
      In particular, make it a little more explicit what kinds of methods
      are acceptable for each variant.
      
      Change-Id: Icd9dad876c2d10c23462b4d85ccaa9441d7f2c04
      9be25d09
  19. 01 Oct, 2010 4 commits
  20. 30 Sep, 2010 3 commits
    • Elliott Hughes's avatar
      Change Runtime.nativeLoad to return the dlerror(3) string. · f584b4a5
      Elliott Hughes authored
      This has a companion change in libcore:
        https://android-git.corp.google.com/g/71342
      
      Bug: 3044042
      Change-Id: I070a80a41ec2f306f5092a641807017f70179451
      f584b4a5
    • Andy McFadden's avatar
      Correct dexopt for uniprocessors. · d8b5f50d
      Andy McFadden authored
      The SMP flag was defaulting to "true" for dexopt, even on uniprocessors.
      With this change the VM now has three choices: dexopt for SMP, dexopt
      for uniprocessor, or dexopt for current system.  The last is used for
      just-in-time dexopt (used by -eng and -userdebug builds on bootstrap DEX
      files) and installd dexopt (used for apps on all builds).
      
      The dexopt used by the build system during -user builds will either be
      explicitly SMP or explicitly uniprocessor, since "current system" has
      no meaning when you're cross-dexopting.
      
      Also, unified the dexopt control flags into a single enum.
      
      (cherry-pick from dalvik-dev)
      
      Change-Id: Id1d9c548ca8567585a28ef9ee911cc2ac6b116dd
      d8b5f50d
    • Dan Bornstein's avatar
      Be explicit about both uniprocessor and SMP when calling dexopt. · f45b6cbe
      Dan Bornstein authored
      Change-Id: Ic1b68dddf6822773041de6023c594a062e141325
      f45b6cbe
  21. 29 Sep, 2010 2 commits