OSDN Git Service

android-x86/art.git
7 years agoReduce calls to DescriptorEquals
Mathieu Chartier [Thu, 1 Dec 2016 22:21:11 +0000 (14:21 -0800)]
Reduce calls to DescriptorEquals

Store the low 3 bits of the descriptor hash inside of class set
entries. Compare these bits before comparing descriptors.

Simpleperf interpret-only compile of facebook:
mirror::Class::DescriptorEquals(char const*): 3.66% -> 1.03%

Bug: 32641252

Test: test-art-host

Change-Id: I8d898d4ac7c95383c49401fbcd85bfde226e026c

7 years agoMerge "Address comments I missed on a previous CL"
Treehugger Robot [Mon, 5 Dec 2016 21:08:20 +0000 (21:08 +0000)]
Merge "Address comments I missed on a previous CL"

7 years agoMerge "Dump more debug info for b/33006388."
Hiroshi Yamauchi [Mon, 5 Dec 2016 19:00:37 +0000 (19:00 +0000)]
Merge "Dump more debug info for b/33006388."

7 years agoMerge "ART: Clean up Thread"
Treehugger Robot [Mon, 5 Dec 2016 17:49:35 +0000 (17:49 +0000)]
Merge "ART: Clean up Thread"

7 years agoAddress comments I missed on a previous CL
Alex Light [Sat, 3 Dec 2016 01:27:31 +0000 (17:27 -0800)]
Address comments I missed on a previous CL

I accidentally missed some comments on
android-review.googlesource.com/c/305518 when I submitted it. This
addresses those comments.

Test: mma -j40 test-art-host
Change-Id: Icd8ff65dee1730d10489f25e75bddbd455c68413

7 years agoMerge "ART: Weaken boot classpath initialization check"
Treehugger Robot [Mon, 5 Dec 2016 16:08:58 +0000 (16:08 +0000)]
Merge "ART: Weaken boot classpath initialization check"

7 years agoMerge "Re-enable libcore test WeakHashMapTest#test_keySet."
Roland Levillain [Mon, 5 Dec 2016 11:45:13 +0000 (11:45 +0000)]
Merge "Re-enable libcore test WeakHashMapTest#test_keySet."

7 years agoMerge "Don't use an internal timeout, rely on the test harness one."
Nicolas Geoffray [Mon, 5 Dec 2016 11:16:59 +0000 (11:16 +0000)]
Merge "Don't use an internal timeout, rely on the test harness one."

7 years agoMerge "Set the root table size when allocating."
Nicolas Geoffray [Mon, 5 Dec 2016 11:15:04 +0000 (11:15 +0000)]
Merge "Set the root table size when allocating."

7 years agoMerge "Set the location checksum in vdex."
Nicolas Geoffray [Mon, 5 Dec 2016 10:08:07 +0000 (10:08 +0000)]
Merge "Set the location checksum in vdex."

7 years agoSet the root table size when allocating.
Nicolas Geoffray [Mon, 5 Dec 2016 00:10:09 +0000 (00:10 +0000)]
Set the root table size when allocating.

In order to deallocate it at any point.

test: ART_TEST_JIT=true m test-art-host-run-test-jit
Change-Id: I36574fd1a34c9d67800a164fa801db7a17c827bf

7 years agoDon't use an internal timeout, rely on the test harness one.
Nicolas Geoffray [Sun, 4 Dec 2016 22:32:24 +0000 (22:32 +0000)]
Don't use an internal timeout, rely on the test harness one.

test: 522-checker-regression-monitor-exit
Change-Id: Ida2ebd609f2902908476f1061459838f0c181f1a

7 years agoMerge "Disable test 080 for GSS"
Treehugger Robot [Sat, 3 Dec 2016 07:36:24 +0000 (07:36 +0000)]
Merge "Disable test 080 for GSS"

7 years agoDisable test 080 for GSS
Mathieu Chartier [Sat, 3 Dec 2016 02:35:16 +0000 (18:35 -0800)]
Disable test 080 for GSS

Failing due to space sizing.

Test: test-art-host-run-test ART_DEFAULT_GC_TYPE=GSS ART_USE_TLAB=true ART_TEST_OPTIMIZING=true ART_TEST_INTERPRETER=true ART_TEST_JIT=true ART_USE_READ_BARRIER=false

Change-Id: I7a899395b547f3c49b7edba3500e18674aecda24

7 years agoMerge "Cleanup of redefinition testing"
Treehugger Robot [Sat, 3 Dec 2016 02:49:23 +0000 (02:49 +0000)]
Merge "Cleanup of redefinition testing"

7 years agoDump more debug info for b/33006388.
Hiroshi Yamauchi [Sat, 3 Dec 2016 01:01:51 +0000 (17:01 -0800)]
Dump more debug info for b/33006388.

Bug: 33006388
Bug: 12687968
Test: test-art-host with CC.
Change-Id: Id9d67bc603c6ff7bc8e346e181e3e09ffbda43b3

7 years agoART: Clean up Thread
Andreas Gampe [Mon, 28 Nov 2016 16:10:18 +0000 (08:10 -0800)]
ART: Clean up Thread

Move debug code to .cc, simplify includes.

Test: m test-art-host
Change-Id: I5e66a54223a8f965a46fb14021d0e29aa2496ed1

7 years agoMerge "ART: Clean up ClassLinker"
Treehugger Robot [Sat, 3 Dec 2016 01:20:05 +0000 (01:20 +0000)]
Merge "ART: Clean up ClassLinker"

7 years agoMerge "Add more detail to rosalloc fragmentation OOME"
Mathieu Chartier [Fri, 2 Dec 2016 22:44:34 +0000 (22:44 +0000)]
Merge "Add more detail to rosalloc fragmentation OOME"

7 years agoCleanup of redefinition testing
Alex Light [Fri, 2 Dec 2016 19:40:56 +0000 (11:40 -0800)]
Cleanup of redefinition testing

Move redefine logic into a single common function and perform some
other cleanup.

Test: mma -j40 test-art-host
Change-Id: I8618bda4f392b683ce198374066e356b87578e7b

7 years agoART: Clean up ClassLinker
Andreas Gampe [Fri, 2 Dec 2016 00:58:38 +0000 (16:58 -0800)]
ART: Clean up ClassLinker

Try to clean up and simplify ClassLinker.

Move dex_lock to Locks. Remove dead code. Move single-use
code to user. Hide implementation details from header.

Test: m test-art-host
Change-Id: I58150fa9c2a9524f8304370270c2197d655cb3a8

7 years agoAdd more detail to rosalloc fragmentation OOME
Mathieu Chartier [Fri, 2 Dec 2016 01:41:17 +0000 (17:41 -0800)]
Add more detail to rosalloc fragmentation OOME

Also include total number of free page bytes, space footprint, and
space max capacity.

Sample output:
Throwing OutOfMemoryError "Failed to allocate a 7012 byte allocation
with 103464 free bytes and 101KB until OOM; failed due to
fragmentation (required continguous free 8192 bytes, largest
contiguous free 4096 bytes, total free pages 4096 bytes, space
footprint 268435456 bytes, space max capacity 268435456 bytes)

Added a basic test to ensure the allocator coalesces properly.

Bug: 32997082

Test: test-art-host

Change-Id: I642b6ad34b98f6d98c10f242a6f6e926e0b42acc

7 years agoMerge "ART: Fix typo in IsCallerSave"
Treehugger Robot [Fri, 2 Dec 2016 16:32:43 +0000 (16:32 +0000)]
Merge "ART: Fix typo in IsCallerSave"

7 years agoART: Fix typo in IsCallerSave
Matthew Gharrity [Mon, 15 Aug 2016 14:56:41 +0000 (07:56 -0700)]
ART: Fix typo in IsCallerSave

Correctly refer to floating point registers, if necessary. This
ensures that we correctly start allocating caller-save FPRs.

Bug: 31275200
Test: ART_TEST_OPTIMIZING_GRAPH_COLOR=true m test-art-host
Change-Id: I420b66f0a000636e8370c739003de3cf53af3e30

7 years agoMerge "ART: Delete unnecessary ScopedObjectAccess"
Treehugger Robot [Fri, 2 Dec 2016 16:30:41 +0000 (16:30 +0000)]
Merge "ART: Delete unnecessary ScopedObjectAccess"

7 years agoMerge "ART: Add verifier support for invoke-polymorphic."
Treehugger Robot [Fri, 2 Dec 2016 11:52:14 +0000 (11:52 +0000)]
Merge "ART: Add verifier support for invoke-polymorphic."

7 years agoART: Add verifier support for invoke-polymorphic.
Orion Hodson [Thu, 13 Oct 2016 09:25:54 +0000 (10:25 +0100)]
ART: Add verifier support for invoke-polymorphic.

Change-Id: I1e1860cad80db46320c3ef5a9eaceb7529ea68d7
Bug: 30550796,33099829,33191712
Test: make test-art-host

7 years agoART: Delete unnecessary ScopedObjectAccess
Andreas Gampe [Fri, 2 Dec 2016 03:32:26 +0000 (19:32 -0800)]
ART: Delete unnecessary ScopedObjectAccess

This isn't protecting or serializing anything. Reduces
dex2oatd compile time.

Test: m test-art-host
Change-Id: I8e6d1579578740b526070ba784b81bd0590e84b1

7 years agoMerge "Fix PACKED for jvalue"
Mathieu Chartier [Fri, 2 Dec 2016 00:51:49 +0000 (00:51 +0000)]
Merge "Fix PACKED for jvalue"

7 years agoMerge "Class Hierarchy Analysis (CHA)"
Mingyao Yang [Thu, 1 Dec 2016 23:28:54 +0000 (23:28 +0000)]
Merge "Class Hierarchy Analysis (CHA)"

7 years agoFix PACKED for jvalue
Mathieu Chartier [Thu, 1 Dec 2016 22:54:38 +0000 (14:54 -0800)]
Fix PACKED for jvalue

Make it only as packed as alignof(mirror::Object*).

Bug: 31532493

Test: mm test-art-host

Change-Id: I242c549bcc9203d3173f204264b0dc2f2f8e3441

7 years agoMerge "ART: Cache sections for sanity check"
Treehugger Robot [Thu, 1 Dec 2016 23:00:43 +0000 (23:00 +0000)]
Merge "ART: Cache sections for sanity check"

7 years agoSet the location checksum in vdex.
Nicolas Geoffray [Thu, 1 Dec 2016 10:45:08 +0000 (10:45 +0000)]
Set the location checksum in vdex.

The checksum we check against at runtime isn't the dex checksum
if we are compiling a jar/apk, but the crc32 of the entry.

This is to optimize the check at startup and avoid reading the
contents of the zip file.

Because with vdex we do not want to open the zip file, (the test
has been done already in getDexOptNeeded), and cannot rely
on the .oat file for fetching it, put the location checksum in
the vdex directly.

Note for later refactorings: the dex checksum location is now
in the vdex file, but also in the oat file. This can be revisited
after we eventually cleanup OatDexFile.

Test: 629-vdex
bug: 30937355
Change-Id: I7af8ca63b889370c660d694dd4eb95e78f566a1c

7 years agoMerge "Add LoadString kind of kJitTableAddress for dump-cfg."
Mingyao Yang [Thu, 1 Dec 2016 19:59:50 +0000 (19:59 +0000)]
Merge "Add LoadString kind of kJitTableAddress for dump-cfg."

7 years agoART: Cache sections for sanity check
Andreas Gampe [Thu, 1 Dec 2016 19:37:33 +0000 (11:37 -0800)]
ART: Cache sections for sanity check

Cache image sections for ArtMethod image sanity checks. Reduces
executed instructions in debug builds.

$ perf stat -e instructions:u -B dex2oatd ... HelloWorld.dex
Before: 36,024,262,237      instructions:u
After:  20,351,917,735      instructions:u

Test: m test-art-host
Change-Id: I96e5c04483cf40800f0f336a49d7d33e7b967f07

7 years agoClass Hierarchy Analysis (CHA)
Mingyao Yang [Tue, 2 Aug 2016 18:02:54 +0000 (11:02 -0700)]
Class Hierarchy Analysis (CHA)

The class linker now tracks whether a method has a single implementation
and if so, the JIT compiler will try to devirtualize a virtual call for
the method into a direct call. If the single-implementation assumption
is violated due to additional class linking, compiled code that makes the
assumption is invalidated. Deoptimization is triggered for compiled code
live on stack. Instead of patching return pc's on stack, a CHA guard is
added which checks a hidden should_deoptimize flag for deoptimization.
This approach limits the number of deoptimization points.

This CL does not devirtualize abstract/interface method invocation.

Slides on CHA:
https://docs.google.com/a/google.com/presentation/d/1Ax6cabP1vM44aLOaJU3B26n5fTE9w5YU-1CRevIDsBc/edit?usp=sharing

Change-Id: I18bf716a601b6413b46312e925a6ad9e4008efa4
Test: ART_TEST_JIT=true m test-art-host/target-run-test test-art-host-gtest

7 years agoMerge "Change Dex2oatLayoutTest to generate profile itself."
Treehugger Robot [Thu, 1 Dec 2016 19:09:15 +0000 (19:09 +0000)]
Merge "Change Dex2oatLayoutTest to generate profile itself."

7 years agoMerge "Revert "Make sure that const-class linkage is preserved, try again.""
Vladimir Marko [Thu, 1 Dec 2016 17:49:08 +0000 (17:49 +0000)]
Merge "Revert "Make sure that const-class linkage is preserved, try again.""

7 years agoRevert "Make sure that const-class linkage is preserved, try again."
Vladimir Marko [Thu, 1 Dec 2016 17:42:00 +0000 (17:42 +0000)]
Revert "Make sure that const-class linkage is preserved, try again."

Reverting due to test failures as expected.

Bug: 30627598
Bug: 33231647

This reverts commit cb5ab35980a86b05586c402924d2e7ca9df25758.
Squashed revert "Additional debug logging for bug 33231647."
    This reverts commit 00a441033db28d243fc33692d30eb2755fa81728.

Change-Id: I0c0ee1f70d47540fec99f8a797ce13571c16147c

7 years agoART: Weaken boot classpath initialization check
Andreas Gampe [Wed, 30 Nov 2016 18:13:19 +0000 (10:13 -0800)]
ART: Weaken boot classpath initialization check

Only abort in debug builds. Warn in non-debug mode.

Bug: 33265291
Test: m test-art-host
Change-Id: I288303cd7790a8b796f8b0717170861ea65e1f8c

7 years agoMerge "Additional debug logging for bug 33231647."
Vladimir Marko [Thu, 1 Dec 2016 16:00:56 +0000 (16:00 +0000)]
Merge "Additional debug logging for bug 33231647."

7 years agoAdditional debug logging for bug 33231647.
Vladimir Marko [Thu, 1 Dec 2016 14:40:02 +0000 (14:40 +0000)]
Additional debug logging for bug 33231647.

Bug: 33231647
Test: m test-art-host
Change-Id: I5847ce92be5f588852e04ff44fe6eca19f363b93

7 years agoMerge "Mterp/arm64: Add CFI directives."
Vladimir Marko [Thu, 1 Dec 2016 14:53:54 +0000 (14:53 +0000)]
Merge "Mterp/arm64: Add CFI directives."

7 years agoMterp/arm64: Add CFI directives.
Vladimir Marko [Thu, 1 Dec 2016 11:53:54 +0000 (11:53 +0000)]
Mterp/arm64: Add CFI directives.

Also add two bug 31975598 workarounds to arm64 entrypoints.

Test: m ART_TEST_INTERPRETER=true test-art-target
Bug: 31456348
Bug: 31975598
Change-Id: Ibf64160cf3b3f1ef644ff8f051ab7dc89643acf3

7 years agoMerge "Make sure that const-class linkage is preserved, try again."
Treehugger Robot [Thu, 1 Dec 2016 12:11:07 +0000 (12:11 +0000)]
Merge "Make sure that const-class linkage is preserved, try again."

7 years agoMake sure that const-class linkage is preserved, try again.
Vladimir Marko [Wed, 30 Nov 2016 15:31:13 +0000 (15:31 +0000)]
Make sure that const-class linkage is preserved, try again.

This CL causes occasional test failures on the build servers
which we were not able to reproduce locally. So we add some
some additional debug output to help pinpoint the cause.

Bug: 30627598
Bug: 33231647
Test: m test-art-host

This reverts commit 171cf811a1cdf8b1cbc5151505d8630741ce4cf3.

Change-Id: Id56a3f0e86e8212fd547e09c61794401bff47fb0

7 years agoMerge "ARM: VIXL32: A couple of fixes to have more tests passing."
Nicolas Geoffray [Thu, 1 Dec 2016 09:12:31 +0000 (09:12 +0000)]
Merge "ARM: VIXL32: A couple of fixes to have more tests passing."

7 years agoMerge "Remove the fast path in art_quick_resolve_string."
Nicolas Geoffray [Thu, 1 Dec 2016 09:07:35 +0000 (09:07 +0000)]
Merge "Remove the fast path in art_quick_resolve_string."

7 years agoMerge "Move compiled methods to use AtomicMethodRefMap"
Mathieu Chartier [Thu, 1 Dec 2016 02:02:43 +0000 (02:02 +0000)]
Merge "Move compiled methods to use AtomicMethodRefMap"

7 years agoMerge "Optimizations around escape analysis. With tests."
Treehugger Robot [Thu, 1 Dec 2016 00:45:27 +0000 (00:45 +0000)]
Merge "Optimizations around escape analysis. With tests."

7 years agoMerge "Infrastructure for obsolete methods"
Alex Light [Wed, 30 Nov 2016 23:01:31 +0000 (23:01 +0000)]
Merge "Infrastructure for obsolete methods"

7 years agoAdd LoadString kind of kJitTableAddress for dump-cfg.
Mingyao Yang [Wed, 30 Nov 2016 22:17:32 +0000 (14:17 -0800)]
Add LoadString kind of kJitTableAddress for dump-cfg.

Test: manual

Change-Id: Ifcae7b26f666930766635d8b3ed7a495494cddf7

7 years agoOptimizations around escape analysis. With tests.
Aart Bik [Wed, 16 Nov 2016 18:17:46 +0000 (10:17 -0800)]
Optimizations around escape analysis. With tests.

Details:
(1) added new intrinsics
(2) implemented optimizations
      more !can be null information
      more null check removals
      replace return-this uses with incoming parameter
      remove dead StringBuffer/Builder calls (with escape analysis)
(3) Fixed exposed bug in CanBeMoved()

Performance gain:
This improves CafeineString by about 360%
(removes null check from first loop, eliminates second loop completely)

Test: test-art-host

Change-Id: Iaf16a1b9cab6a7386f43d71c6b51dd59600e81c1

7 years agoMove compiled methods to use AtomicMethodRefMap
Mathieu Chartier [Wed, 23 Nov 2016 21:45:58 +0000 (13:45 -0800)]
Move compiled methods to use AtomicMethodRefMap

Use AtomicMethodRefMap to avoid locking and map costs.

Native RAM usage for interpret-only compile FB:
71270192B -> 64117168B

Perf:
CompilerDriver::GetCompiledMethod: 0.88% -> 0.04%
Mutex::ExclusiveLock: 1.55% -> 1.05%

Bug: 32641252

Test: test-art-host-run-test

Change-Id: I146e7bf2f3328b4fa84f2cc19d591f4da82dccfc

7 years agoMerge "Revert "Revert CC related changes.""
Mathieu Chartier [Wed, 30 Nov 2016 21:02:25 +0000 (21:02 +0000)]
Merge "Revert "Revert CC related changes.""

7 years agoMerge "Add release fence after copying object"
Mathieu Chartier [Wed, 30 Nov 2016 20:44:42 +0000 (20:44 +0000)]
Merge "Add release fence after copying object"

7 years agoMerge "Add atomic method reference map"
Mathieu Chartier [Wed, 30 Nov 2016 19:40:48 +0000 (19:40 +0000)]
Merge "Add atomic method reference map"

7 years agoAdd atomic method reference map
Mathieu Chartier [Wed, 23 Nov 2016 21:28:16 +0000 (13:28 -0800)]
Add atomic method reference map

Less RAM usage and faster than using a normal map with
MethodReference. Speed is faster by avoiding locking and tree
traversal. RAM usage is lower since the map usually had a value
for most method references.

Plan on using for marking methods for dex2dex, storing compiled
methods. Also use the new map for VerifiedMethods (refactoring).

Added test.

Bug: 32641252

Test: test-art-host-run-test

Change-Id: I46268031b8e0daf9be3597145cf6ecf579a039e2

7 years agoRevert "Revert CC related changes."
Mathieu Chartier [Wed, 30 Nov 2016 18:15:41 +0000 (10:15 -0800)]
Revert "Revert CC related changes."

Disable entrypoint switching in ResetQuickAllocEntryPointsForThread
instead of callers. Fixes bug where instrumentation would switch
to non CC entrypoints for non X86_64 architectures causing aborts.

Bug: 31018974

Test: test-art-host
Test: test/run-test 099

This reverts commit 96172e0172c5fca6e9a5ad4b857a24d8c7b064e5.

Change-Id: If206694ae35ff4446c6a8a97bfbcbf2dac35e3f9

7 years agoChange Dex2oatLayoutTest to generate profile itself.
Jeff Hao [Mon, 28 Nov 2016 19:53:33 +0000 (11:53 -0800)]
Change Dex2oatLayoutTest to generate profile itself.

Changed from a pre-generated base64 profile. This makes the test work
even if the dex file differs due to Jack changes.

Bug: 33091768
Test: mm test-art-host-gtest-dex2oat_test

Change-Id: I22b8c20ae1ab57efe66684ba38f5c128e6c089fd

7 years agoInfrastructure for obsolete methods
Alex Light [Tue, 15 Nov 2016 18:43:06 +0000 (10:43 -0800)]
Infrastructure for obsolete methods

This adds some of the structures and functions needed to eventually
support obsolete methods. Specifically this adds the code to create
and iterate through the obsolete dex-cache maps of classes and
re-organizes the redefinition code to be more sensible and extensible.

Bug: 32369913
Test: ./test/run-test --host 902
Test: mma -j40 test-art-host

Change-Id: I93d60fa66e7512e8b059cdf42af8a56e93ef4bd7

7 years agoMerge "ART: Add dex::StringIndex"
Treehugger Robot [Wed, 30 Nov 2016 18:21:22 +0000 (18:21 +0000)]
Merge "ART: Add dex::StringIndex"

7 years agoAdd release fence after copying object
Mathieu Chartier [Wed, 30 Nov 2016 01:55:19 +0000 (17:55 -0800)]
Add release fence after copying object

Try to ensure that the field CAS in ConcurrentCopying::Process will
never reorder before the object copy.

May fix a bug where null classes are seen.

Test: test-art-host CC

Bug: 33210571
Change-Id: I71ab937b7ca60c88c5f69698731edac6a8f2e91a

7 years agoARM: VIXL32: A couple of fixes to have more tests passing.
Artem Serov [Wed, 23 Nov 2016 14:19:38 +0000 (14:19 +0000)]
ARM: VIXL32: A couple of fixes to have more tests passing.

Fix 103-string-append, CheckCast visitor, stop interpretting
boot.oat, port Floating point compare optimization.

Test: ART_USE_VIXL_ARM_BACKEND=true m test-art-host
Test: ART_USE_VIXL_ARM_BACKEND=true m test-art-target
Change-Id: I7e06f9bc1ec60a850a8fc4ef7a344b9cfc736033

7 years agoMerge "Do not call IsMarked on null."
Nicolas Geoffray [Wed, 30 Nov 2016 16:23:24 +0000 (16:23 +0000)]
Merge "Do not call IsMarked on null."

7 years agoMerge "ART: Remove duplicate StackVisitor method."
Treehugger Robot [Wed, 30 Nov 2016 16:20:44 +0000 (16:20 +0000)]
Merge "ART: Remove duplicate StackVisitor method."

7 years agoDo not call IsMarked on null.
Nicolas Geoffray [Wed, 30 Nov 2016 16:02:16 +0000 (16:02 +0000)]
Do not call IsMarked on null.

The concurrent collector checks it.

Test: ART_TEST_JIT=true test-art-host-run-test-jit
Change-Id: I02c2462ce1d8f3092f0b2f52f8b6dede8ff4a339

7 years agoMerge "ARM: VIXL32: Implement HClassTableGet Visitor."
Nicolas Geoffray [Wed, 30 Nov 2016 15:49:40 +0000 (15:49 +0000)]
Merge "ARM: VIXL32: Implement HClassTableGet Visitor."

7 years agoMerge "ARM: VIXL32: Fix some test failures."
Nicolas Geoffray [Wed, 30 Nov 2016 14:45:14 +0000 (14:45 +0000)]
Merge "ARM: VIXL32: Fix some test failures."

7 years agoMerge "Don't call realpath on a file that may not exist."
Nicolas Geoffray [Wed, 30 Nov 2016 14:33:31 +0000 (14:33 +0000)]
Merge "Don't call realpath on a file that may not exist."

7 years agoMerge "Move inline caches GC handling in JitCodeCache."
Nicolas Geoffray [Wed, 30 Nov 2016 13:57:30 +0000 (13:57 +0000)]
Merge "Move inline caches GC handling in JitCodeCache."

7 years agoMerge "Revert CC related changes."
Nicolas Geoffray [Wed, 30 Nov 2016 13:40:23 +0000 (13:40 +0000)]
Merge "Revert CC related changes."

7 years agoDon't call realpath on a file that may not exist.
Nicolas Geoffray [Tue, 29 Nov 2016 22:06:50 +0000 (22:06 +0000)]
Don't call realpath on a file that may not exist.

Otherwise realpath prints an error message.

bug: 25658944
Change-Id: I63145c3d955e088e53708d8c6add945e6eab6654

7 years agoRevert CC related changes.
Nicolas Geoffray [Wed, 30 Nov 2016 11:52:19 +0000 (11:52 +0000)]
Revert CC related changes.

Revert: "X86_64: Add allocation entrypoint switching for CC is_marking"
Revert: "Fix mips build in InitEntryPoints"
Revert: "Fix mac build in ResetQuickAllocEntryPoints"

Test: test-art-target-run-test
Change-Id: If38d44edf8c5def5c4d8c9419e4af0cd8d3be724

7 years agoMerge "Don't use ashmen when kIsTargetLinux is set."
Nicolas Geoffray [Wed, 30 Nov 2016 10:38:17 +0000 (10:38 +0000)]
Merge "Don't use ashmen when kIsTargetLinux is set."

7 years agoMerge "Improve invalid object logging"
Mathieu Chartier [Wed, 30 Nov 2016 01:07:05 +0000 (01:07 +0000)]
Merge "Improve invalid object logging"

7 years agoART: Remove duplicate StackVisitor method.
Andreas Gampe [Wed, 30 Nov 2016 00:52:33 +0000 (16:52 -0800)]
ART: Remove duplicate StackVisitor method.

Remove method that is the same as the older IsShadowFrame and only
used in tests.

Test: m ART_TEST_JIT=true ART_TEST_INTERPRETER=true test-art-host-run-test-454-get-vreg
Test: m ART_TEST_JIT=true ART_TEST_INTERPRETER=true test-art-host-run-test-457-regs
Test: m ART_TEST_JIT=true ART_TEST_INTERPRETER=true test-art-host-run-test-570-checker-osr
Change-Id: Id222d25d5345790b6c500ec8120880a3b9d79986

7 years agoMerge "Added support for android root in dexfuzz."
Aart Bik [Wed, 30 Nov 2016 00:26:22 +0000 (00:26 +0000)]
Merge "Added support for android root in dexfuzz."

7 years agoMerge "Fix mips build in InitEntryPoints"
Mathieu Chartier [Tue, 29 Nov 2016 23:38:00 +0000 (23:38 +0000)]
Merge "Fix mips build in InitEntryPoints"

7 years agoFix mips build in InitEntryPoints
Mathieu Chartier [Tue, 29 Nov 2016 23:31:00 +0000 (15:31 -0800)]
Fix mips build in InitEntryPoints

Added missing arg.

Test: Untested
Change-Id: I7bd25203eee92d0424f03ee9fdb9e7079d05d23c

7 years agoDon't use ashmen when kIsTargetLinux is set.
Nicolas Geoffray [Tue, 29 Nov 2016 21:49:43 +0000 (21:49 +0000)]
Don't use ashmen when kIsTargetLinux is set.

Test: get JIT enabled when running ART.
Change-Id: Ic1c351601d8e85ba6597c3b400fa0094e070a56a

7 years agoMerge "Fix mac build in ResetQuickAllocEntryPoints"
Mathieu Chartier [Tue, 29 Nov 2016 22:20:24 +0000 (22:20 +0000)]
Merge "Fix mac build in ResetQuickAllocEntryPoints"

7 years agoFix mac build in ResetQuickAllocEntryPoints
Mathieu Chartier [Tue, 29 Nov 2016 22:17:09 +0000 (14:17 -0800)]
Fix mac build in ResetQuickAllocEntryPoints

Unused arg warning.

Test: None

Change-Id: I5b147b1a584b96ad5457c9fee36f3edb0498cecf

7 years agoMerge "ARM: Fix JNI MacroAssembler after VIXL update."
Mathieu Chartier [Tue, 29 Nov 2016 22:07:47 +0000 (22:07 +0000)]
Merge "ARM: Fix JNI MacroAssembler after VIXL update."

7 years agoMerge "X86_64: Add allocation entrypoint switching for CC is_marking"
Mathieu Chartier [Tue, 29 Nov 2016 21:32:11 +0000 (21:32 +0000)]
Merge "X86_64: Add allocation entrypoint switching for CC is_marking"

7 years agoMerge "Revert "Revert "Revert "Revert "Revert "Make sure that const-class linkage...
Vladimir Marko [Tue, 29 Nov 2016 21:11:32 +0000 (21:11 +0000)]
Merge "Revert "Revert "Revert "Revert "Revert "Make sure that const-class linkage is preserved.""""""

7 years agoRevert "Revert "Revert "Revert "Revert "Make sure that const-class linkage is preserv...
Vladimir Marko [Tue, 29 Nov 2016 21:10:22 +0000 (21:10 +0000)]
Revert "Revert "Revert "Revert "Revert "Make sure that const-class linkage is preserved."""""

Bug: 30627598

This reverts commit e47172b75b8b04a450d235cf72bdc4e223a29cb5.

Change-Id: I038029c71195a80f041982e82ae556d3157db7b8

7 years agoMove inline caches GC handling in JitCodeCache.
Nicolas Geoffray [Tue, 22 Nov 2016 14:49:31 +0000 (14:49 +0000)]
Move inline caches GC handling in JitCodeCache.

Make the classes they hold weak references and visit
them during SweepJitRoots.

This fixes the newly introduced deadlock:

Thread1:
1) Lock JitCodeCache lock to create Profiling info for
  ArtMethod m.
2) m is a copied method, we need to track the actual holder,
   needing to decode a weak reference.
3) Weak references are not accessible due to GC.

GC Thread:
- Disallow weak reference access.
- Wait for checkpoint.

Thread2:
- Try to lock JitCodeCache lock
- Deadlock, as Thread1 owns the JitCodeCache lock.

Test: test-art-host
bug: 31289185
bug: 33198826

Change-Id: I7ee17631015450ace8d2a0264415a81c5a902bb8

7 years agoImprove invalid object logging
Mathieu Chartier [Mon, 28 Nov 2016 21:13:28 +0000 (13:13 -0800)]
Improve invalid object logging

Prioritize holder logging instead of maps and stack traces.

Test: test-art-host

Bug: 31441673

Change-Id: Ibc0523ffe5a8f8ba207c2643eae65d44599dcc86

7 years agoART: Add dex::StringIndex
Andreas Gampe [Mon, 28 Nov 2016 15:38:35 +0000 (07:38 -0800)]
ART: Add dex::StringIndex

Add abstraction for uint32_t string index.

Test: m test-art-host
Change-Id: I917c2881702fe3df112c713f06980f2278ced7ed

7 years agoARM: Fix JNI MacroAssembler after VIXL update.
Artem Serov [Tue, 29 Nov 2016 13:31:33 +0000 (13:31 +0000)]
ARM: Fix JNI MacroAssembler after VIXL update.

This patch fixes an issue found here:
https://android-review.googlesource.com/#/c/307532/

Also re-enables vixl MacroAssembler for arm.

Test: export ART_USE_READ_BARRIER=true; export ART_HEAP_POISONING=true; \
      m test-art-host
Test: export ART_USE_READ_BARRIER=true; export ART_HEAP_POISONING=true; \
      m test-art-target
Test: dump-oat-boot with ART_USE_READ_BARRIER=true

Change-Id: I03e3014fb250791db2d24a0ab1a76ca96384c332

7 years agoMerge "Use non vixl arm macro assembler"
Mathieu Chartier [Tue, 29 Nov 2016 18:15:29 +0000 (18:15 +0000)]
Merge "Use non vixl arm macro assembler"

7 years agoUse non vixl arm macro assembler
Mathieu Chartier [Tue, 29 Nov 2016 03:24:08 +0000 (19:24 -0800)]
Use non vixl arm macro assembler

The VIXL one hits an assertion error for CC:
external/vixl/src/aarch32/macro-assembler-aarch32.h:1386:
void vixl::aarch32::MacroAssembler::Cmp(vixl::aarch32::Condition,
vixl::aarch32::Register, const vixl::aarch32::Operand &):
Assertion `!AliasesAvailableScratchRegister(rn)' failed.

Fixes dump-oat-boot with CC.

Test: test-art-target, N6P booting

Change-Id: I781fe8c8c2d6cd8b246ee4509281d6c645c89a28

7 years agoMerge "Disabled fallback to interpreter in dexfuzz."
Treehugger Robot [Tue, 29 Nov 2016 16:33:41 +0000 (16:33 +0000)]
Merge "Disabled fallback to interpreter in dexfuzz."

7 years agoMerge "ARM64: Merge TBNZ+CMP+BGE/BGT to CMP+BHS/BHI in intrinsics."
Vladimir Marko [Tue, 29 Nov 2016 16:22:50 +0000 (16:22 +0000)]
Merge "ARM64: Merge TBNZ+CMP+BGE/BGT to CMP+BHS/BHI in intrinsics."

7 years agoMerge "Fix event reporting from the debugger thread"
Sebastien Hertz [Tue, 29 Nov 2016 15:49:39 +0000 (15:49 +0000)]
Merge "Fix event reporting from the debugger thread"

7 years agoMerge "Revert "Revert "Revert "Revert "Make sure that const-class linkage is preserve...
Vladimir Marko [Tue, 29 Nov 2016 15:46:38 +0000 (15:46 +0000)]
Merge "Revert "Revert "Revert "Revert "Make sure that const-class linkage is preserved."""""

7 years agoMerge "Fix the target Linux builds of ART"
Nicolas Geoffray [Tue, 29 Nov 2016 15:06:15 +0000 (15:06 +0000)]
Merge "Fix the target Linux builds of ART"

7 years agoARM64: Merge TBNZ+CMP+BGE/BGT to CMP+BHS/BHI in intrinsics.
Vladimir Marko [Mon, 28 Nov 2016 16:03:15 +0000 (16:03 +0000)]
ARM64: Merge TBNZ+CMP+BGE/BGT to CMP+BHS/BHI in intrinsics.

Test: m test-art-target
Change-Id: I7316dfc40555a3c47670a3b79b4c8fc0cd3edc4f

7 years agoDisabled fallback to interpreter in dexfuzz.
Branislav Rankov [Tue, 29 Nov 2016 14:02:04 +0000 (14:02 +0000)]
Disabled fallback to interpreter in dexfuzz.

Added the -Xno-dex-file-fallback option when running optimizing backends so
that it fails in case compilation fails.

Test: Introduce an artificial crash in the optimizing compiler. There should
be a divergence reported.
dexfuzz --input=Hello.dex --execute --arm --interpreter --optimizing --repeat=20 --dump-output

Change-Id: I8adfc68b176b7482efce0cc7335c3cc50857c5a2