Age | Commit message (Collapse) | Author |
|
Fix a data race on state_and_flags. Since the access was volatile
and there are system calls in the loop, this is extremely unlikey
to have casused the bug here, but ...
So, assuming this is still broken, produce more informative
output once we time out.
Remove unused argument from SuspendThreadByPeer(). It made the
logic more complicated and made it harder to reason about
correctness.
Remove dead code after LOG(FATAL, ...)
Bug: 181778559
Test: TreeHugger, temporarily paste log message into hotter path.
Merged-In: I6f3455925b3a3f4726a870150aeb54ea60a38d67
(cherry picked from commit 9d27fbc8ced914f4726187920a7794b07eca3e71)
Change-Id: Ia3f04153fb0a4f1b899fb0f68a6121728f89cb91
(cherry picked from commit 116203735734738cbfdffc2163b08b1707089f9c)
|
|
Simplify the code by ignoring active transactions. Writing
to fields of a newly allocated object does not need to be
recorded as aborting the transaction removes all references
to the new object and it's unnecessary to roll back writes
to unreachable object's fields.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: aosp_taimen-userdebug boots.
Change-Id: Ia91d3274398b0ca0f5b0040dcf323921d915b657
|
|
Handles runtime.
Bug: 116054210
Test: WITH_TIDY=1 mmma art
Change-Id: Ibc0d5086809d647f0ce4df5452eb84442d27ecf0
|
|
Use Clang-tidy's modernize-use-override to add more annotations. Ignore
inferred annotations on destructors.
Bug: 32619234
Test: mmma art
Change-Id: Ic432c928e398d44df9171e42db04ee19946e6887
|
|
Test: Rely on TreeHugger.
Change-Id: I9cae11191ef1567ae9453be498882a7767285140
|
|
Add Thread.CreateAnnotatedStackTrace to return an array that
contains an AnnotatedStackTraceElement for each stack frame,
with the StackTraceElement describing the frame, an array
containing all objects that are locked at the described location,
and optionally for the top frame an object the thread is blocked
on, waiting for or sleeping on.
Add a test.
Bug: 70538431
Test: m test-art-host
Test: art/test/testrunner/testrunner.py -b --host -t 168
Change-Id: I0d92e3d8182c4a592549a6445854816f71afd29e
|
|
Make GetThreadStack generic wrt/ a function being called to generate the
stack. In preparation for new code.
Bug: 70538431
Test: m test-art-host
Change-Id: I7e2b6583b28ad89bc645acdc9549f2f0a25ea055
|
|
Let clang-format reorder the header includes.
Derived with:
* .clang-format:
BasedOnStyle: Google
IncludeIsMainRegex: '(_test|-inl)?$'
* Steps:
find . -name '*.cc' -o -name '*.h' | xargs sed -i.bak -e 's/^#include/ #include/' ; git commit -a -m 'ART: Include cleanup'
git-clang-format -style=file HEAD^
manual inspection
git commit -a --amend
Test: mmma art
Change-Id: Ia963a8ce3ce5f96b5e78acd587e26908c7a70d02
|
|
Enable the can_suspend jvmti capability and implement all required
functionality associated with it.
Test: ./test.py --host -j40
Bug: 34415266
Bug: 62821960
Bug: 63579748
Change-Id: I83b92de7f81622e1658114b034918e8295805b6e
|
|
More self-documenting and more type safe.
Bug: 62821960
Test: ./test.py
Change-Id: Ic7a1ae6a25e687d65f5aa10c1aad54a7b80dd086
|
|
Move the helper closer to the users.
Test: m test-art-host
Change-Id: Id05ce5f60af54d0c5aef0c7d8932706c4602fc94
|
|
Move jni_macros.h to the clients (users of RegisterNativeMethods).
Test: mmma art
Change-Id: I052ac9f703ec69f0a2df1efcaf9f4a450eb7be1c
|
|
Switches all (248) methods that previously used !bang JNI in art/libcore
to all use @FastNative.
Also deprecate !bang JNI since nothing in Android seems to (or should
be) using it anymore.
This measures to be a 3% startup time improvement in system_server.
Test: make test-art-host
Bug: 34955272
Change-Id: I0881f401c7660c79f275235362777bfa58241deb
|
|
Motivated by https://android-review.googlesource.com/#/c/333205/.
Test: test-art-host run-jdwp-test.sh
Change-Id: I173c060324aa0dc39144db55e3a97e672c012ba8
|
|
Instead of suspending the heap task thread, GetThreadStack (called by
VMStack_fillStackTraceElements and VMStack_getThreadStackTrace) will
return an empty thread stack. This fixes possible deadlocks caused by
suspending the GC thread and doing allocations for the stack trace.
Bug: 28261069
Test: test-art-host
Change-Id: I45a0b8ac94a99d6bbcfcdc2b41afadf941ec0138
|
|
Bug: 31113334
Test: test-art-host
Change-Id: I67eb89cf042c762c6dcd5eb8b008b9a28e9b3319
|
|
Also fixed inclusion of -inl.h files in .h files by adding
scoped_object_access-inl.h and scoped_fast_natvie_object_access-inl.h
Changed AddLocalReference / Decode to use ObjPtr.
Changed libartbenchmark to be debug to avoid linkage errors.
Bug: 31113334
Test: test-art-host
Change-Id: I4d2e160483a29d21e1e0e440585ed328b9811483
|
|
This coincides with the actual attribute name and upstream usage.
Preparation for deferring to libbase.
Test: m
Test: m test-art-host
Change-Id: Ia8986b5dfd926ba772bf00b0a35eaf83596d8518
|
|
Usage replaces most SuspendAll and ResumeAll calls.
Change-Id: I355683a5365876242cea85a656dcb58455f7a294
|
|
Fixes the TransitionFromRunnableToSuspended and
TransitionFromSuspendedToRunnable pattern that was prone to errors.
Change-Id: Ie6ae9c0357c83b4fc4899d05dfa0975553170267
|
|
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
|
|
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
|
|
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
|
|
- Add test for Class.forName(..., ..., null)
- Simplify VMStack.getClosestUserClassLoader based on new behavior of Class.forName(..., ..., null)
Change-Id: I6bc470e20fa177e8a3debe55c90a84eef7ef518e
|
|
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
|
|
Enable -Wno-conversion-null, -Wredundant-decls and -Wshadow in general,
and -Wunused-but-set-parameter for GCC builds.
Change-Id: I81bbdd762213444673c65d85edae594a523836e5
|
|
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 37c16453a92bbf1a47f042000318a1b60381017d)
Change-Id: I51832785d4b4b431e035318e75635f442e89a1fb
|
|
Bug: 16867274
(cherry picked from commit ab61295e55c38072095e498053b8f5bebf46ad63)
Change-Id: I5466af563032041ef4a547894f40f303871302c6
|
|
When the call stack does not have the three methods we expect,
the visitor will return a nullptr value.
Add a test to JniTest (and refactor the test a little for code reuse).
Bug: 16867274
(cherry picked from commit 61bf6a1c80bf797af5d7911ff71fc367fdb36742)
Change-Id: I5fb8f91f372a41e0bc11ef9f70640834591afa53
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|