1. 11 Sep, 2015 1 commit
  2. 04 Sep, 2015 1 commit
    • Mathieu Chartier's avatar
      Add ScopedThreadSuspension · f1d666e1
      Mathieu Chartier authored
      Fixes the TransitionFromRunnableToSuspended and
      TransitionFromSuspendedToRunnable pattern that was prone to errors.
      
      Change-Id: Ie6ae9c0357c83b4fc4899d05dfa0975553170267
      f1d666e1
  3. 22 Jul, 2015 1 commit
    • Mathieu Chartier's avatar
      Move to newer clang annotations · 90443477
      Mathieu Chartier authored
      Also enable -Wthread-safety-negative.
      
      Changes:
      Switch to capabilities and negative capabilities.
      
      Future work:
      Use capabilities to implement uninterruptible annotations to work
      with AssertNoThreadSuspension.
      
      Bug: 20072211
      
      Change-Id: I42fcbe0300d98a831c89d1eff3ecd5a7e99ebf33
      90443477
  4. 02 Jun, 2015 1 commit
    • Mathieu Chartier's avatar
      Move mirror::ArtMethod to native · 3d21bdf8
      Mathieu Chartier authored
      Optimizing + quick tests are passing, devices boot.
      
      TODO: Test and fix bugs in mips64.
      
      Saves 16 bytes per most ArtMethod, 7.5MB reduction in system PSS.
      Some of the savings are from removal of virtual methods and direct
      methods object arrays.
      
      Bug: 19264997
      
      (cherry picked from commit e401d146)
      
      Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d
      
      Fix some ArtMethod related bugs
      
      Added root visiting for runtime methods, not currently required
      since the GcRoots in these methods are null.
      
      Added missing GetInterfaceMethodIfProxy in GetMethodLine, fixes
      --trace run-tests 005, 044.
      
      Fixed optimizing compiler bug where we used a normal stack location
      instead of double on ARM64, this fixes the debuggable tests.
      
      TODO: Fix JDWP tests.
      
      Bug: 19264997
      
      Change-Id: I7c55f69c61d1b45351fd0dc7185ffe5efad82bd3
      
      ART: Fix casts for 64-bit pointers on 32-bit compiler.
      
      Bug: 19264997
      Change-Id: Ief45cdd4bae5a43fc8bfdfa7cf744e2c57529457
      
      Fix JDWP tests after ArtMethod change
      
      Fixes Throwable::GetStackDepth for exception event detection after
      internal stack trace representation change.
      
      Adds missing ArtMethod::GetInterfaceMethodIfProxy call in case of
      proxy method.
      
      Bug: 19264997
      Change-Id: I363e293796848c3ec491c963813f62d868da44d2
      
      Fix accidental IMT and root marking regression
      
      Was always using the conflict trampoline. Also included fix for
      regression in GC time caused by extra roots. Most of the regression
      was IMT.
      
      Fixed bug in DumpGcPerformanceInfo where we would get SIGABRT due to
      detached thread.
      
      EvaluateAndApplyChanges:
      From ~2500 -> ~1980
      GC time: 8.2s -> 7.2s due to 1s less of MarkConcurrentRoots
      
      Bug: 19264997
      Change-Id: I4333e80a8268c2ed1284f87f25b9f113d4f2c7e0
      
      Fix bogus image test assert
      
      Previously we were comparing the size of the non moving space to
      size of the image file.
      
      Now we properly compare the size of the image space against the size
      of the image file.
      
      Bug: 19264997
      Change-Id: I7359f1f73ae3df60c5147245935a24431c04808a
      
      [MIPS64] Fix art_quick_invoke_stub argument offsets.
      
      ArtMethod reference's size got bigger, so we need to move other args
      and leave enough space for ArtMethod* and 'this' pointer.
      
      This fixes mips64 boot.
      
      Bug: 19264997
      Change-Id: I47198d5f39a4caab30b3b77479d5eedaad5006ab
      3d21bdf8
  5. 30 May, 2015 1 commit
    • Mathieu Chartier's avatar
      Move mirror::ArtMethod to native · e401d146
      Mathieu Chartier authored
      Optimizing + quick tests are passing, devices boot.
      
      TODO: Test and fix bugs in mips64.
      
      Saves 16 bytes per most ArtMethod, 7.5MB reduction in system PSS.
      Some of the savings are from removal of virtual methods and direct
      methods object arrays.
      
      Bug: 19264997
      Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d
      e401d146
  6. 11 May, 2015 1 commit
    • Nicolas Geoffray's avatar
      Add a flag to StackVisitor for inlining. · 8e5bd18f
      Nicolas Geoffray authored
      The flag tells whether the stack walk needs to include inlined
      Java frames.
      
      This does not do anything just yet, as we're not inlining anyways.
      
      Change-Id: I716e25094fe56fa335ca1f9a398c1bcdba478e73
      8e5bd18f
  7. 22 Apr, 2015 1 commit
    • Brian Carlstrom's avatar
      Class.forName(..., ..., null) fixes · 59885472
      Brian Carlstrom authored
      - Add test for Class.forName(..., ..., null)
      - Simplify VMStack.getClosestUserClassLoader based on new behavior of Class.forName(..., ..., null)
      
      Change-Id: I6bc470e20fa177e8a3debe55c90a84eef7ef518e
      59885472
  8. 12 Nov, 2014 1 commit
    • Ian Rogers's avatar
      Modify the behavior of thread suspend shootouts. · 4ad5cd3e
      Ian Rogers authored
      The thread doing the suspension doesn't attempt to suspend the other thread
      unless it knows another thread isn't trying to suspend it. Use the suspend
      count, and its lock, for this purpose.
      Re-enable ThreadStress test.
      Bug: 15446488
      
      Change-Id: Idd34410c7b89d8abd6973e5699a15ca699472c78
      4ad5cd3e
  9. 05 Nov, 2014 1 commit
    • Andreas Gampe's avatar
      ART: More warnings · 277ccbd2
      Andreas Gampe authored
      Enable -Wno-conversion-null, -Wredundant-decls and -Wshadow in general,
      and -Wunused-but-set-parameter for GCC builds.
      
      Change-Id: I81bbdd762213444673c65d85edae594a523836e5
      277ccbd2
  10. 28 Aug, 2014 2 commits
    • Brian Carlstrom's avatar
      Fix issue with Thread.setName hanging after Thread.start · ba32de47
      Brian Carlstrom authored
      When suspending a thread by peer the invariant that only attached threads are
      suspended must be maintained. Add a ThreadList::Contains check which requires
      making this method non-static.
      Add some extra thread logging.
      
      Bug: 17302037
      
      (cherry picked from commit 37c16453)
      
      Change-Id: I51832785d4b4b431e035318e75635f442e89a1fb
      ba32de47
    • Brian Carlstrom's avatar
      Fix issue with Thread.setName hanging after Thread.start · 37c16453
      Brian Carlstrom authored
      When suspending a thread by peer the invariant that only attached threads are
      suspended must be maintained. Add a ThreadList::Contains check which requires
      making this method non-static.
      Add some extra thread logging.
      
      Bug: 17302037
      Change-Id: I89af9840e398c2ceadeb736c431dfe3be8f3ba06
      37c16453
  11. 14 Aug, 2014 1 commit
  12. 13 Aug, 2014 1 commit
  13. 14 Aug, 2014 2 commits
  14. 18 Jul, 2014 2 commits
    • Ian Rogers's avatar
      Avoid race in single thread suspension. · f3d874c6
      Ian Rogers authored
      Don't allow more than one concurrent single thread suspension to avoid
      potential cycles and deadlocks where threads try to suspend each other.
      Bug: 16364458, 16354227
      
      Change-Id: I907f1d5591a6aa5c241d37d6b4a34f968f98df77
      f3d874c6
    • Ian Rogers's avatar
      Avoid race in single thread suspension. · 6093a5c2
      Ian Rogers authored
      Don't allow more than one concurrent single thread suspension to avoid
      potential cycles and deadlocks where threads try to suspend each other.
      Bug: 16364458, 16354227
      
      (cherry picked from commit f3d874c6)
      
      Change-Id: I907f1d5591a6aa5c241d37d6b4a34f968f98df77
      6093a5c2
  15. 02 Apr, 2014 1 commit
    • Sebastien Hertz's avatar
      Cleanup transaction support · ee1d79a6
      Sebastien Hertz authored
      Updates Thread::CreateInternalStackTrace to support both transactional and
      non-transactional modes using template.
      
      Generalizes non-transactional mode for invariant fields (which are set only
      once).
      
      Removes ArrayLog::VisitRoots as we never create Array logs of ObjectArray. As
      ObjectArray elements are set using Object::SetFieldObject, they are already
      recorded in the object logs: the object is the array itself and the offset
      corresponds to the element index in this array. And also checks we never log
      ObjectArray in array logs.
      
      Fixes location of thrown exception when calling native method during class
      initialization.
      
      Change-Id: Idbc368d3b8292b85ff40bc8a7c559e085477bf89
      ee1d79a6
  16. 14 Mar, 2014 1 commit
    • Ian Rogers's avatar
      Refactor reflective method invocation. · 53b8b09f
      Ian Rogers authored
      Move invocation code out of JNI internal into reflection, including ArgArray
      code. Make reflective invocation use the ArgArray to build arguments rather
      than allocating a jvalue[] and unboxing arguments into that.
      Move reflection part of jni_internal_test into reflection_test.
      Make greater use of fast JNI.
      
      Change-Id: Ib381372df5f9a83679e30e7275de24fa0e6b1057
      53b8b09f
  17. 07 Feb, 2014 1 commit
    • Ian Rogers's avatar
      Object model changes to support 64bit. · ef7d42fc
      Ian Rogers authored
      Modify mirror objects so that references between them use an ObjectReference
      value type rather than an Object* so that functionality to compress larger
      references can be captured in the ObjectRefererence implementation.
      ObjectReferences are 32bit and all other aspects of object layout remain as
      they are currently.
      
      Expand fields in objects holding pointers so they can hold 64bit pointers. Its
      expected the size of these will come down by improving where we hold compiler
      meta-data.
      Stub out x86_64 architecture specific runtime implementation.
      Modify OutputStream so that reads and writes are of unsigned quantities.
      Make the use of portable or quick code more explicit.
      Templatize AtomicInteger to support more than just int32_t as a type.
      Add missing, and fix issues relating to, missing annotalysis information on the
      mutator lock.
      Refactor and share implementations for array copy between System and uses
      elsewhere in the runtime.
      Fix numerous 64bit build issues.
      
      Change-Id: I1a5694c251a42c9eff71084dfdd4b51fff716822
      ef7d42fc
  18. 20 Oct, 2013 1 commit
    • Ian Rogers's avatar
      Fast JNI support. · 1eb512d3
      Ian Rogers authored
      Use a modifier to signal a native method is a fast JNI method. If the
      modifier is set then don't perform runnable transitions.
      
      Change-Id: I7835b4d837bfdd1cb8e2d54b919c0d5e6cf90499
      1eb512d3
  19. 02 Oct, 2013 1 commit
    • Ian Rogers's avatar
      Inflate contended lock word by suspending owner. · d9c4fc94
      Ian Rogers authored
      Bug 6961405.
      Don't inflate monitors for Notify and NotifyAll.
      Tidy lock word, handle recursive lock case alongside unlocked case and move
      assembly out of line (except for ARM quick). Also handle null in out-of-line
      assembly as the test is quick and the enter/exit code is already a safepoint.
      To gain ownership of a monitor on behalf of another thread, monitor contenders
      must not hold the monitor_lock_, so they wait on a condition variable.
      Reduce size of per mutex contention log.
      Be consistent in calling thin lock thread ids just thread ids.
      Fix potential thread death races caused by the use of FindThreadByThreadId,
      make it invariant that returned threads are either self or suspended now.
      
      Code size reduction on ARM boot.oat 0.2%.
      Old nexus 7 speedup 0.25%, new nexus 7 speedup 1.4%, nexus 10 speedup 2.24%,
      nexus 4 speedup 2.09% on DeltaBlue.
      
      Change-Id: Id52558b914f160d9c8578fdd7fc8199a9598576a
      d9c4fc94
  20. 14 Aug, 2013 1 commit
    • Brian Carlstrom's avatar
      Refactor java.lang.reflect implementation · ea46f950
      Brian Carlstrom authored
      Cherry-picked from commit ed41d5c44299ec5d44b8514f6e17f802f48094d1.
      
      Move to ArtMethod/Field instead of AbstractMethod/Field and have
      java.lang.reflect APIs delegate to ArtMethod/ArtField.
      
      Bug: 10014286.
      
      Change-Id: Iafc1d8c5b62562c9af8fb9fd8c5e1d61270536e7
      ea46f950
  21. 13 Jul, 2013 1 commit
    • Brian Carlstrom's avatar
      Create separate Android.mk for main build targets · 7940e44f
      Brian Carlstrom authored
      The runtime, compiler, dex2oat, and oatdump now are in seperate trees
      to prevent dependency creep.  They can now be individually built
      without rebuilding the rest of the art projects. dalvikvm and jdwpspy
      were already this way. Builds in the art directory should behave as
      before, building everything including tests.
      
      Change-Id: Ic6b1151e5ed0f823c3dd301afd2b13eb2d8feb81
      7940e44f
  22. 18 Mar, 2013 1 commit
    • Ian Rogers's avatar
      Various performance improvements. · 4f6ad8ab
      Ian Rogers authored
      Performance had regressed due to verify object and method invocation changes.
      Avoid trampolines for static calls in same class.
      Various inlining changes.
      Make verify object something that's only compiled-in in debug builds.
      
      Change-Id: Ia261a52232c3b10667c668f8adfadc0da3048bc5
      4f6ad8ab
  23. 31 Jan, 2013 1 commit
    • Ian Rogers's avatar
      Directory restructuring of object.h · 2dd0e2ce
      Ian Rogers authored
      Break object.h into constituent files.
      Reduce number of #includes in other GC header files.
      Introduce -inl.h files to avoid mirror files #include-ing each other.
      Check invariants of verifier RegTypes for all constructors.
      
      Change-Id: Iecf1171c02910ac152d52947330ef456df4043bc
      2dd0e2ce
  24. 23 Jan, 2013 1 commit
    • Ian Rogers's avatar
      Refactor StackVisitor to take a Thread*. · 7a22fa65
      Ian Rogers authored
      This allows assertion checking on the thread, principally that we never try to
      walk the stack of an unsuspended thread.
      Fix bug in the OwnedMonitorVisitor where GetVReg could be called on a
      StackVisitor with no context.
      
      Change-Id: I06539b624b253b6fb7385e7be11a4bced1d417b2
      7a22fa65
  25. 10 Jan, 2013 1 commit
  26. 02 Jan, 2013 1 commit
  27. 01 Dec, 2012 1 commit
    • Ian Rogers's avatar
      Turn the thread peer_ into a Object*. · cfaa4553
      Ian Rogers authored
      Don't use a JNI global ref for the thread peer_ so that we can
      support more threads than we can global refs. This fixes run-test 51.
      Fix a race in thread destruction where a thread may be requested to
      suspend while deleting itself.
      
      Change-Id: Id8756a575becf80d2a0be0a213325034556927f1
      cfaa4553
  28. 14 Nov, 2012 1 commit
  29. 26 Sep, 2012 1 commit
  30. 31 Aug, 2012 1 commit
  31. 14 Aug, 2012 1 commit
    • Ian Rogers's avatar
      Global lock levels. · 00f7d0ea
      Ian Rogers authored
      Introduce the notion of the mutators/GC being a shared-exclusive (aka
      reader-writer) lock. Introduce globally ordered locks, analysable by
      annotalysis, statically at compile time. Add locking attributes to
      methods.
      
      More subtly, remove the heap_lock_ and split between various locks that
      are held for smaller periods (where work doesn't get blocked). Remove
      buggy Dalvik style thread transitions. Make GC use CMS in all cases when
      concurrent is enabled. Fix bug where suspend counts rather than debug
      suspend counts were sent to JDWP. Move the PathClassLoader to
      WellKnownClasses. In debugger refactor calls to send request and
      possibly suspend. Break apart different VmWait thread states. Move
      identity hash code to a shared method.
      
      Change-Id: Icdbfc3ce3fcccd14341860ac7305d8e97b51f5c6
      00f7d0ea
  32. 27 Jun, 2012 1 commit
    • Elliott Hughes's avatar
      Include held locks in SIGQUIT thread dumps. · 08fc03ae
      Elliott Hughes authored
      Handy if you have an ANR that's locking related. Quick tour:
      
         at org.apache.harmony.dalvik.NativeTestTarget.emptyJniStaticSynchronizedMethod0(Native method)
         - locked <0x60135aa8> (a java.lang.Class<org.apache.harmony.dalvik.NativeTestTarget>)
         at java.lang.reflect.Method.invoke(Native method)
         at C.whileTrue(Main.java:63)
         at C.synchronizedOnClassString(Main.java:56)
         - locked <0x60002a70> (a java.lang.Class<java.lang.String>)
         at C.nestedSynchronizationWithTryCatch(Main.java:44)
         - locked <0x61336b90> (a java.lang.String)
         - locked <0x61336bd0> (a java.lang.String)
         at C.nestedSynchronization(Main.java:35)
         - locked <0x61336b18> (a java.lang.String)
         - locked <0x61336b50> (a java.lang.String)
         at C.synchronizedOnClassC(Main.java:30)
         - locked <0x613366f8> (a java.lang.Class<C>)
         at C.noLocks(Main.java:27)
         at C.<clinit>(Main.java:24)
         - locked <0x613366f8> (a java.lang.Class<C>)
         at Main.main(Main.java:19)
      
      A non-static synchronized native method works too:
      
         at org.apache.harmony.dalvik.NativeTestTarget.emptyJniSynchronizedMethod0(Native method)
         - locked <0x613371a8> (a org.apache.harmony.dalvik.NativeTestTarget)
         ...
      
      Note that most stack traces don't look any different; the above is a
      pathological example that exercises different kinds of locking. Testing
      with system_server shows most threads don't hold any locks.
      
      Future work (marked by TODO) is that explicit JNI MonitorEnter calls in
      native code aren't shown.
      
      Change-Id: I2747f5cddb4ef64b1935736f084a68fe8e4005e9
      08fc03ae
  33. 26 Jun, 2012 1 commit
    • Ian Rogers's avatar
      Increase use of ScopedJniThreadState. · 365c1023
      Ian Rogers authored
      Move the routines for changing Object* to jobject and vice-versa
      (AddLocalReference and Decode) to ScopedJniThreadState to enforce use of
      Object*s in the Runnable thread state. In the Runnable thread state
      suspension is necessary before GC can take place.
      
      Reduce use of const ClassLoader* as the code bottoms out in FindClass
      and with a field assignment where the const is cast away (ie if we're
      not going to enforce the const-ness we shouldn't pretend it is).
      
      Refactor the Thread::Attach API so that we're not handling raw Objects on
      unattached threads.
      
      Remove some unreachable code.
      
      Change-Id: I0fa969f49ee6a8f10752af74a6b0e04d46b4cd97
      365c1023
  34. 22 Jun, 2012 1 commit
  35. 25 May, 2012 2 commits
  36. 14 Apr, 2012 1 commit