OSDN Git Service

android-x86/art.git
7 years agoAdd dexoptanalyzer tool
Calin Juravle [Sat, 14 Jan 2017 00:32:38 +0000 (16:32 -0800)]
Add dexoptanalyzer tool

dexoptanalyzer is a command line tool which analyzes whether or not a
given dex file needs to be dexopted. It is a wrapper around
OatFileAssistant::GetDexOptNeeded and its results have a mapping to
OatFileAssistant::DexOptNeeded.

This is needed for the management of secondary dex file. We need a way
to retrieve the DexOptNeeded status from installd outside system server.
We can't simply use the system server path (as we do for the main apks)
because system server can't access content writable by the apps.

Bug: 32871170
Test: m test-art-(host|target)
Change-Id: Ife1534560ca2658079d4a38a30bc8d94f35fe9c8

7 years agoMerge "ART: More valgrind suppressions"
Treehugger Robot [Fri, 20 Jan 2017 22:30:29 +0000 (22:30 +0000)]
Merge "ART: More valgrind suppressions"

7 years agoMerge "Use original dex file for retransformation."
Alex Light [Fri, 20 Jan 2017 22:06:09 +0000 (22:06 +0000)]
Merge "Use original dex file for retransformation."

7 years agoART: More valgrind suppressions
Andreas Gampe [Fri, 20 Jan 2017 19:38:37 +0000 (11:38 -0800)]
ART: More valgrind suppressions

Local host seems different from build bots.

Bug: 31684920
Test: m valgrind-test-art-host-gtest-runtime_callbacks_test
Change-Id: Ie662373e7779be1694b8d338b3ddf91b5fd25df1

7 years agoUse original dex file for retransformation.
Alex Light [Thu, 19 Jan 2017 22:57:28 +0000 (14:57 -0800)]
Use original dex file for retransformation.

The spec requires us to pass the dex file as it appeared before any
retransformation-capable agents had modified it to the
ClassFileLoadHooks when RetransformClasses is called. We do this by
saving the initial dex file bytes into the class as a byte[].

Bug: 32369916
Test: mma -j40 test-art-host

Change-Id: Ic6af3738cd2a831e91ba1144f502fa58b3c333e4

7 years agoMerge "Dexfuzz: Added --divergence-retry option."
Treehugger Robot [Fri, 20 Jan 2017 19:10:32 +0000 (19:10 +0000)]
Merge "Dexfuzz: Added --divergence-retry option."

7 years agoMerge "Revert "CHA for abstract methods.""
Colin Cross [Fri, 20 Jan 2017 18:34:32 +0000 (18:34 +0000)]
Merge "Revert "CHA for abstract methods.""

7 years agoRevert "CHA for abstract methods."
Colin Cross [Fri, 20 Jan 2017 17:37:02 +0000 (17:37 +0000)]
Revert "CHA for abstract methods."

This reverts commit ae6c189b9d63ca4c2ae0e952187819c5e442e3c9.

This is causing sporadic build failures with:
dex2oatd F 01-20 15:05:33 8343 10164 cha.cc:292] Check failed: method_in_super->HasSingleImplementation()

Change-Id: I4435ab028d3f7893e18b44347f294326c573a255

7 years agoMerge "ART: Add GetClassVersionNumbers."
Treehugger Robot [Fri, 20 Jan 2017 17:06:30 +0000 (17:06 +0000)]
Merge "ART: Add GetClassVersionNumbers."

7 years agoMerge "ART: Add tests for TLS"
Treehugger Robot [Fri, 20 Jan 2017 17:05:23 +0000 (17:05 +0000)]
Merge "ART: Add tests for TLS"

7 years agoMerge changes I914dfac9,I33b1934a
Treehugger Robot [Fri, 20 Jan 2017 17:04:29 +0000 (17:04 +0000)]
Merge changes I914dfac9,I33b1934a

* changes:
  ART: Add phase events
  ART: Add GetPhase

7 years agoMerge "CHA for abstract methods."
Mingyao Yang [Fri, 20 Jan 2017 14:23:39 +0000 (14:23 +0000)]
Merge "CHA for abstract methods."

7 years agoDexfuzz: Added --divergence-retry option.
Branislav Rankov [Fri, 23 Dec 2016 16:19:09 +0000 (16:19 +0000)]
Dexfuzz: Added --divergence-retry option.

This option controls the number of retries done when checking for self-divergence.

Test: dexfuzz --inputs=seeds --execute --arm --optimizing --interpreter --repeat=100 --divergence-retry=20

Change-Id: I90e2705e40c6f23d47ddbb856828147c4f6a4157

7 years agoMerge "Fix polymorphic invokes (one more round)."
Treehugger Robot [Fri, 20 Jan 2017 10:57:28 +0000 (10:57 +0000)]
Merge "Fix polymorphic invokes (one more round)."

7 years agoMerge "vdex optimization: avoid doing application type resolution."
Nicolas Geoffray [Fri, 20 Jan 2017 10:29:59 +0000 (10:29 +0000)]
Merge "vdex optimization: avoid doing application type resolution."

7 years agoMerge "ART: Add valgrind suppression"
Treehugger Robot [Fri, 20 Jan 2017 09:08:47 +0000 (09:08 +0000)]
Merge "ART: Add valgrind suppression"

7 years agoMerge "Do not use npic image for oat file assistant tests."
Treehugger Robot [Fri, 20 Jan 2017 08:47:51 +0000 (08:47 +0000)]
Merge "Do not use npic image for oat file assistant tests."

7 years agoART: Add GetClassVersionNumbers.
Andreas Gampe [Fri, 20 Jan 2017 06:04:46 +0000 (22:04 -0800)]
ART: Add GetClassVersionNumbers.

Add support for GetClassVersionNumbers. Return the dex file version
as major, zero as minor. Add test.

Bug: 31684578
Test: m test-art-host-run-test-912-classes
Change-Id: Ib5082cd58b27a9183d8f19d42d4d8af46a6bb9c9

7 years agoART: Add phase events
Andreas Gampe [Fri, 20 Jan 2017 05:59:22 +0000 (21:59 -0800)]
ART: Add phase events

Add VMStart, VMInit and VMDeath event support. Add removal of
jvmtiEnv from the event handler. Add and extend tests.

Bug: 31684920
Test: m test-art-host-901-hello-ti-agent
Change-Id: I914dfac98c2fb7b59efdfde69597a7fcd20fd486

7 years agoART: Add valgrind suppression
Andreas Gampe [Fri, 20 Jan 2017 07:30:41 +0000 (23:30 -0800)]
ART: Add valgrind suppression

Suppress libunwind/libbacktrace reading arbitrary memory. Triggered
by SIGQUIT behavior in runtime_callbacks_test.

Bug: 31684920
Test: m valgrind-test-art-host-gtest-runtime_callbacks_test
Change-Id: Ifba237027b5e029b0e4f98264bd5c9eafa243beb

7 years agoART: Add GetPhase
Andreas Gampe [Fri, 20 Jan 2017 03:45:30 +0000 (19:45 -0800)]
ART: Add GetPhase

Extend RuntimePhaseCallback. Add support for GetPhase.
Add tests.

Bug: 31455788
Test: m test-art-host-run-test-901-hello-ti-agent
Change-Id: I33b1934a0789bc713675f21c2c9f676c9d3a1ed1

7 years agoFix polymorphic invokes (one more round).
Alexey Frunze [Fri, 20 Jan 2017 03:07:37 +0000 (19:07 -0800)]
Fix polymorphic invokes (one more round).

memcpy() exhibits undefined behavior when the source and the
destination overlap. Use memmove() instead.

This fixes test failures when running the below tests on MIPS.

Test: booted MIPS32R2 in QEMU
Test: ./run-test --interpreter 953-invoke-polymorphic-compiler
Test: ./run-test --interpreter 955-methodhandles-smali
Test: ./run-test --interpreter 956-methodhandles
Test: ./run-test --interpreter 957-methodhandle-transforms
Test: ./run-test --interpreter 958-methodhandle-emulated-stackframe
Test: ./run-test --interpreter 959-invoke-polymorphic-accessors

Change-Id: Ia17ff25001faa7d91ce1178ab35313c36e75aa07

7 years agoMerge "ART: Add runtime phase callback"
Treehugger Robot [Fri, 20 Jan 2017 05:13:17 +0000 (05:13 +0000)]
Merge "ART: Add runtime phase callback"

7 years agoART: Add tests for TLS
Andreas Gampe [Fri, 20 Jan 2017 04:40:42 +0000 (20:40 -0800)]
ART: Add tests for TLS

Wire up the functions. Actually add tests to 924-threads.

Bug: 31684593
Test: m test-art-host-run-test-924-threads
Change-Id: Ie4966a57633188fb75278d6bf4bdeb0ff2cd25aa

7 years agoART: Add runtime phase callback
Andreas Gampe [Fri, 20 Jan 2017 01:23:17 +0000 (17:23 -0800)]
ART: Add runtime phase callback

Add callback that describes the current runtime phase, one of
starting, initialized and death. Add test.

Bug: 31684920
Test: m test-art-host-gtest-runtime_callbacks_test
Change-Id: I08ae7c45851572f8b3e446c07f0498f66bb032d3

7 years agoMerge "Enable CC (ART_USE_READ_BARRIER) by default."
Treehugger Robot [Fri, 20 Jan 2017 03:14:44 +0000 (03:14 +0000)]
Merge "Enable CC (ART_USE_READ_BARRIER) by default."

7 years agoMerge "ART: Add SigQuit Callback"
Treehugger Robot [Fri, 20 Jan 2017 01:52:53 +0000 (01:52 +0000)]
Merge "ART: Add SigQuit Callback"

7 years agoMerge changes Ib5a3632c,I871f6b3c,I6ce0f71d
Treehugger Robot [Fri, 20 Jan 2017 01:49:00 +0000 (01:49 +0000)]
Merge changes Ib5a3632c,I871f6b3c,I6ce0f71d

* changes:
  ART: Make RuntimeCallbacks unique_ptr
  ART: Add ClassLoadCallback
  Revert "Revert "ART: Start RuntimeCallbacks""

7 years agoMerge "ART: Add Agent Thread API"
Treehugger Robot [Fri, 20 Jan 2017 01:14:42 +0000 (01:14 +0000)]
Merge "ART: Add Agent Thread API"

7 years agoART: Add Agent Thread API
Andreas Gampe [Wed, 18 Jan 2017 23:23:39 +0000 (15:23 -0800)]
ART: Add Agent Thread API

Add support for RunAgentThread. Add test.

Bug: 31684593
Test: m test-art-host-run-test-931-agent-thread
Change-Id: I5deb213fb06eedc5ee78a340458cf0dff615d0ac

7 years agoMerge "Revert "Revert "Implement RetransformClasses"""
Treehugger Robot [Fri, 20 Jan 2017 01:08:56 +0000 (01:08 +0000)]
Merge "Revert "Revert "Implement RetransformClasses"""

7 years agoART: Add SigQuit Callback
Andreas Gampe [Thu, 19 Jan 2017 05:43:16 +0000 (21:43 -0800)]
ART: Add SigQuit Callback

Add callback being triggered when the runtime handles SigQuit.

Bug: 31684920
Test: m test-art-host-gtest-runtime_callbacks_test
Change-Id: I23e3b256c654b6078c79b3897439d893ea79d96e

7 years agoRevert "Revert "Implement RetransformClasses""
Alex Light [Thu, 19 Jan 2017 23:05:06 +0000 (15:05 -0800)]
Revert "Revert "Implement RetransformClasses""

This reverts commit 52a2db50b76f2b981d21d5508c3d9e8ab4c5fe93.

Reason for revert: Issue with RedefineClasses was resolved.

Test: ART_TEST_JNI_FORCECOPY=true mma -j40 test-art-host

Change-Id: I06f198df4fb40c48647b358d241710329e0812e9

7 years agoART: Make RuntimeCallbacks unique_ptr
Andreas Gampe [Thu, 19 Jan 2017 05:02:36 +0000 (21:02 -0800)]
ART: Make RuntimeCallbacks unique_ptr

Reduce the transitive closure of headers on runtime.h

Test: m
Change-Id: Ib5a3632c28b08bf07773f217a7ad711c1f12af6b

7 years agoART: Add ClassLoadCallback
Andreas Gampe [Wed, 18 Jan 2017 23:22:37 +0000 (15:22 -0800)]
ART: Add ClassLoadCallback

Add callback for class-load and class-prepare events. Move Dbg
over. Add tests.

Bug: 31684920
Test: m test-art-host-gtest-runtime_callbacks_test
Test: art/tools/run-jdwp-tests.sh --mode=host
Change-Id: I871f6b3c54448fd6ece8d9a7571b2042be50d525

7 years agoRevert "Revert "ART: Start RuntimeCallbacks""
Andreas Gampe [Thu, 19 Jan 2017 17:49:03 +0000 (17:49 +0000)]
Revert "Revert "ART: Start RuntimeCallbacks""

This reverts commit bf6331a45f730e1f1044af2ce43bceda660ae6fc.

Switch to using the mutator lock.

Bug: 31684920
Test: m test-art-host-gtest-runtime_callbacks_test
Test: art/tools/run-jdwp-tests.sh --mode=host --debug
Change-Id: I6ce0f71de2aa9f90cd23cfca7723a793b560b16b

7 years agoMerge "Revert "Implement RetransformClasses""
Alex Light [Thu, 19 Jan 2017 23:01:26 +0000 (23:01 +0000)]
Merge "Revert "Implement RetransformClasses""

7 years agoRevert "Implement RetransformClasses"
Alex Light [Thu, 19 Jan 2017 23:00:21 +0000 (23:00 +0000)]
Revert "Implement RetransformClasses"

This reverts commit a6c5e97a4395352bc8684e6af9cecb62b80c316c.

Reason for revert: Accidently introduces double-free bug in RedefineClasses.

Change-Id: I021336c4fcf0cfb304915b0ffc5eaba5f91fdd5e

7 years agoMerge "Delete deadlocking DCHECK for LOS allocation"
Mathieu Chartier [Thu, 19 Jan 2017 22:21:31 +0000 (22:21 +0000)]
Merge "Delete deadlocking DCHECK for LOS allocation"

7 years agoMerge "Implement RetransformClasses"
Treehugger Robot [Thu, 19 Jan 2017 21:09:19 +0000 (21:09 +0000)]
Merge "Implement RetransformClasses"

7 years agoDelete deadlocking DCHECK for LOS allocation
Mathieu Chartier [Thu, 19 Jan 2017 19:37:22 +0000 (11:37 -0800)]
Delete deadlocking DCHECK for LOS allocation

The DCHECK required acquiring the heap bitmap lock. This lock
may be held by the GC during checkpoint marking. If the GC was
blocked waiting for the allocating thread to run its checkpoint, the
allocating thread would deadlock trying to acquire the heap bitmap
lock.

Bug: 34386492

Test: test-art-host

Change-Id: Idc0bf43cba726c690e578c15bd6373ba0a2c1ecb

7 years agoMerge "Rename offline_profiling_info to profile_compilation_info"
Calin Juravle [Thu, 19 Jan 2017 19:42:25 +0000 (19:42 +0000)]
Merge "Rename offline_profiling_info to profile_compilation_info"

7 years agoImplement RetransformClasses
Alex Light [Fri, 13 Jan 2017 22:15:41 +0000 (14:15 -0800)]
Implement RetransformClasses

This CL implements basic support for the RetransformClasses function
and callbacks of the ClassFileLoadHook.

We do not yet support calling the ClassFileLoadHook events on first
load of class.

Bug: 32369913
Bug: 31684920

Test: mma -j40 test-art-host

Change-Id: I7959474f03f9903cc6f10ae3c06d9fd531ec7957

7 years agoEnable CC (ART_USE_READ_BARRIER) by default.
Hiroshi Yamauchi [Wed, 18 Jan 2017 22:47:25 +0000 (14:47 -0800)]
Enable CC (ART_USE_READ_BARRIER) by default.

Bug: 34084559
Bug: 12687968
Test: boot on angler
Test: test-art-host
Change-Id: I0287b813335b472dd59aa6b94aeeab2da60b9c99

7 years agoMerge "Partial revert of "Reduce using ArtMethod's dex_cache_resolved_types_.""
Treehugger Robot [Thu, 19 Jan 2017 19:02:07 +0000 (19:02 +0000)]
Merge "Partial revert of "Reduce using ArtMethod's dex_cache_resolved_types_.""

7 years agoCHA for abstract methods.
Mingyao Yang [Thu, 5 Jan 2017 21:46:36 +0000 (13:46 -0800)]
CHA for abstract methods.

Add the ability to devirtualize abstract method invocation if
an abstract method has only one implementation. Only support in JIT
mode currently.

Test: new testcase and ART_TEST_JIT=true m -j20 test-art-host-run-test
Change-Id: I43da03a9fa9a73840f5eaf207c6611e0913a7f66

7 years agoPartial revert of "Reduce using ArtMethod's dex_cache_resolved_types_."
Nicolas Geoffray [Thu, 19 Jan 2017 16:25:06 +0000 (16:25 +0000)]
Partial revert of "Reduce using ArtMethod's dex_cache_resolved_types_."

Change Ic45a5ff8c66b79429e440cbc08d67bf22a083682 made the resolution
from true to false, assuming we could only enter that specific code
with a resolved type. Unfortunately b/34440020 shows we still
need to resolve.

Also move arg to a Handle, now that we are resolving, which could
lead to thread suspension.

bug:34440020
bug:34452336
Test: test-art-host test-art-target
Change-Id: I98c834158733a46cf896e7dfa7ce226c53e2d949

7 years agoDo not use npic image for oat file assistant tests.
Richard Uhler [Thu, 19 Jan 2017 16:58:39 +0000 (16:58 +0000)]
Do not use npic image for oat file assistant tests.

Because patchoat will no longer support relocating npic images.
All that matters for the oat file assistant test is that the secondary
boot image has a different checksum than the primary one.

Bug: 33192586
Test: oat_file_assistant_test
Change-Id: I7ece86337221a9d0c56534b2045026ba5d3d7d89

7 years agoMerge "Always inline some methods related to StackMap."
Mingyao Yang [Thu, 19 Jan 2017 14:24:54 +0000 (14:24 +0000)]
Merge "Always inline some methods related to StackMap."

7 years agoMerge "Remove unused array entrypoints."
Nicolas Geoffray [Thu, 19 Jan 2017 14:11:35 +0000 (14:11 +0000)]
Merge "Remove unused array entrypoints."

7 years agoMerge "Remove now unused dex_cache_resolved_types_ from ArtMethod."
Nicolas Geoffray [Thu, 19 Jan 2017 13:20:58 +0000 (13:20 +0000)]
Merge "Remove now unused dex_cache_resolved_types_ from ArtMethod."

7 years agoMerge "ART: Remove unused runtime.h include"
Treehugger Robot [Thu, 19 Jan 2017 13:09:10 +0000 (13:09 +0000)]
Merge "ART: Remove unused runtime.h include"

7 years agoRemove unused array entrypoints.
Nicolas Geoffray [Wed, 18 Jan 2017 18:07:15 +0000 (18:07 +0000)]
Remove unused array entrypoints.

Test: test-art-host test-art-target
Change-Id: I910d1c912c7c9056ecea0e1e7da7afb2a7220dfa

7 years agovdex optimization: avoid doing application type resolution.
Nicolas Geoffray [Wed, 18 Jan 2017 14:34:48 +0000 (14:34 +0000)]
vdex optimization: avoid doing application type resolution.

When looking up for methods/fields, we can take the class
that was originally found as holding the method. If a subclass
of that class ends up redefining it after an OTA, it cannot
alter the expected flags anyways (eg a public method cannot be
overridden with a non-public method).

bug: 30937355
test: test-art-host
Change-Id: Ie3fbe0e829a27db61c534c4a49e945cc1afed9b9

7 years agoMerge "Revert "Revert "Load the array class in the compiler for allocations."""
Nicolas Geoffray [Thu, 19 Jan 2017 11:15:05 +0000 (11:15 +0000)]
Merge "Revert "Revert "Load the array class in the compiler for allocations."""

7 years agoMerge "Revert^3 "Remove unused code for patching oat files.""
Richard Uhler [Thu, 19 Jan 2017 10:57:52 +0000 (10:57 +0000)]
Merge "Revert^3 "Remove unused code for patching oat files.""

7 years agoRevert^3 "Remove unused code for patching oat files."
Richard Uhler [Thu, 19 Jan 2017 10:53:59 +0000 (10:53 +0000)]
Revert^3 "Remove unused code for patching oat files."

This reverts commit e7ec8b25dd6ac1b8ad8a68f808048bd6a61138f0.
Because tests are failing.

Bug: 33192586

Change-Id: I3e575c6c037873195c2177241153e3646d58e8a6

7 years agoMerge "ART: Improve class initializer and constructor verification."
Treehugger Robot [Thu, 19 Jan 2017 10:35:47 +0000 (10:35 +0000)]
Merge "ART: Improve class initializer and constructor verification."

7 years agoMerge "Revert "Revert "Remove unused code for patching oat files."""
Treehugger Robot [Thu, 19 Jan 2017 09:40:34 +0000 (09:40 +0000)]
Merge "Revert "Revert "Remove unused code for patching oat files."""

7 years agoRevert "Revert "Load the array class in the compiler for allocations.""
Nicolas Geoffray [Thu, 19 Jan 2017 08:59:37 +0000 (08:59 +0000)]
Revert "Revert "Load the array class in the compiler for allocations.""

This reverts commit fee255039e30c1c3dfc70c426c3d176221c3cdf9.

Change-Id: I02b45f9a659d872feeb35df40b42c1be9878413a

7 years agoMerge "Revert "ART: Start RuntimeCallbacks""
Nicolas Geoffray [Thu, 19 Jan 2017 09:03:12 +0000 (09:03 +0000)]
Merge "Revert "ART: Start RuntimeCallbacks""

7 years agoRevert "ART: Start RuntimeCallbacks"
Nicolas Geoffray [Thu, 19 Jan 2017 09:02:50 +0000 (09:02 +0000)]
Revert "ART: Start RuntimeCallbacks"

jdwp tests failing with:
    STDERR> dalvikvm32 E 01-18 23:14:50 12180 12198 thread-inl.h:137] holding "runtime callbacks lock" at point where thread suspension is expected

Bug: 31684920

This reverts commit 13093d455b8266338fd713b04261c58e9dc2b164.

Change-Id: I94e4154e273d006eecdd485607dcfd96392d6a00

7 years agoART: Improve class initializer and constructor verification.
Orion Hodson [Wed, 21 Sep 2016 14:41:06 +0000 (15:41 +0100)]
ART: Improve class initializer and constructor verification.

DEX file verifier checks additional properties of class initializers
and constructors:

(i) Names match expected <clinit> / <init>.
(ii) The method descriptor for <clinit> is ()V.
(iii) The return type of <init> is V.
(iV) No other names start with '<'.

Bug:  31313719
Change-Id: I60bffa6561e1bae353f97c42377ea556bfa790af
Test: m test-art-host-gtest-dex_file_verifier_test

7 years agoART: Remove unused runtime.h include
Andreas Gampe [Thu, 19 Jan 2017 05:30:48 +0000 (21:30 -0800)]
ART: Remove unused runtime.h include

This has not been used since 98e6ce44c700abd9375fe17f0aa31fea1e1e938b.

Test: m
Change-Id: If10971f9fcfb2417eece23f0c9186734314ad81b

7 years agoMerge "Revert "Load the array class in the compiler for allocations.""
Treehugger Robot [Thu, 19 Jan 2017 03:37:11 +0000 (03:37 +0000)]
Merge "Revert "Load the array class in the compiler for allocations.""

7 years agoRename offline_profiling_info to profile_compilation_info
Calin Juravle [Wed, 18 Jan 2017 23:29:12 +0000 (15:29 -0800)]
Rename offline_profiling_info to profile_compilation_info

This solves a long standing TODO to align the names of the files and the
class.

Bug: 32434870
Test: test-art-host

Change-Id: I2707da8fef8736a7223189d894fc00ff11bfab12

7 years agoRevert "Load the array class in the compiler for allocations."
Hiroshi Yamauchi [Thu, 19 Jan 2017 02:11:15 +0000 (02:11 +0000)]
Revert "Load the array class in the compiler for allocations."

libcore test fails.

This reverts commit cc99df230feb46ba717252f002d0cc2da6828421.

Change-Id: I5bac595acd2b240886062e8c1f11f9095ff6a9ed

7 years agoMerge "ART: Note CC configuration down into oat files"
Treehugger Robot [Thu, 19 Jan 2017 02:10:20 +0000 (02:10 +0000)]
Merge "ART: Note CC configuration down into oat files"

7 years agoMerge "Split ArtJvmtiEvent::kClassFileLoadHook in two."
Treehugger Robot [Thu, 19 Jan 2017 01:24:24 +0000 (01:24 +0000)]
Merge "Split ArtJvmtiEvent::kClassFileLoadHook in two."

7 years agoAlways inline some methods related to StackMap.
Mingyao Yang [Wed, 18 Jan 2017 22:51:59 +0000 (14:51 -0800)]
Always inline some methods related to StackMap.

This significantly speeds up stack walking on Pmd in Dacapo (10-30%).

Test: test-art-host
Change-Id: I79513b0b3d611e591c44e252062abf6a4f902797

7 years agoART: Note CC configuration down into oat files
Andreas Gampe [Thu, 19 Jan 2017 00:05:01 +0000 (16:05 -0800)]
ART: Note CC configuration down into oat files

To detect changes in configuration, write the runtime configuration
of ART_USE_READ_BARRIER into the oat file key-value store.

Bug: 34084559
Bug: 12687968
Test: m test-art-host
Test: m ART_USE_READ_BARRIER=true test-art-host
Change-Id: I0b2bd9aa5546538e2b4b669b0acc0a4bebfd7bf0

7 years agoMerge "ART: Start RuntimeCallbacks"
Treehugger Robot [Wed, 18 Jan 2017 22:52:26 +0000 (22:52 +0000)]
Merge "ART: Start RuntimeCallbacks"

7 years agoSplit ArtJvmtiEvent::kClassFileLoadHook in two.
Alex Light [Wed, 18 Jan 2017 19:17:47 +0000 (11:17 -0800)]
Split ArtJvmtiEvent::kClassFileLoadHook in two.

Since the ClassFileLoadHook event is sent to different environments
based on when it is invoked we split the event in two behind the
scenes. The event dispatcher is responsible for making sure that
either or both of the appropriate underlying events are invoked when a
JVMTI_EVENT_CLASS_FILE_LOAD_HOOK is sent.

We also make sure to modify the EventHandler so it sends the correct
events in the correct places when an environment changes its
capabilities.

Bug: 32369913
Bug: 31684920

Test: mma -j40 test-art-host

Change-Id: I82567fc66debe0b658e8d7fced6284a8c4355b7a

7 years agoMerge "Refactor jvmtiEvent so we can add to it."
Treehugger Robot [Wed, 18 Jan 2017 20:47:13 +0000 (20:47 +0000)]
Merge "Refactor jvmtiEvent so we can add to it."

7 years agoMerge "Fix check failure in ConcurrentCopying::IssueEmptyCheckpoint()."
Treehugger Robot [Wed, 18 Jan 2017 20:43:01 +0000 (20:43 +0000)]
Merge "Fix check failure in ConcurrentCopying::IssueEmptyCheckpoint()."

7 years agoART: Start RuntimeCallbacks
Andreas Gampe [Wed, 18 Jan 2017 05:40:35 +0000 (21:40 -0800)]
ART: Start RuntimeCallbacks

Add a central RuntimeCallbacks structure to handle certain interesting
runtime events.

In a first iteration, add ThreadLifecycleCallback with ThreadStart and
ThreadStop. Move Dbg over to ThreadLifecycleCallback.

Add a test.

Bug: 31684920
Test: m test-art-host-gtest-runtime_callbacks_test
Test: art/tools/run-jdwp-tests.sh --mode=host
Change-Id: Ie0f77739a563207bfb4f04374e72dc6935c40b4f

7 years agoMerge "ART: Disable test 901 on target"
Treehugger Robot [Wed, 18 Jan 2017 19:26:44 +0000 (19:26 +0000)]
Merge "ART: Disable test 901 on target"

7 years agoRefactor jvmtiEvent so we can add to it.
Alex Light [Wed, 18 Jan 2017 18:27:06 +0000 (10:27 -0800)]
Refactor jvmtiEvent so we can add to it.

Change all code over to using ArtJvmtiEvent from jvmtiEvent so that we
have a way to add additional internal events if the need arises.

Bug: 32369913
Bug: 31684920

Test: mma -j40 test-art-host

Change-Id: I555475048d2e753db8adf317dc1f66d81533cde0

7 years agoMerge changes Ib9fafbac,I05d73734,I0e95b0cb
Treehugger Robot [Wed, 18 Jan 2017 18:54:49 +0000 (18:54 +0000)]
Merge changes Ib9fafbac,I05d73734,I0e95b0cb

* changes:
  ART: Add JNI API
  ART: Align jvmti.h with jni.h
  ART: Add JNI function table manipulation

7 years agoART: Disable test 901 on target
Andreas Gampe [Wed, 18 Jan 2017 17:55:54 +0000 (09:55 -0800)]
ART: Disable test 901 on target

As this is now doing slightly more work, disable like the other
tests.

Bug: 31681198
Test: m test-art-target
Change-Id: I73c9f2da1024f8eabc67aba12659d34878cec1f1

7 years agoART: Add JNI API
Andreas Gampe [Tue, 17 Jan 2017 02:18:14 +0000 (18:18 -0800)]
ART: Add JNI API

Add support for GetJNIFunctionTable and SetJNIFunctionTable. Add
tests.

Bug: 34343708
Test: m test-art-host-run-test-928-jni-table
Change-Id: Ib9fafbac2781c570aa6eacf5242afbbf6c3ee7a9

7 years agoART: Align jvmti.h with jni.h
Andreas Gampe [Tue, 17 Jan 2017 02:53:59 +0000 (18:53 -0800)]
ART: Align jvmti.h with jni.h

Android follows the JNI specification and names the JNI function
table without the underscore.

Bug: 34343708
Test: m test-art-host
Change-Id: I05d73734545f9077ad66aceb335bdc8a76603a71

7 years agoART: Add JNI function table manipulation
Andreas Gampe [Mon, 16 Jan 2017 20:41:12 +0000 (12:41 -0800)]
ART: Add JNI function table manipulation

Add support for a function table override. This will override the
decision between the regular and the CheckJNI function tables, if
set.

Bug: 34343708
Test: m test-art-host-gtest-jni_internal_test
Change-Id: I0e95b0cbd21f4efdcd8c3d312781d9aeeff54a1e

7 years agoMerge "ART: Add Search API"
Treehugger Robot [Wed, 18 Jan 2017 17:16:06 +0000 (17:16 +0000)]
Merge "ART: Add Search API"

7 years agoMerge "ART: Add GetJLocationFormat"
Treehugger Robot [Wed, 18 Jan 2017 17:15:41 +0000 (17:15 +0000)]
Merge "ART: Add GetJLocationFormat"

7 years agoRemove now unused dex_cache_resolved_types_ from ArtMethod.
Nicolas Geoffray [Wed, 18 Jan 2017 17:05:59 +0000 (17:05 +0000)]
Remove now unused dex_cache_resolved_types_ from ArtMethod.

Test: test-art-host test-art-target
Change-Id: I004c040da165934f74eb8b8e85e99e7c6621c2df

7 years agoMerge "Load the array class in the compiler for allocations."
Nicolas Geoffray [Wed, 18 Jan 2017 15:43:07 +0000 (15:43 +0000)]
Merge "Load the array class in the compiler for allocations."

7 years agoRevert "Revert "Remove unused code for patching oat files.""
Richard Uhler [Wed, 18 Jan 2017 14:27:51 +0000 (14:27 +0000)]
Revert "Revert "Remove unused code for patching oat files.""

This reverts commit 78985875702c52657066da158c0246ef07115385.

Bug: 33192586
Test: m test-art-host
Test: m test-art-target
Test: device boots

Change-Id: I848b39a2b9b3c48beca2c68f9a316626a81abb39

7 years agoLoad the array class in the compiler for allocations.
Nicolas Geoffray [Tue, 17 Jan 2017 23:00:24 +0000 (23:00 +0000)]
Load the array class in the compiler for allocations.

Removing one other dependency for needing to pass
the current method, and having dex_cache_resolved_types_
in ArtMethod.

oat file increase:
- x64: 0.25%
- arm32: 0.30%
- x86: 0.28%

test: test-art-host, test-art-target
Change-Id: Ibca4fa00d3e31954db2ccb1f65a584b8c67cb230

7 years agoMerge "Fix Mips build."
Treehugger Robot [Wed, 18 Jan 2017 14:52:33 +0000 (14:52 +0000)]
Merge "Fix Mips build."

7 years agoMerge "Fix IP register usage in LoadClassSlowPathARMVIXL."
Treehugger Robot [Wed, 18 Jan 2017 14:28:59 +0000 (14:28 +0000)]
Merge "Fix IP register usage in LoadClassSlowPathARMVIXL."

7 years agoFix Mips build.
Nicolas Geoffray [Wed, 18 Jan 2017 13:30:00 +0000 (13:30 +0000)]
Fix Mips build.

Test: build mips
Change-Id: Icadff73d6a266bbdfd6cb67a66f04f559f28846d

7 years agoFix IP register usage in LoadClassSlowPathARMVIXL.
Vladimir Marko [Wed, 18 Jan 2017 12:54:44 +0000 (12:54 +0000)]
Fix IP register usage in LoadClassSlowPathARMVIXL.

Request a temporary from a UseScratchRegisterScope instead
of explicitly specifying the IP register to avoid assetion
failure in VIXL.

Test: Build aosp_flounder-userdebug with ART_USE_VIXL_ARM_BACKEND=true
Bug: 34340177
Bug: 30627598
Change-Id: Ie39fbbb66165d752634cde8d2963129641558b93

7 years agoMerge "Entrypoints cleanup."
Nicolas Geoffray [Wed, 18 Jan 2017 12:40:59 +0000 (12:40 +0000)]
Merge "Entrypoints cleanup."

7 years agoMerge "Blacklist tests for flaky no-image."
Treehugger Robot [Wed, 18 Jan 2017 12:28:27 +0000 (12:28 +0000)]
Merge "Blacklist tests for flaky no-image."

7 years agoEntrypoints cleanup.
Nicolas Geoffray [Fri, 13 Jan 2017 16:04:53 +0000 (16:04 +0000)]
Entrypoints cleanup.

Remove unused ones to facilitate the transition to compressed
dex caches.

test: test-art-host, test-art-target
Change-Id: I1d1cb0daffa86dd9dda2eaa3c1ea3650a5c8d9d0

7 years agoBlacklist tests for flaky no-image.
Nicolas Geoffray [Wed, 18 Jan 2017 11:08:02 +0000 (11:08 +0000)]
Blacklist tests for flaky no-image.

bug: 34369284
Change-Id: I09db432db8d99223f4f41e2d7bda7927ad5af9d5

7 years agoMerge "Reduce using ArtMethod's dex_cache_resolved_types_."
Vladimir Marko [Wed, 18 Jan 2017 10:52:20 +0000 (10:52 +0000)]
Merge "Reduce using ArtMethod's dex_cache_resolved_types_."

7 years agoMerge "MIPS: Fix polymorphic invokes."
Vladimir Marko [Wed, 18 Jan 2017 10:25:54 +0000 (10:25 +0000)]
Merge "MIPS: Fix polymorphic invokes."

7 years agoMIPS: Fix polymorphic invokes.
Alexey Frunze [Tue, 17 Jan 2017 03:03:21 +0000 (19:03 -0800)]
MIPS: Fix polymorphic invokes.

This fixes MIPS-specific optimizing compiler bugs introduced in
commit ac141397dc29189ad2b2df41f8d4312246beec60.

The below tests still fail in interpreter mode and this will be
addressed separately.

Test: booted MIPS32R2 in QEMU
Test: ./run-test --optimizing 953-invoke-polymorphic-compiler
Test: ./run-test --optimizing 955-methodhandles-smali
Test: ./run-test --optimizing 956-methodhandles
Test: ./run-test --optimizing 957-methodhandle-transforms
Test: ./run-test --optimizing 958-methodhandle-emulated-stackframe
Test: ./run-test --optimizing 959-invoke-polymorphic-accessors
Test: booted MIPS64 (with 2nd arch MIPS32R6) in QEMU
Test: same tests as above and
Test: ./run-test --optimizing --64 953-invoke-polymorphic-compiler
Test: ./run-test --optimizing --64 955-methodhandles-smali
Test: ./run-test --optimizing --64 956-methodhandles
Test: ./run-test --optimizing --64 957-methodhandle-transforms
Test: ./run-test --optimizing --64 958-methodhandle-emulated-stackframe
Test: ./run-test --optimizing --64 959-invoke-polymorphic-accessors

Change-Id: I6119e8b86448e022f68b10cd3a8912a2bd1976c5