1. 10 Jun, 2015 1 commit
    • Man Cao's avatar
      Add allocation stack traces for HPROF dump. · 8c2ff641
      Man Cao authored
      This feature is currently only enabled when DDMS's allocation tracking
      is enabled. In the future there should be a way to enable this feature
      before an application starts.
      
      Also updates DDMS's recent allocation tracking to use a new backend
      data structure that is shared with this feature.
      
      The following system properties controls customizable parameters:
      dalvik.vm.allocTrackerMax: max number of objects that have allocation
                                 records, default 512K;
      
      dalvik.vm.recentAllocMax:  max number of records that are sent to DDMS
                                 when clicking "Get allocation" button,
                                 default 64K-1 (limit of the protocol);
      
      dalvik.vm.allocStackDepth: max number of stack frames in an allocation
                                 record, default 4.
      
      Bug: 20037135
      Change-Id: I26ed378a5613678bd3c43e846025f90470a8e059
      8c2ff641
  2. 22 Apr, 2015 1 commit
    • Mathieu Chartier's avatar
      Replace NULL with nullptr · 2cebb24b
      Mathieu Chartier authored
      Also fixed some lines that were too long, and a few other minor
      details.
      
      Change-Id: I6efba5fb6e03eb5d0a300fddb2a75bf8e2f175cb
      2cebb24b
  3. 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
  4. 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
  5. 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
  6. 02 Jun, 2014 1 commit
    • Tim Murray's avatar
      DO NOT MERGE · ffddfdf6
      Tim Murray authored
      Merge ART from AOSP to lmp-preview-dev.
      
      Change-Id: I0f578733a4b8756fd780d4a052ad69b746f687a9
      ffddfdf6
  7. 22 May, 2014 1 commit
  8. 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
  9. 27 Mar, 2014 1 commit
  10. 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
  11. 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
  12. 24 Sep, 2013 1 commit
  13. 29 Aug, 2013 1 commit
  14. 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
  15. 10 Jan, 2013 1 commit
  16. 13 Dec, 2012 2 commits
    • Elliott Hughes's avatar
      Move logging.h into base/logging.h. · 07ed66b5
      Elliott Hughes authored
      Change-Id: Id68f85f7c3a71b156cb40dec63f94d4fb827f279
      07ed66b5
    • Elliott Hughes's avatar
      Move mutex.h into base/mutex.h. · 76b61674
      Elliott Hughes authored
      We don't actually need any hackery to get the right mutex.h any
      more, but since we planned on having the google3-like stuff
      in google3-like locations, this is an easy one to fix.
      
      Change-Id: Ie27464ebbc208a6f4e694a97cf26b1cee0737009
      76b61674
  17. 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
  18. 05 Oct, 2012 1 commit
  19. 26 Sep, 2012 1 commit
  20. 20 Sep, 2012 1 commit
  21. 05 Sep, 2012 1 commit
    • Ian Rogers's avatar
      Rename GlobalSynchronization to Locks · b726dcb5
      Ian Rogers authored
      Also address some review comments in common_throws relating to
      ToStr<InvokeType> and exception detail messages.
      
      Change-Id: Ibf2c0f147689fa236d349bd7f01eed3c2522552b
      b726dcb5
  22. 31 Aug, 2012 1 commit
  23. 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
  24. 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
  25. 25 May, 2012 2 commits
  26. 14 Apr, 2012 1 commit
  27. 16 Mar, 2012 3 commits
    • Elliott Hughes's avatar
      Fix all our unused parameter warnings so we let GCC report them. · 1bac54ff
      Elliott Hughes authored
      There were a couple of genuine bugs here (fixed), plus there's a missing
      feature in trace.cc that I've just added a TODO for.
      
      Also note that I haven't touched the compilers; this warning is still
      explicitly disabled for that code. I'll do that when there's less going
      on in those directories.
      
      Change-Id: Ic3570bf82411a07c7530bfaf1995ac995b9fc00f
      1bac54ff
    • Elliott Hughes's avatar
      Remove anonymous namespaces. · 0512f02d
      Elliott Hughes authored
      No one likes them and we're pretty inconsistent at using them. We're
      much better with 'static'.
      
      Change-Id: I65eeffd0fb60633edca30923af0caedb06a0105d
      0512f02d
    • Elliott Hughes's avatar
      Make CheckJNI and JNI workarounds mutually exclusive... · 88c5c355
      Elliott Hughes authored
      ...in the opposite direction; needing workarounds turns off CheckJNI.
      This isn't necessarily a good idea, but I like the cleanup parts of
      this change.
      
      Change-Id: I708235ea3e5cc35ef90b01dd810e097e3ff9dd26
      88c5c355
  28. 09 Mar, 2012 1 commit
  29. 02 Mar, 2012 1 commit
    • Elliott Hughes's avatar
      libcorkscrew native stacks, mutex ranking, and better ScopedThreadListLock. · ffb465f2
      Elliott Hughes authored
      This change uses libcorkscrew to show native stacks for threads in kNative or,
      unlike dalvikvm, kVmWait --- working on the runtime directly I've found it
      somewhat useful to be able to see _which_ internal resource we're waiting on.
      We can always take that back out (or make it oatexecd-only) if it turns out to
      be too noisy/confusing for app developers.
      
      This change also lets us rank mutexes and enforce -- in oatexecd -- that you
      take locks in a specific order.
      
      Both of these helped me test the third novelty: removing the heap locking from
      ScopedThreadListLock. I've manually inspected all the callers and added a
      ScopedHeapLock where I think one is necessary. In manual testing, this makes
      jdb a lot less prone to locking us up. There still seems to be a problem with
      the JDWP VirtualMachine.Resume command, but I'll look at that separately. This
      is a big enough and potentially disruptive enough change already.
      
      Change-Id: Iad974358919d0e00674662dc8a69cc65878cfb5c
      ffb465f2
  30. 25 Jan, 2012 1 commit
  31. 10 Nov, 2011 1 commit
  32. 09 Nov, 2011 1 commit
  33. 07 Nov, 2011 1 commit
    • Elliott Hughes's avatar
      Fix at least two deadlocks. · bbd9d830
      Elliott Hughes authored
      Pretty much every caller that takes the thread list lock can then go on to
      cause allocation, which requires the heap lock. The GC always takes the heap
      lock first and the thread list lock second (to suspend/resume other threads).
      Cue deadlocks.
      
      This patch is a pretty degenerate fix that basically makes the thread list
      lock irrelevant; we now always take the heap lock first.
      
      Change-Id: I0537cffb0b841bfb5033789817793734d75dfb31
      bbd9d830
  34. 27 Oct, 2011 2 commits