OSDN Git Service

android-x86/art.git
7 years agoRevert "OatFileAssistant: look at vdex file for IsDexOptNeeded"
Andreas Gampe [Wed, 25 Jan 2017 00:16:27 +0000 (00:16 +0000)]
Revert "OatFileAssistant: look at vdex file for IsDexOptNeeded"

This reverts commit 402089a27b25a9d1112c49189eb83a567719188f.

Leads to crashes when vdex doesn't seem to contain dex files.

Bug: 34339100
Bug: 34685231
Change-Id: I57c3134892a190f792e196e6d7162285e74a64e4
Test: m test-art-host

7 years agoOatFileAssistant: look at vdex file for IsDexOptNeeded
Richard Uhler [Wed, 18 Jan 2017 08:39:23 +0000 (08:39 +0000)]
OatFileAssistant: look at vdex file for IsDexOptNeeded

Even if the oat file cannot be opened, there may be a vdex file that
contains valid dex code. The oat file assistant should take this into
account when determining the dexopt status.

Bug: 34339100
Test: oat_file_assistant_test, with new tests added.
Test: install an app, dumpsys package to show app status,
      delete app's oat file, dumpsys package to show status as vdex only,
      cmd package compile -r install app, verify in log that input vdex fd is
      provided to dex2oat.

Change-Id: Iab43e617a899773b318d61adeb117ed2cec085da

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 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 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

7 years agoART: Add Search API
Andreas Gampe [Tue, 17 Jan 2017 23:50:26 +0000 (15:50 -0800)]
ART: Add Search API

Add initial support for AddToBootstrapClassLoaderSearch and
AddToSystemClassLoaderSearch. The current implementation does
not support the OnLoad phase.

Add tests.

Bug: 34359699
Test: m test-art-host-run-test-929-search
Change-Id: I42955ff381cd3828bfd772bee2f9b0745195ee51

7 years agoMerge "Revert "Revert "ART: Add ThreadGroup API support"""
Andreas Gampe [Wed, 18 Jan 2017 02:51:15 +0000 (02:51 +0000)]
Merge "Revert "Revert "ART: Add ThreadGroup API support"""

7 years agoART: Add GetJLocationFormat
Andreas Gampe [Wed, 18 Jan 2017 02:36:56 +0000 (18:36 -0800)]
ART: Add GetJLocationFormat

Add support for GetJLocationFormat. Set the format to bytecode
indices.

Bug: 31455788
Test: m test-art-host
Change-Id: I1e1142686a9187274dd45d6243cdad500d2dc7d1

7 years agoMerge "Do test_getStackTraces last for test 129"
Mathieu Chartier [Wed, 18 Jan 2017 00:39:08 +0000 (00:39 +0000)]
Merge "Do test_getStackTraces last for test 129"

7 years agoMerge "ART: Disable app images for test 912"
Andreas Gampe [Tue, 17 Jan 2017 23:44:38 +0000 (23:44 +0000)]
Merge "ART: Disable app images for test 912"

7 years agoMerge "ART: Fix missing CLOCK_MONOTONIC on Mac"
Andreas Gampe [Tue, 17 Jan 2017 23:18:05 +0000 (23:18 +0000)]
Merge "ART: Fix missing CLOCK_MONOTONIC on Mac"

7 years agoRevert "Revert "ART: Add ThreadGroup API support""
Andreas Gampe [Mon, 16 Jan 2017 16:08:45 +0000 (16:08 +0000)]
Revert "Revert "ART: Add ThreadGroup API support""

This reverts commit 87071bfb6c1b708bdfa2a5f91d4744667b3a0443.

Add an ObjectLock, which corresponds to the synchronized(this)
implementation on the Java side. Wait for the expected five
child threads in the root group before running the actual
child test.

Bug: 31455788
Change-Id: Ib7a065d6a11f06f0325e3a8db040629f3ca69407
Test: m test-art-host-run-test-925-threadgroups

7 years agoFix check failure in ConcurrentCopying::IssueEmptyCheckpoint().
Hiroshi Yamauchi [Tue, 17 Jan 2017 21:59:59 +0000 (13:59 -0800)]
Fix check failure in ConcurrentCopying::IssueEmptyCheckpoint().

Thread::DumpState() internally uses ScopedObjectAccess which expects
that the caller does not hold the mutator lock if its in a suspended
state or that the caller holds the mutator lock and in the runnable
state. Use ScopedObjectAccess instead on the caller side to match this
expectation.

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

7 years agoMerge "Introduce a number of SIMD extensions for x86/x86_64 (SSE)."
Aart Bik [Tue, 17 Jan 2017 22:10:25 +0000 (22:10 +0000)]
Merge "Introduce a number of SIMD extensions for x86/x86_64 (SSE)."

7 years agoART: Disable app images for test 912
Andreas Gampe [Tue, 17 Jan 2017 22:01:50 +0000 (14:01 -0800)]
ART: Disable app images for test 912

To have precise info for actually loaded classes.

Bug: 31684578
Test: m ART_TEST_INTERPRETER=true test-art-host-run-test-912-classes
Change-Id: I06a9303befab40c619f9d1e3d677024c8f3b0ba3

7 years agoART: Fix missing CLOCK_MONOTONIC on Mac
Andreas Gampe [Tue, 17 Jan 2017 21:32:52 +0000 (13:32 -0800)]
ART: Fix missing CLOCK_MONOTONIC on Mac

Fix the Mac build.

Bug: 31455788
Test: m
Change-Id: I03e927c28fe62abc1b14ea799190d00a081f33f7

7 years agoMerge "Revert "Revert "Try really hard for JIT in test 916"""
Treehugger Robot [Tue, 17 Jan 2017 21:23:15 +0000 (21:23 +0000)]
Merge "Revert "Revert "Try really hard for JIT in test 916"""

7 years agoMerge "Revert "Remove unused code for patching oat files.""
Nicolas Geoffray [Tue, 17 Jan 2017 21:19:02 +0000 (21:19 +0000)]
Merge "Revert "Remove unused code for patching oat files.""

7 years agoRevert "Remove unused code for patching oat files."
Nicolas Geoffray [Tue, 17 Jan 2017 21:18:34 +0000 (21:18 +0000)]
Revert "Remove unused code for patching oat files."

oat_file_assistant_test fails on target.

Bug: 33192586

This reverts commit c9f76628ce1dc54f852b689ed1722b7e154b2a9d.

Change-Id: Ie3b8900ed16d0f4033a76c7eb60ac8e9ad13f089

7 years agoDo test_getStackTraces last for test 129
Mathieu Chartier [Tue, 17 Jan 2017 19:05:20 +0000 (11:05 -0800)]
Do test_getStackTraces last for test 129

Doing this check last leaves time for the heap task daemon to call
TaskProcessor::RunAllTasks. This should hopefully fix the flakiness
of test 129 during startup.

Test: test-art-host-run-test

Bug: 34342857
Change-Id: I85f8d78083092df802728c59a4c86f63be8d949a

7 years agoMerge "ART: Add three Timer functions"
Treehugger Robot [Tue, 17 Jan 2017 20:32:42 +0000 (20:32 +0000)]
Merge "ART: Add three Timer functions"

7 years agoART: Add three Timer functions
Andreas Gampe [Sat, 14 Jan 2017 00:24:17 +0000 (16:24 -0800)]
ART: Add three Timer functions

Add support for GetAvailableProcessors, GetTimerInfo and GetTime.
Add tests.

Bug: 31455788
Test: m test-art-host-run-test-926-timers
Change-Id: I9629654349787e27dee686284567b5de70e138f2

7 years agoMerge "ART: Add GetClassLoaderClasses"
Treehugger Robot [Tue, 17 Jan 2017 18:15:57 +0000 (18:15 +0000)]
Merge "ART: Add GetClassLoaderClasses"

7 years agoMerge "ART: Add SetVerboseFlags"
Treehugger Robot [Tue, 17 Jan 2017 18:15:44 +0000 (18:15 +0000)]
Merge "ART: Add SetVerboseFlags"

7 years agoRevert "Revert "Try really hard for JIT in test 916""
Alex Light [Sat, 14 Jan 2017 01:48:01 +0000 (01:48 +0000)]
Revert "Revert "Try really hard for JIT in test 916""

We were looping forever waiting for the entrypoint to be switched
despite the JIT being disabled by the tracing instrumentation.

This reverts commit ca4feac9484464a858990ca588398fceead55354.

Reason for revert: Problem with ensureJitCompiled fixed

Test: ART_TEST_TRACE=true        \
      ART_TEST_OPTIMIZING=false  \
      ART_TEST_INTERPRETER=true  \
      ART_USE_READ_BARRIER=false \
      mma -j40 test-art-host-run-test-916-obsolete-jit

Change-Id: I11f1e3f6cf65f90509a1ba66625a7988f3d94af6

7 years agoMerge "MethodHandles: Remove experimental flag."
Narayan Kamath [Tue, 17 Jan 2017 17:05:33 +0000 (17:05 +0000)]
Merge "MethodHandles: Remove experimental flag."

7 years agoMethodHandles: Remove experimental flag.
Narayan Kamath [Tue, 17 Jan 2017 13:20:55 +0000 (13:20 +0000)]
MethodHandles: Remove experimental flag.

Runtime::IsMethodHandlesEnabled now always returns true.
This change also removes the (now unnecessary) run scripts
for method handle tests.

Note that the --experimental=method-handles flag is left in
place for the test build steps (etc/default-build) because it's still a
convenient way to supply arguments to jack / smali.

Test: make test-art-host

Change-Id: I8475c7b8ac2615ac382a06ce54be39dce3cc7713

7 years agoReduce using ArtMethod's dex_cache_resolved_types_.
Vladimir Marko [Mon, 16 Jan 2017 20:52:19 +0000 (20:52 +0000)]
Reduce using ArtMethod's dex_cache_resolved_types_.

Avoid using the ArtMethod's dex cache type array shortcut
in runtime, preparing for its removal. We do not completely
remove the shortcut yet because it is still used by array
allocation entrypoints.

Fix ArgArray::BuildArgArrayFromObjectArray in reflection.cc
to not ask for the parameter type to be resolved. It should
have been previously resolved when retrieving the Method.

Also partially revert
    https://android-review.googlesource.com/310717
because it relied on the removed AIOOBE check in the removed
ArtMethod::GetDexCacheResolvedType(). The removed check was
simply defensive but it could not be triggered without some
memory corruption.

Test: m test-art-host
Bug: 30627598
Change-Id: Ic45a5ff8c66b79429e440cbc08d67bf22a083682

7 years agoMerge "Acquire the mutator lock before comparing classes/strings."
Nicolas Geoffray [Tue, 17 Jan 2017 15:48:00 +0000 (15:48 +0000)]
Merge "Acquire the mutator lock before comparing classes/strings."

7 years agoMerge "Move some fields in art::Thread to reduce maintenance burden."
Treehugger Robot [Tue, 17 Jan 2017 15:07:48 +0000 (15:07 +0000)]
Merge "Move some fields in art::Thread to reduce maintenance burden."

7 years agoAcquire the mutator lock before comparing classes/strings.
Nicolas Geoffray [Mon, 16 Jan 2017 22:57:39 +0000 (22:57 +0000)]
Acquire the mutator lock before comparing classes/strings.

Scratch my initial thought we woudldn't need it because the
handlescope is visited during the pause: as the compiler thread
is in state native, the GC can concurrently update the handlescope,
leading to false negatives when doing class/string equality.

bug:34240874
test: test-art-host gcstress
Change-Id: Icda0722fb49300a7de57e1c5d1efaa9e8dbda83f

7 years agoMove some fields in art::Thread to reduce maintenance burden.
Roland Levillain [Mon, 16 Jan 2017 14:58:23 +0000 (14:58 +0000)]
Move some fields in art::Thread to reduce maintenance burden.

Move fields `thread_local_start`, `thread_local_pos`,
`thread_local_end` and `thread_local_objects` before fields
`jni_entrypoints` and `quick_entrypoints` within
art::Thread, to avoid repetitive art::Thread field moves in
future CLs caused by the addition or deletion of entry
points.

Test: m test-art-host
test: m test-art-target (on ARM)
Change-Id: Ib67842e44a7f21a871ca4d1bb95dc6f7cfedc829

7 years agoMerge "Remove unused code for patching oat files."
Treehugger Robot [Tue, 17 Jan 2017 11:50:17 +0000 (11:50 +0000)]
Merge "Remove unused code for patching oat files."

7 years agoMerge "Put the resolved class in HLoadClass."
Nicolas Geoffray [Tue, 17 Jan 2017 10:25:57 +0000 (10:25 +0000)]
Merge "Put the resolved class in HLoadClass."

7 years agoMerge "MethodHandles: Implement invoker / exactInvoker."
Narayan Kamath [Tue, 17 Jan 2017 10:24:03 +0000 (10:24 +0000)]
Merge "MethodHandles: Implement invoker / exactInvoker."

7 years agoMerge "Handle verify-profile and bootclasspath classes in vdex."
Nicolas Geoffray [Tue, 17 Jan 2017 10:22:01 +0000 (10:22 +0000)]
Merge "Handle verify-profile and bootclasspath classes in vdex."

7 years agoMerge "Fix missing OOME check in reflection."
Vladimir Marko [Tue, 17 Jan 2017 10:04:27 +0000 (10:04 +0000)]
Merge "Fix missing OOME check in reflection."

7 years agoRemove unused code for patching oat files.
Richard Uhler [Thu, 12 Jan 2017 15:27:45 +0000 (15:27 +0000)]
Remove unused code for patching oat files.

patchoat is now only used for patching images. It no longer needs to
support patching of non-PIC oat files. This change removes code from
patchoat that was specific to patching of non-PIC oat files.

Bug: 33192586
Test: m test-art-host
Test: device boots
Change-Id: I8918a708e441493a21f25d537ed0b74748bb9641

7 years agoMerge "MethodHandles: Add tests for MethodHandles.Lookup.bind"
Narayan Kamath [Tue, 17 Jan 2017 09:24:18 +0000 (09:24 +0000)]
Merge "MethodHandles: Add tests for MethodHandles.Lookup.bind"

7 years agoMerge "Put inlined ArtMethod pointer in stack maps."
Nicolas Geoffray [Tue, 17 Jan 2017 09:16:31 +0000 (09:16 +0000)]
Merge "Put inlined ArtMethod pointer in stack maps."

7 years agoMerge "Fix braino in RTP."
Nicolas Geoffray [Tue, 17 Jan 2017 09:02:44 +0000 (09:02 +0000)]
Merge "Fix braino in RTP."

7 years agoART: Add GetClassLoaderClasses
Andreas Gampe [Mon, 16 Jan 2017 22:20:10 +0000 (14:20 -0800)]
ART: Add GetClassLoaderClasses

Add support for GetClassLoaderClasses, extracting all classes a
given classloader initiated. Add test.

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

7 years agoPut the resolved class in HLoadClass.
Nicolas Geoffray [Fri, 13 Jan 2017 14:17:29 +0000 (14:17 +0000)]
Put the resolved class in HLoadClass.

To avoid repeated lookups in sharpening/rtp/inlining.

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

7 years agoFix missing OOME check in reflection.
Vladimir Marko [Mon, 16 Jan 2017 22:42:09 +0000 (22:42 +0000)]
Fix missing OOME check in reflection.

Test: 080-oom-throw
Change-Id: I5f18ea756e815978bf8682555470505959a8fad5

7 years agoPut inlined ArtMethod pointer in stack maps.
Nicolas Geoffray [Thu, 12 Jan 2017 13:25:19 +0000 (13:25 +0000)]
Put inlined ArtMethod pointer in stack maps.

Currently done for JIT. Can be extended for AOT and inlined boot
image methods.

Also refactor the lookup of a inlined method at runtime to not
rely on the dex cache, but look at the class loader tables.

bug: 30933338
test: test-art-host, test-art-target
Change-Id: I58bd4d763b82ab8ca3023742835ac388671d1794

7 years agoHandle verify-profile and bootclasspath classes in vdex.
Nicolas Geoffray [Mon, 16 Jan 2017 17:54:09 +0000 (17:54 +0000)]
Handle verify-profile and bootclasspath classes in vdex.

Two problems:
1) An apk might define a class twice, or define a class that
   is already in the bootclasspath, or define a class that
   in the future happens to be in the bootclasspath.
2) verify-profile does not make classes that were not verified
   as verify-at-runtime for vdex.

Fixes:
1) Check that the resolved class is part of the dex file that
   we are currently looking into. If not, don't update its
   verification status.
2) Make unverified classes as such when they are not in the profile.

bug:34108532
Test: 634-vdex-duplicate
Change-Id: I77c5e417c16c91af257b88b6456d07c0e4c2ca93

7 years agoMerge "ART: Add Thread TLS support"
Treehugger Robot [Mon, 16 Jan 2017 18:58:33 +0000 (18:58 +0000)]
Merge "ART: Add Thread TLS support"

7 years agoMethodHandles: Implement invoker / exactInvoker.
Narayan Kamath [Mon, 16 Jan 2017 17:48:28 +0000 (17:48 +0000)]
MethodHandles: Implement invoker / exactInvoker.

Accompanies libcore commit 0a72753297b45d08ca33cf7e87888f5fee87f69e.

- Adds callsiteType field to mirror::EmulatedStackFrame.
- Adds unit tests for MethodHandles.invoker /
  MethodHandles.exactInvoker.

Test: art/test/run-test --host 957
Change-Id: Ia27742c80de560a5b38f792bfa97664678cec8ae

7 years agoFix braino in RTP.
Nicolas Geoffray [Mon, 16 Jan 2017 15:08:56 +0000 (15:08 +0000)]
Fix braino in RTP.

We should use the `compare` instruction, and not the `check`
instruction.

Test: test-art-host, 633-checker-rtp-getclass
bug: 34273618
Change-Id: I388ec92974202da3a318921097a14462f3f3f8b6

7 years agoART: Add Thread TLS support
Andreas Gampe [Sat, 14 Jan 2017 00:47:14 +0000 (16:47 -0800)]
ART: Add Thread TLS support

Add support for GetThreadLocalStorage and SetThreadLocalStorage.
Add test.

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

7 years agoMerge "ART: Add GetAllThreads"
Treehugger Robot [Mon, 16 Jan 2017 16:07:49 +0000 (16:07 +0000)]
Merge "ART: Add GetAllThreads"

7 years agoMerge changes I168f24de,I8ec60a98,I3c426ed7,Ic809b0f3
Treehugger Robot [Mon, 16 Jan 2017 15:50:46 +0000 (15:50 +0000)]
Merge changes I168f24de,I8ec60a98,I3c426ed7,Ic809b0f3

* changes:
  Implement HLoadClass/kBssEntry for boot image.
  Store resolved types for AOT code in .bss.
  Make runtime call on main for HLoadClass/kDexCacheViaMethod.
  Remove HLoadClass::LoadKind::kDexCachePcRelative.

7 years agoMethodHandles: Add tests for MethodHandles.Lookup.bind
Narayan Kamath [Mon, 16 Jan 2017 14:56:19 +0000 (14:56 +0000)]
MethodHandles: Add tests for MethodHandles.Lookup.bind

Test: art/test/run-test --host 956
Change-Id: I76f1fb69e7213dfcfadcc64641fe2afce46ed6cb