OSDN Git Service

android-x86/art.git
8 years agoEnforce class definition ordering rules in v37 Dex files.
Roland Levillain [Tue, 24 May 2016 12:46:39 +0000 (12:46 +0000)]
Enforce class definition ordering rules in v37 Dex files.
am: 31349988d7

* commit '31349988d7c44fe453bde9525fd10a371e543c28':
  Enforce class definition ordering rules in v37 Dex files.

Change-Id: Ie6a437bc417a3ed30f1040f69b2beb66d3bbc635

8 years agoEnforce class definition ordering rules in v37 Dex files.
Roland Levillain [Wed, 18 May 2016 10:41:33 +0000 (11:41 +0100)]
Enforce class definition ordering rules in v37 Dex files.

These new checks also reject classes extending or
implementing themselves directly or transitively within
a single Dex file.

(cherry picked from commit 621b5eab8eed7746925bca489114d706ad455572)

Bug: 28812524
Bug: 28797012
Bug: 28685551
Bug: 27682580

Change-Id: I51c43f8b4b6a7abaade63682411e61f21767f5d4

8 years agoMerge "Fix oat_writer to use WriteData which updates checksum." into nyc-dev
Jeff Hao [Mon, 23 May 2016 23:27:02 +0000 (23:27 +0000)]
Merge "Fix oat_writer to use WriteData which updates checksum." into nyc-dev
am: 1d84c20c8c

* commit '1d84c20c8c7b7d30f23b5e6913e7dfdf79cb8f39':
  Fix oat_writer to use WriteData which updates checksum.

Change-Id: Ib24d46812f1f14b6bd35292aa4e30aa2c26ac553

8 years agoMerge "Fix oat_writer to use WriteData which updates checksum." into nyc-dev
Jeff Hao [Mon, 23 May 2016 23:18:09 +0000 (23:18 +0000)]
Merge "Fix oat_writer to use WriteData which updates checksum." into nyc-dev

8 years agoFix oat_writer to use WriteData which updates checksum.
Jeff Hao [Mon, 23 May 2016 21:30:44 +0000 (14:30 -0700)]
Fix oat_writer to use WriteData which updates checksum.

OatWriter was using WriteFully in some places instead.

Bug: 28874264
Change-Id: Ibaea4536a7838f49feb98efe9c00a976fb5b2453

8 years agoDo not set property jpda.settings.syncPort in JDWP tests.
Roland Levillain [Mon, 23 May 2016 15:07:29 +0000 (15:07 +0000)]
Do not set property jpda.settings.syncPort in JDWP tests.
am: 135d9f8819

* commit '135d9f881970d160405a93fbcab8206a2e6d498b':
  Do not set property jpda.settings.syncPort in JDWP tests.

Change-Id: Ia49b0bdd2f17da5008a65669aabd17cd02c2b5d1

8 years agoDo not set property jpda.settings.syncPort in JDWP tests.
Roland Levillain [Fri, 20 May 2016 17:16:54 +0000 (18:16 +0100)]
Do not set property jpda.settings.syncPort in JDWP tests.

Let the OS choose the port automatically.

(cherry picked from commit 7235dd15e47d6f4b5e92400269cc206e01c514da)

Bug: 28869570
Change-Id: I79775f9e72f7f8d0f9ec3d68c6f0bdb057ca13ff

8 years agoMerge "Only fill methods with 0xFE on debug builds" into nyc-dev
Mathieu Chartier [Fri, 20 May 2016 23:27:06 +0000 (23:27 +0000)]
Merge "Only fill methods with 0xFE on debug builds" into nyc-dev
am: 6b2f0b5775

* commit '6b2f0b5775380de2cb8714f9d2cee91ea4c6d543':
  Only fill methods with 0xFE on debug builds

Change-Id: I2deb4002dfeb4c618324cb4dfd2f0876e3425f20

8 years agoMerge "Only fill methods with 0xFE on debug builds" into nyc-dev
Mathieu Chartier [Fri, 20 May 2016 23:20:00 +0000 (23:20 +0000)]
Merge "Only fill methods with 0xFE on debug builds" into nyc-dev

8 years agoOnly fill methods with 0xFE on debug builds
Mathieu Chartier [Thu, 19 May 2016 17:13:04 +0000 (10:13 -0700)]
Only fill methods with 0xFE on debug builds

The GC scans classes without holding any locks, we can not fill
the methods if it is running. Added a GC critical section to address
this. Fixes random crash when scanning classes' methods.

Only for debug builds to not hurt performance.

Bug: 28699001
Change-Id: If96155eaf3fc0e6df31f57dcf32fbd4063b09345

8 years agoMerge "ART: Check whether an oat file exists before opening" into nyc-dev
Andreas Gampe [Thu, 19 May 2016 22:41:01 +0000 (22:41 +0000)]
Merge "ART: Check whether an oat file exists before opening" into nyc-dev
am: 1e8a22fa84

* commit '1e8a22fa849119aa8ea24b3811e74dea12bdb8c3':
  ART: Check whether an oat file exists before opening

Change-Id: If7aa7cb04a827073a840771eae63f6ecbe4a3cd9

8 years agoMerge "Do not allow OSR jump while debugging is active." into nyc-dev
Aart Bik [Thu, 19 May 2016 22:41:00 +0000 (22:41 +0000)]
Merge "Do not allow OSR jump while debugging is active." into nyc-dev
am: 8a325a905d

* commit '8a325a905df6bf8269bc8457bcbc665bf492ee1a':
  Do not allow OSR jump while debugging is active.

Change-Id: Ifc8b6b939b0474ffcd74c2c9bce799458b5511ae

8 years agoMerge "ART: Check whether an oat file exists before opening" into nyc-dev
Andreas Gampe [Thu, 19 May 2016 22:35:45 +0000 (22:35 +0000)]
Merge "ART: Check whether an oat file exists before opening" into nyc-dev

8 years agoMerge "Do not allow OSR jump while debugging is active." into nyc-dev
Aart Bik [Thu, 19 May 2016 22:34:19 +0000 (22:34 +0000)]
Merge "Do not allow OSR jump while debugging is active." into nyc-dev

8 years agoDo not allow OSR jump while debugging is active.
Aart Bik [Wed, 18 May 2016 22:44:07 +0000 (15:44 -0700)]
Do not allow OSR jump while debugging is active.

Rationale:
This prevents dangerous transitions between interpreter
and osr compiled code while e.g. single stepping through
a method that is becoming hot.

BUG=28672961

(cherry picked from commit 29bdaeef925f35eed68f3e52d04416daa0a62317)

Change-Id: I7647710dbe794a1b3320a9666d3e3be85fc40ccd

8 years agoMerge "Add missing check for IsShuttingDown in profile saver" into nyc-dev
Calin Juravle [Thu, 19 May 2016 19:12:37 +0000 (19:12 +0000)]
Merge "Add missing check for IsShuttingDown in profile saver" into nyc-dev
am: 29173dece8

* commit '29173dece894749d9e37fd9a93cb911ee36c1b41':
  Add missing check for IsShuttingDown in profile saver

Change-Id: Ie5f389bff7e7cf43b3740987d28098d4bf0bfe25

8 years agoMerge "Add missing check for IsShuttingDown in profile saver" into nyc-dev
TreeHugger Robot [Thu, 19 May 2016 18:52:34 +0000 (18:52 +0000)]
Merge "Add missing check for IsShuttingDown in profile saver" into nyc-dev

8 years agoMerge "Fix profile saver initial wait" into nyc-dev
Mathieu Chartier [Thu, 19 May 2016 17:23:31 +0000 (17:23 +0000)]
Merge "Fix profile saver initial wait" into nyc-dev
am: 84c5ad8ea5

* commit '84c5ad8ea51f8fde8eedddd3dc979dcc1f6e02aa':
  Fix profile saver initial wait

Change-Id: I4ec430e720673bf19af856edab13cbd1b3199d96

8 years agoAdd missing check for IsShuttingDown in profile saver
Calin Juravle [Wed, 18 May 2016 22:49:36 +0000 (15:49 -0700)]
Add missing check for IsShuttingDown in profile saver

Bug: 28814718
Change-Id: I709fc30147047c7a420cd6ff2f0c3b57c54c2021

8 years agoMerge "Fix profile saver initial wait" into nyc-dev
Mathieu Chartier [Thu, 19 May 2016 17:04:35 +0000 (17:04 +0000)]
Merge "Fix profile saver initial wait" into nyc-dev

8 years agoMerge "Revert "Move rewritten StringFactory call results into dex registers for deopt...
Roland Levillain [Thu, 19 May 2016 14:40:58 +0000 (14:40 +0000)]
Merge "Revert "Move rewritten StringFactory call results into dex registers for deopt"" into nyc-dev
am: 79d123fae7

* commit '79d123fae76a8c03983a37997f2e2039f7e2bc96':
  Revert "Move rewritten StringFactory call results into dex registers for deopt"

Change-Id: I5782a3c70910e9cb7644059288c50b9e34c45d8c

8 years agoMerge "Revert "Move rewritten StringFactory call results into dex registers for deopt...
TreeHugger Robot [Thu, 19 May 2016 14:30:18 +0000 (14:30 +0000)]
Merge "Revert "Move rewritten StringFactory call results into dex registers for deopt"" into nyc-dev

8 years agoRevert "Move rewritten StringFactory call results into dex registers for deopt"
Roland Levillain [Thu, 19 May 2016 13:00:55 +0000 (13:00 +0000)]
Revert "Move rewritten StringFactory call results into dex registers for deopt"

This reverts commit 0ea451b4d74e8ddc28ea5ce87ef6d21113a3cdd5.

597-deopt-new-string is failing.

Bug: 28846692
Bug: 28555675
Change-Id: I8274e5ae1d065dedc562132882b39e7f3fe5baf4

8 years agoART: Fix Mac build
Andreas Gampe [Thu, 19 May 2016 05:11:44 +0000 (05:11 +0000)]
ART: Fix Mac build
am: 17fc4bda79

* commit '17fc4bda7987654709dcc24ea5a7bd6a859e0966':
  ART: Fix Mac build

Change-Id: Ie955a9907abcb1a94b0c6106bb573d9b42288f6c

8 years agoART: Fix Mac build
Andreas Gampe [Thu, 19 May 2016 04:27:00 +0000 (21:27 -0700)]
ART: Fix Mac build

Follow-up to 9821cceebf077cb747aed543582b3d740a03ea7f.

Bug: 28801010
Change-Id: I0bbdf83d64ea81e56824aa19bfae3baa341a2b73

8 years agoART: Check whether an oat file exists before opening
Andreas Gampe [Thu, 19 May 2016 04:10:42 +0000 (21:10 -0700)]
ART: Check whether an oat file exists before opening

The two-stage process of dlopen and our own loader is expensive.
Considering that the OatFileAssistant needs to check two locations,
one of which is unlikely to have a file for the common case of apps
installed in data, do a file existence check before attempting to
load the file.

Remove an unused variable.

Saves about 0.25ms on a N6P.

Bug: 28801010
Change-Id: I0aff9c276c0f539723f8a92663f14ce72160c44d

8 years agoMerge "ART: Optimize PreSetup pass for oat-file open" into nyc-dev
Andreas Gampe [Thu, 19 May 2016 03:56:35 +0000 (03:56 +0000)]
Merge "ART: Optimize PreSetup pass for oat-file open" into nyc-dev
am: b938d19c29

* commit 'b938d19c29aa055118a35885c2411824fd3e20a7':
  ART: Optimize PreSetup pass for oat-file open

Change-Id: I1452ccdd5efb249ac2ad23118547f7afaf48ba4e

8 years agoMerge "ART: Optimize PreSetup pass for oat-file open" into nyc-dev
TreeHugger Robot [Thu, 19 May 2016 03:51:04 +0000 (03:51 +0000)]
Merge "ART: Optimize PreSetup pass for oat-file open" into nyc-dev

8 years agoFix profile saver initial wait
Mathieu Chartier [Thu, 19 May 2016 02:51:23 +0000 (19:51 -0700)]
Fix profile saver initial wait

Was using TimedWait for the initial wait, but this can return
early if the process receives any interrupt (due to futex). The
solution is to use a wait loop. If the wait returned early, not
enough classes were including in the profile. This negatively
affected application launch times in some scenarios.

Sample wait times before the change:
Waited 2.002s
Waited 97.808ms
Waited 182.676ms
Waited 2.000s
Waited 1.678s

Bug: 27688727

Change-Id: Ia84878e1278d70b4cc239374a2107d0f111dbdc5

8 years agoMove rewritten StringFactory call results into dex registers for deopt
Mingyao Yang [Wed, 18 May 2016 20:34:22 +0000 (20:34 +0000)]
Move rewritten StringFactory call results into dex registers for deopt
am: 0ea451b4d7

* commit '0ea451b4d74e8ddc28ea5ce87ef6d21113a3cdd5':
  Move rewritten StringFactory call results into dex registers for deopt

Change-Id: Ib1dbec5abc54d74cc6c6dc118b997299c72b69ba

8 years agoART: Optimize PreSetup pass for oat-file open
Andreas Gampe [Wed, 18 May 2016 20:09:54 +0000 (13:09 -0700)]
ART: Optimize PreSetup pass for oat-file open

The PreSetup pass for opening an oatfile with dlopen parses all
shared objects and tries to retrieve the corresponding mem map
(so as to have a fake MemMap to reserve the space for any scanning
operations and so on). Optimistically optimize this pass by counting
the number of shared objects before the dlopen, and skipping as
many afterwards.

This saves about half a millisecond on an N6P.

Bug: 28801010
Change-Id: I70156f9875e89c5af3c9e36e8f01c5662e3f736e

8 years agoMove rewritten StringFactory call results into dex registers for deopt
Mingyao Yang [Mon, 16 May 2016 18:01:49 +0000 (11:01 -0700)]
Move rewritten StringFactory call results into dex registers for deopt

Bug: 28555675

(cherry picked from commit 8ca33bf04060fadd5b35fa93fa56547c62fe52e7)

Change-Id: I9236df283f2e83ca5dcde01f73dc0522d745cd59

8 years agoMerge "Catch classes inheriting from themselves in the class linker." into nyc-dev
Roland Levillain [Wed, 18 May 2016 14:57:42 +0000 (14:57 +0000)]
Merge "Catch classes inheriting from themselves in the class linker." into nyc-dev
am: 3fdf31d101

* commit '3fdf31d101819d4e0200e80d1692ffcbe785af90':
  Catch classes inheriting from themselves in the class linker.

Change-Id: Ied64a7c6cd4eeb75eae59b46bd55a23720d44510

8 years agoMerge "Catch classes inheriting from themselves in the class linker." into nyc-dev
Roland Levillain [Wed, 18 May 2016 14:48:45 +0000 (14:48 +0000)]
Merge "Catch classes inheriting from themselves in the class linker." into nyc-dev

8 years agoCatch classes inheriting from themselves in the class linker.
Roland Levillain [Wed, 18 May 2016 11:25:38 +0000 (12:25 +0100)]
Catch classes inheriting from themselves in the class linker.

Bug: 28685551
Bug: 27682580
Bug: 28830038

Change-Id: If568013bf3c82c1df9b282522712d9af5ca5945d

8 years agoART: Fix systrace monitor logging
Andreas Gampe [Wed, 18 May 2016 00:48:38 +0000 (00:48 +0000)]
ART: Fix systrace monitor logging
am: 825ab1c3f4

* commit '825ab1c3f44fd84e5967f023c2dd8d36c6906f08':
  ART: Fix systrace monitor logging

Change-Id: Ica2a4c61591c8270a8caf10a6457090b65b58bd4

8 years agoART: Fix systrace monitor logging
Andreas Gampe [Tue, 17 May 2016 17:13:10 +0000 (10:13 -0700)]
ART: Fix systrace monitor logging

Thinlock unlocking was incorrectly unconditionally ending a block.

Bug: 28423466
Change-Id: Ifaebd9e959041e157e292d4cba05675a37e9c700

8 years agoMerge "Revert "Reject classes inheriting from themselves directly or transitively...
Nicolas Geoffray [Tue, 17 May 2016 01:51:22 +0000 (01:51 +0000)]
Merge "Revert "Reject classes inheriting from themselves directly or transitively."" into nyc-dev
am: cd38fb2099

* commit 'cd38fb20995d8fa7fc6979335d038d7eaac24745':
  Revert "Reject classes inheriting from themselves directly or transitively."

Change-Id: I6696ac6463c94b317b0696d94f1c23bed901b639

8 years agoMerge "Revert "Reject classes inheriting from themselves directly or transitively...
TreeHugger Robot [Tue, 17 May 2016 01:46:56 +0000 (01:46 +0000)]
Merge "Revert "Reject classes inheriting from themselves directly or transitively."" into nyc-dev

8 years agoMerge "Visit IMT of all classes during image writing" into nyc-dev
Mathieu Chartier [Tue, 17 May 2016 01:23:51 +0000 (01:23 +0000)]
Merge "Visit IMT of all classes during image writing" into nyc-dev
am: 1b95ffd141

* commit '1b95ffd141817ffda06fa25ddbef5b896760f68a':
  Visit IMT of all classes during image writing

Change-Id: I4585c0cd2a5cebff87982f7c058b071cda8414fb

8 years agoMerge "Visit IMT of all classes during image writing" into nyc-dev
Mathieu Chartier [Tue, 17 May 2016 01:21:19 +0000 (01:21 +0000)]
Merge "Visit IMT of all classes during image writing" into nyc-dev

8 years agoRevert "Reject classes inheriting from themselves directly or transitively."
Nicolas Geoffray [Tue, 17 May 2016 00:12:11 +0000 (00:12 +0000)]
Revert "Reject classes inheriting from themselves directly or transitively."

Bug: 28685551
Bug: 27682580
Bug: 28797012

This reverts commit 9de98ef4ad4311e85d124099b0b36ab81171ea20.

Change-Id: Ic4a21194ad602f4897f088a66672f3dd9f30f607

8 years agoVisit IMT of all classes during image writing
Mathieu Chartier [Mon, 16 May 2016 21:58:01 +0000 (14:58 -0700)]
Visit IMT of all classes during image writing

We still need to visit the IMT for classes that does not have any
methods. It is required to visit the IMT of every class to assign
image offsets for the conflict table methods.

Added regression test.

Bug: 28707801
Change-Id: I1cd21f20e1e3c606ecfe8cbabe1045cadd86f268

8 years agoMerge "Fix assert failure in interpreter after deoptimization." into nyc-dev
Mingyao Yang [Mon, 16 May 2016 23:19:13 +0000 (23:19 +0000)]
Merge "Fix assert failure in interpreter after deoptimization." into nyc-dev
am: d2451e48d3

* commit 'd2451e48d36cbfb9008795e3817e317e26942c7d':
  Fix assert failure in interpreter after deoptimization.

Change-Id: I68ed38812a3f47b80589fe97e602c5a75f88abb8

8 years agoMerge "Fix assert failure in interpreter after deoptimization." into nyc-dev
Mingyao Yang [Mon, 16 May 2016 23:15:03 +0000 (23:15 +0000)]
Merge "Fix assert failure in interpreter after deoptimization." into nyc-dev

8 years agoAdjust ProfileSaver strategy
Calin Juravle [Mon, 16 May 2016 23:05:00 +0000 (23:05 +0000)]
Adjust ProfileSaver strategy
am: 5fbb0fe062

* commit '5fbb0fe0625a1f76aa33cd78ccf1a17b00d8f6d1':
  Adjust ProfileSaver strategy

Change-Id: I83425da1869af646b713769fd539c9b93e21a7d1

8 years agoAdjust ProfileSaver strategy
Calin Juravle [Fri, 29 Apr 2016 15:44:11 +0000 (16:44 +0100)]
Adjust ProfileSaver strategy

Change to a notification based strategy (instead of polling):
- the JIT notifies the ProfileSaver everytime it attempts a compilation
or generate (in a task) a ProfileInfo object for the method
- once a certain number of hot methods notification are received,
ProfileSaver wakes up the thread to do the analysis
- a wake up does not equal to I/O since the during processing we might
realized that's actually not enough new data.
- ProfileSaver throtles the request and ensures it doesn't do the
processing more often than kMinSavePeriodNs.

The new strategy avoids waking the thread unnecessary during extended
idle periods when we don't JIT.

Bug: 26815940

Change-Id: I24cb15daead5c5a5395ae6f5f79549e39e2f3011

8 years agoMerge "Make quick frames of proxy methods visited if they\'re constructors." into...
Jeff Hao [Mon, 16 May 2016 17:21:36 +0000 (17:21 +0000)]
Merge "Make quick frames of proxy methods visited if they\'re constructors." into nyc-dev
am: 04f511b82d

* commit '04f511b82dd06e91b443e17b1654f5d0e14473d8':
  Make quick frames of proxy methods visited if they're constructors.

Change-Id: I3e95c27a6441c70317110ce9c52756ab5cfb8fff

8 years agoMerge "Make quick frames of proxy methods visited if they're constructors." into...
Jeff Hao [Mon, 16 May 2016 17:15:20 +0000 (17:15 +0000)]
Merge "Make quick frames of proxy methods visited if they're constructors." into nyc-dev

8 years agoReject classes inheriting from themselves directly or transitively.
Roland Levillain [Mon, 16 May 2016 14:52:31 +0000 (14:52 +0000)]
Reject classes inheriting from themselves directly or transitively.
am: 9de98ef4ad

* commit '9de98ef4ad4311e85d124099b0b36ab81171ea20':
  Reject classes inheriting from themselves directly or transitively.

Change-Id: I4b461ae932c3bf24d03c117be979fc0c8a81c093

8 years agoReject classes inheriting from themselves directly or transitively.
Roland Levillain [Thu, 12 May 2016 15:12:47 +0000 (16:12 +0100)]
Reject classes inheriting from themselves directly or transitively.

Also enforce class definition ordering with respect to super
classes within a Dex file.

(cherry picked from commit 498bb81f8725e2cf8f5ce1aa6b49ab5a9c5bb4c9)

Bug: 28685551
Bug: 27682580
Change-Id: If3eba782538eb4328d4b8a542236632379e7c050

8 years agoMake quick frames of proxy methods visited if they're constructors.
Jeff Hao [Fri, 13 May 2016 21:46:28 +0000 (14:46 -0700)]
Make quick frames of proxy methods visited if they're constructors.

Also adds a test case for getting annotations during moving GC.

Bug: 28510922
Change-Id: Ic9b849cd16321da3a3a609182dcdea08782496f9

8 years agoEnsure that java.lang.reflect.Field is initialized
Przemyslaw Szczepaniak [Fri, 13 May 2016 16:06:20 +0000 (16:06 +0000)]
Ensure that java.lang.reflect.Field is initialized
am: 6cb4ccbd0d

* commit '6cb4ccbd0dfabb9261aca911749be0603adecfe5':
  Ensure that java.lang.reflect.Field is initialized

Change-Id: Ie9d66eddd40498c76554e8ff2c7439e8a92100c2

8 years agoEnsure that java.lang.reflect.Field is initialized
Przemyslaw Szczepaniak [Thu, 12 May 2016 13:55:48 +0000 (14:55 +0100)]
Ensure that java.lang.reflect.Field is initialized

Recent change in libcore (a move of clinit code
to register function for java.net.InetAddress
class) was triggering a failure in 119-noimage-patchoat
test. Failure was occurring when the test was running
without the image. This was caused by the
java.lang.reflect.Field not being initialized when
running InetAddress.<clinit>, which is a side effect
of calling JNIEnv->GetMethodId inside the libcore JNI_OnLoad.

This changes makes sure that this class is initialized
when we're running without image.

Bug: 28153851
Bug: 27265238
Change-Id: I8aeb5eb312a163c452c40b851112544a8340e488
(cherry picked from commit a2b147eaf72c5af23302a382620360b4cac28934)

8 years agoFix oatdump crash on arm64/arm code. Also adds 16 bit literal information.
Aart Bik [Thu, 12 May 2016 20:31:14 +0000 (20:31 +0000)]
Fix oatdump crash on arm64/arm code. Also adds 16 bit literal information.
am: a6e95b32d4

* commit 'a6e95b32d499811bbb37602fc7446a5a0d05b9f8':
  Fix oatdump crash on arm64/arm code. Also adds 16 bit literal information.

Change-Id: I6820b1beed08ccee7c78bab4fb15d7752073a5b0

8 years agoFix oatdump crash on arm64/arm code.
Aart Bik [Wed, 11 May 2016 17:30:47 +0000 (10:30 -0700)]
Fix oatdump crash on arm64/arm code.
Also adds 16 bit literal information.

Rationale:
When "run-away" instructions are disassembled, the literal
addresses may go out of range, causing oatdump to crash.
This CL guards memory access against the full memory range
allocated to assembly instructions and data (it is possible
but not really necessary to refine this a bit). Out of range
arguments are now displayed as (?) to denote the issue, which
is a lot nicer than crashing.

BUG=28670871

(cherry picked from commit d3059e77818a058513ed92557160bdb6d5102b67)

Change-Id: I322bbdf83509e253430c40428a05c0ad16b81354

8 years agoMerge "Don\'t expect permission to open foreign dex use marks." into nyc-dev
Richard Uhler [Thu, 12 May 2016 15:17:02 +0000 (15:17 +0000)]
Merge "Don\'t expect permission to open foreign dex use marks." into nyc-dev
am: 28e1a501ce

* commit '28e1a501ce86a726d84ffdf646f21144110f692d':
  Don't expect permission to open foreign dex use marks.

Change-Id: I6a976f32a81eae93d11281945699bf7811ec3408

8 years agoMerge "Don't expect permission to open foreign dex use marks." into nyc-dev
Richard Uhler [Thu, 12 May 2016 15:12:28 +0000 (15:12 +0000)]
Merge "Don't expect permission to open foreign dex use marks." into nyc-dev

8 years agoMerge "Fix another case of live_in at irreducible loop entry." into nyc-dev
Nicolas Geoffray [Thu, 12 May 2016 08:01:50 +0000 (08:01 +0000)]
Merge "Fix another case of live_in at irreducible loop entry." into nyc-dev
am: bf0c2e79fe

* commit 'bf0c2e79fe77f67210bd2d0f8426f05aaf677672':
  Fix another case of live_in at irreducible loop entry.

Change-Id: I0252676892f87afbf1c96317fba87a0033de16b4

8 years agoMerge "Fix another case of live_in at irreducible loop entry." into nyc-dev
TreeHugger Robot [Thu, 12 May 2016 07:57:02 +0000 (07:57 +0000)]
Merge "Fix another case of live_in at irreducible loop entry." into nyc-dev

8 years agoMerge "Prevent ArtMethod clearing race" into nyc-dev
Mathieu Chartier [Wed, 11 May 2016 22:20:50 +0000 (22:20 +0000)]
Merge "Prevent ArtMethod clearing race" into nyc-dev
am: f8e5d94a12

* commit 'f8e5d94a121a207bea0f304eabeaaca194d5f0b9':
  Prevent ArtMethod clearing race

Change-Id: Ib817a1d68cb8a28e2962cdc8ca13820c803f9c99

8 years agoMerge "Prevent ArtMethod clearing race" into nyc-dev
Mathieu Chartier [Wed, 11 May 2016 22:15:39 +0000 (22:15 +0000)]
Merge "Prevent ArtMethod clearing race" into nyc-dev

8 years agoAdd histogram for native allocations
Mathieu Chartier [Wed, 11 May 2016 21:21:23 +0000 (21:21 +0000)]
Add histogram for native allocations
am: 0dce75dc69

* commit '0dce75dc6945c221a054eb9c479fb60efd193719':
  Add histogram for native allocations

Change-Id: Ie794c9558e37e2b7d20c6b3d3e5cfad0f914a14f

8 years agoPrevent ArtMethod clearing race
Mathieu Chartier [Wed, 11 May 2016 01:13:20 +0000 (18:13 -0700)]
Prevent ArtMethod clearing race

There was race condition where the GC would be visiting the methods
of a class while the class linker overwrote the contents with 0xFE
when copying to a new array.

Since the GC is holding the class table lock at this time, we can
use this lock in the class linker to prevent the race.

Bug: 28699001

(cherry picked from commit 10c5f56423feaf3eadb3d4c09c61d2b998404162)

Change-Id: I5ddca93106cb8e48962cf44e5ce434c45e05cd0c

8 years agoAdd histogram for native allocations
Mathieu Chartier [Wed, 11 May 2016 18:35:39 +0000 (11:35 -0700)]
Add histogram for native allocations

Shows up in traces.txt, sample output:
Histogram of native allocation 0:4315,131072:33,1179648:3 bucket size 131072
Histogram of native free 0:995,131072:19,1179648:2 bucket size 131072

Bug: 28680116

Change-Id: I584eb85709d3ae28f5142a01af11075a2a6436d7

8 years agoDon't expect permission to open foreign dex use marks.
Richard Uhler [Tue, 10 May 2016 21:01:18 +0000 (14:01 -0700)]
Don't expect permission to open foreign dex use marks.

sepolicy says we can create the mark files, but open requires
additional permissions we don't need. Don't print a warning when we
aren't given those additional permissions.

Bug: 28241500
Change-Id: I6764a9b0e165ff9781a10f682d7387b094d34da9

8 years agoFix assert failure in interpreter after deoptimization.
Mingyao Yang [Thu, 28 Apr 2016 23:23:01 +0000 (16:23 -0700)]
Fix assert failure in interpreter after deoptimization.

There is code that does
  new String(chararr, 0, chararr_count);
which under debuggable turns into a call into pNewEmptyString() plus a
call into pNewStringFromChars_CII().
Even though we currently don't patch return pc in a runtime method,
calling into pNewEmptyString() is special since it's hacked such
that it's acting as if the caller calls into the java method
StringFactory.newEmptyString() directly. So deoptimization can now
happen at the NewEmptyString site and the assert is triggered since
it's a new instance instead of an invoke instruction.

The fix relaxes the assert to allow the special case.

Bug: 28555675

(cherry picked from commit 504a69081f63818ca332ddaf54e8198448554538)

Change-Id: Idbb159b5aa450df2344cd93ae74fef5f55bdc534

8 years agoFix another case of live_in at irreducible loop entry.
Nicolas Geoffray [Tue, 10 May 2016 13:35:34 +0000 (14:35 +0100)]
Fix another case of live_in at irreducible loop entry.

GVN was implicitly extending the liveness of an instruction across
an irreducible loop.

Fix this problem by clearing the value set at loop entries that contain
an irreducible loop.

bug:28252896
Change-Id: I68823cb88dceb4c2b4545286ba54fd0c958a48b0

8 years agoMerge changes from topic \'native_unloads\' into nyc-dev
Mathieu Chartier [Wed, 11 May 2016 02:37:12 +0000 (02:37 +0000)]
Merge changes from topic \'native_unloads\' into nyc-dev
am: ab249381b4

* commit 'ab249381b4757e96da31c0cdcaf889861d1cc928':
  Fix libarttest to be non debug
  Change test 136 to use dlopen
  Revert "Revert "Remove double unloading hack""
  Revert "Revert "Revert "Revert "(dl)Close native libraries on unload""""

Change-Id: Ibb1c01ad6ce97f086c29897961953e844d1eea76

8 years agoMerge changes from topic 'native_unloads' into nyc-dev
Mathieu Chartier [Wed, 11 May 2016 02:32:30 +0000 (02:32 +0000)]
Merge changes from topic 'native_unloads' into nyc-dev

* changes:
  Fix libarttest to be non debug
  Change test 136 to use dlopen
  Revert "Revert "Remove double unloading hack""
  Revert "Revert "Revert "Revert "(dl)Close native libraries on unload""""

8 years agoFix libarttest to be non debug
Mathieu Chartier [Thu, 5 May 2016 22:31:12 +0000 (15:31 -0700)]
Fix libarttest to be non debug

Previously both libarttest and libarttestd had debug enabled. This
made it hard to know which one was loaded (couldn't look at
kIsDebugBuild).

Fixes test 136 with ART_TEST_RUN_TEST_NDEBUG configuration.

Bug: 28406866

(cherry picked from commit 48b2b3e57e0510f549e9dc5c5a61f50eec697cf5)

Change-Id: I92983f71374b211f96f5b346fec326ea8543f876

8 years agoMerge "Break the debug cycle!" into nyc-dev
Aart Bik [Tue, 10 May 2016 22:48:25 +0000 (22:48 +0000)]
Merge "Break the debug cycle!" into nyc-dev
am: 0faf1514b5

* commit '0faf1514b5b59a809539f003c5915db9bb0ff03e':
  Break the debug cycle!

Change-Id: Iaa628b89986bc02e517126aa071aa19219b34c77

8 years agoMerge "Break the debug cycle!" into nyc-dev
Aart Bik [Tue, 10 May 2016 22:43:27 +0000 (22:43 +0000)]
Merge "Break the debug cycle!" into nyc-dev

8 years agoChange test 136 to use dlopen
Mathieu Chartier [Thu, 5 May 2016 18:09:58 +0000 (11:09 -0700)]
Change test 136 to use dlopen

dlopen self to prevent the native libary being closed from
DestroyJavaVM. We need this since it is the library currently
executing code.

Bug: 28406866

(cherry picked from commit 06fd2cff238cbdd8f6ceb4a85273c5a7fd0db023)

Change-Id: Ib23f09a97184abb69a142057b0ccb9d476f69c95

8 years agoRevert "Revert "Remove double unloading hack""
Mathieu Chartier [Tue, 10 May 2016 17:11:48 +0000 (10:11 -0700)]
Revert "Revert "Remove double unloading hack""

This reverts commit e9cae49599856fe737cee87783438d2c5dabccfe.

Bug: 28406866

(cherry picked from commit c0f2e678e45ff191f90651117f4e238caa521b80)

Change-Id: I806cec1a6baab8722262082a6d3db1ac3734a8ab

8 years agoRevert "Revert "Revert "Revert "(dl)Close native libraries on unload""""
Mathieu Chartier [Tue, 10 May 2016 17:12:00 +0000 (10:12 -0700)]
Revert "Revert "Revert "Revert "(dl)Close native libraries on unload""""

This reverts commit 624b68ecbe67dd91cb50f588fbfa2243def47f1e.

Bug: 28406866

(cherry picked from commit 33bae7d52debe898879fc034a5524b1b165dbd88)

Change-Id: I4d6d6791b286cfeecaeebc388684ee8d3c44a920

8 years agoMerge "Initialize native loader before starting runtime" into nyc-dev
Dimitry Ivanov [Tue, 10 May 2016 20:18:26 +0000 (20:18 +0000)]
Merge "Initialize native loader before starting runtime" into nyc-dev
am: b0251e826f

* commit 'b0251e826f623cc64813ff4a2b0e097490fdd5f8':
  Initialize native loader before starting runtime

Change-Id: Ic386068b240f775cf5f291c357be941389a68958

8 years agoMerge "Initialize native loader before starting runtime" into nyc-dev
Dimitry Ivanov [Tue, 10 May 2016 20:09:37 +0000 (20:09 +0000)]
Merge "Initialize native loader before starting runtime" into nyc-dev

8 years agoBreak the debug cycle!
Aart Bik [Thu, 5 May 2016 22:10:42 +0000 (15:10 -0700)]
Break the debug cycle!

Rationale:
When entering the path that implements method invocation,
it is possible for the interpreter and JIT to cycle around
trying to interpret or compile a method, never making a
decision. This bug fix avoids such cycling with a minimum
of extra runtime overhead.

BUG=28537292

(cherry picked from commit 0122320f86ae004aa195d76814c52564d84ee632)

Change-Id: Ied47e0089a8c674a1504f1718f1a3a667863ada3

8 years agoMerge "Make all java.lang.reflect.Constructor methods handle proxies." into nyc-dev
Alex Light [Tue, 10 May 2016 19:51:28 +0000 (19:51 +0000)]
Merge "Make all java.lang.reflect.Constructor methods handle proxies." into nyc-dev
am: d43f57e748

* commit 'd43f57e748a3d81cc720a933cff816a160305f0c':
  Make all java.lang.reflect.Constructor methods handle proxies.

Change-Id: I234b0d6cc521ceddefc2e13063793516dbfca626

8 years agoMerge "Make all java.lang.reflect.Constructor methods handle proxies." into nyc-dev
Alex Light [Tue, 10 May 2016 19:44:40 +0000 (19:44 +0000)]
Merge "Make all java.lang.reflect.Constructor methods handle proxies." into nyc-dev

8 years agoFix issue with Constructor proxies.
Alex Light [Tue, 10 May 2016 18:50:13 +0000 (18:50 +0000)]
Fix issue with Constructor proxies.
am: 2f7c9d9613

* commit '2f7c9d9613978dc6b135b42b0e5e57f22b82cc9b':
  Fix issue with Constructor proxies.

Change-Id: I3e52ac890c63182306a9ba5b65371138a4011742

8 years agoInitialize native loader before starting runtime
Dimitry Ivanov [Mon, 9 May 2016 23:26:13 +0000 (16:26 -0700)]
Initialize native loader before starting runtime

Loading public libraries before everything else
to prevent situation when libssl.so gets into
libopenjdk.so load group which then prevented
from unloading by a global library referencing
the very same libssl.so

Bug: http://b/28449304
Change-Id: I3bbff3cc6926c2377ae5cb5b7b5b5d6e26ea4470
(cherry picked from commit c544f34bfed4273b38e5c3769c627e0c3e9c5d73)

8 years agoMake all java.lang.reflect.Constructor methods handle proxies.
Alex Light [Mon, 9 May 2016 23:25:11 +0000 (16:25 -0700)]
Make all java.lang.reflect.Constructor methods handle proxies.

Bug: 28676926
Change-Id: If5e7f1c886334ce0ea2e3e2b64616eddf69c9377
(cherry picked from commit 36a95bcf9de9f90b49eee6c18c9b3b57487d806a)

8 years agoFix issue with Constructor proxies.
Alex Light [Mon, 9 May 2016 22:31:18 +0000 (15:31 -0700)]
Fix issue with Constructor proxies.

Bug: 28659889
Change-Id: I4307916c79e7b56608c3ff5c9bbe83e175254f28
(cherry picked from commit 52c9da0925c67265bf353f5a66b7cb5541a88046)

8 years agoReduce memory usage of SSA Phi elimination and make it faster.
Vladimir Marko [Tue, 10 May 2016 15:23:37 +0000 (15:23 +0000)]
Reduce memory usage of SSA Phi elimination and make it faster.
am: 63347bbb6d

* commit '63347bbb6d25b762eaa67c67d78a019d28e94321':
  Reduce memory usage of SSA Phi elimination and make it faster.

Change-Id: Ic69aa062c0e985440a28d92cfafabbaa300ef847

8 years agoAttribute arena allocations previously marked as STL.
Vladimir Marko [Tue, 10 May 2016 15:23:37 +0000 (15:23 +0000)]
Attribute arena allocations previously marked as STL.
am: a26b3c51bf

* commit 'a26b3c51bfd97be1100d267f20c46535913e6bb7':
  Attribute arena allocations previously marked as STL.

Change-Id: I203dd4de987d1f689b610e9df0fa8a466bb4b992

8 years agoReduce memory usage of SSA Phi elimination and make it faster.
Vladimir Marko [Tue, 10 May 2016 12:31:23 +0000 (13:31 +0100)]
Reduce memory usage of SSA Phi elimination and make it faster.

Use an ArenaBitVector instead of an ArenaSet<> that leaks
its allocated memory on clear(). We were also erroneously
using the O(n) helper ContainsElement() for the ArenaSet<>
instead of the O(log n) ArenaSet<>::find() which made the
methods with large number of processed Phis also very slow
to compile in addition to the enormous memory usage.

Bug: 28684584

(cherry picked from commit c9ef168bfabd118d112a054dffe2c27d4d4db4fc)

Change-Id: I6115006259a9f697ea70e31d4478966fc601e24b

8 years agoAttribute arena allocations previously marked as STL.
Vladimir Marko [Mon, 9 May 2016 19:23:34 +0000 (20:23 +0100)]
Attribute arena allocations previously marked as STL.

Bug: 28603175
Bug: 28684584

(cherry picked from commit 3ea5a97d27468cec846d958c38d0d706ef7ec67e)

Change-Id: I7f1bd22e7710cca74f4b10fd13cb8fa2c3b1b318

8 years agoMerge "Fix ProtoId ordering check in DexFileVerifier." into nyc-dev
Vladimir Marko [Tue, 10 May 2016 13:34:13 +0000 (13:34 +0000)]
Merge "Fix ProtoId ordering check in DexFileVerifier." into nyc-dev
am: f11e547346

* commit 'f11e5473461d9f33d4427187fb945a1edcf2ef34':
  Fix ProtoId ordering check in DexFileVerifier.

Change-Id: Ice809c9f52019b6bc26ed8b374be5de098569a63

8 years agoMerge "Fix ProtoId ordering check in DexFileVerifier." into nyc-dev
Vladimir Marko [Tue, 10 May 2016 13:19:41 +0000 (13:19 +0000)]
Merge "Fix ProtoId ordering check in DexFileVerifier." into nyc-dev

8 years agoMerge "ART: Fix dominance for irreducible loops" into nyc-dev
David Brazdil [Tue, 10 May 2016 12:53:48 +0000 (12:53 +0000)]
Merge "ART: Fix dominance for irreducible loops" into nyc-dev
am: 74acb01900

* commit '74acb019008aea5d21f549ef412946611a03e706':
  ART: Fix dominance for irreducible loops

Change-Id: If4c96f7555b4371c6c652abdfd6cc983b743a64e

8 years agoMerge "ART: Fix dominance for irreducible loops" into nyc-dev
TreeHugger Robot [Tue, 10 May 2016 12:39:12 +0000 (12:39 +0000)]
Merge "ART: Fix dominance for irreducible loops" into nyc-dev

8 years agoART: Fix dominance for irreducible loops
David Brazdil [Fri, 6 May 2016 11:46:21 +0000 (12:46 +0100)]
ART: Fix dominance for irreducible loops

Computation of dominance was broken in the presence of irreducible
loops because the algorithm assumed that back edges are always
dominated by their respective headers and a fix-point iteration is
therefore unnecessary.

This is not true for irreducible loops, forcing us to revisit their
loop headers and all dependent blocks. This patch adds a fix-point
iteration if a back edge not dominated by its header is found.

Bug: 28611485
Change-Id: If84044e49d5b9c682949648033d2861628d7fe05
(cherry picked from commit 3f4a522cc39f5c651e7c718196e989bc81d8c6ef)

8 years agoMerge "Fix index checks for error strings in DexFileVerifier." into nyc-dev
Vladimir Marko [Tue, 10 May 2016 11:12:56 +0000 (11:12 +0000)]
Merge "Fix index checks for error strings in DexFileVerifier." into nyc-dev
am: 23fddf80cd

* commit '23fddf80cdfc51136ad7684d74961778e79be5bc':
  Fix index checks for error strings in DexFileVerifier.

Change-Id: I325bd9c6753216af30d08f59eab49c7a977bb17c

8 years agoFix ProtoId ordering check in DexFileVerifier.
Vladimir Marko [Tue, 3 May 2016 16:17:50 +0000 (17:17 +0100)]
Fix ProtoId ordering check in DexFileVerifier.

The code previously checked for kNoDexIndex16 as the type
list terminator. This is incorrect as we should not actually
see the kNoDexIndex16 in type lists in supported dex files.

To make sure that we don't see kNoDexIndex16, check the size
of the arrays with documented limits, i.e. type-ids and
proto-ids, see dex_file.h. In the ProtoId ordering check,
DCHECK() that we don't encounter kNoDexIndex16 and verify
that the previous list is not longer if the current list's
elements match.

Bug: 28580925

(cherry picked from commit 0ca8add2ae34c26291694ecc784d64f0cc1c1380)

Change-Id: Ied6dcbd8d04e3dfef5695dbd9b3a30a079038b2b

8 years agoMerge "Fix index checks for error strings in DexFileVerifier." into nyc-dev
Vladimir Marko [Tue, 10 May 2016 11:01:10 +0000 (11:01 +0000)]
Merge "Fix index checks for error strings in DexFileVerifier." into nyc-dev

8 years agoMerge "Optimizing: LoadString may not have any side effects." into nyc-dev
Vladimir Marko [Tue, 10 May 2016 10:59:23 +0000 (10:59 +0000)]
Merge "Optimizing: LoadString may not have any side effects." into nyc-dev
am: b7a459b8da

* commit 'b7a459b8da59c6cba29ce707a94f8804f741c169':
  Optimizing: LoadString may not have any side effects.

Change-Id: I83b3b9ad01c6c0eac775c11c3dd6914f65490b87

8 years agoMerge "Optimizing: LoadString may not have any side effects." into nyc-dev
Vladimir Marko [Tue, 10 May 2016 10:44:26 +0000 (10:44 +0000)]
Merge "Optimizing: LoadString may not have any side effects." into nyc-dev

8 years agoMerge "Relax the DCHECK in load store elimination." into nyc-dev
Nicolas Geoffray [Tue, 10 May 2016 09:38:08 +0000 (09:38 +0000)]
Merge "Relax the DCHECK in load store elimination." into nyc-dev
am: 6282080843

* commit '6282080843ce4a05e8d36056950016ff8f0da1a6':
  Relax the DCHECK in load store elimination.

Change-Id: Ie98662dac823b75c0adc2a984a2fdb61e349a223