OSDN Git Service

android-x86/art.git
9 years agoMerge "Move mirror::ArtMethod to native" into mnc-dev
Mathieu Chartier [Tue, 2 Jun 2015 16:44:43 +0000 (16:44 +0000)]
Merge "Move mirror::ArtMethod to native" into mnc-dev

9 years agoMove mirror::ArtMethod to native
Mathieu Chartier [Wed, 22 Apr 2015 20:56:20 +0000 (13:56 -0700)]
Move mirror::ArtMethod to native

Optimizing + quick tests are passing, devices boot.

TODO: Test and fix bugs in mips64.

Saves 16 bytes per most ArtMethod, 7.5MB reduction in system PSS.
Some of the savings are from removal of virtual methods and direct
methods object arrays.

Bug: 19264997

(cherry picked from commit e401d146407d61eeb99f8d6176b2ac13c4df1e33)

Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d

Fix some ArtMethod related bugs

Added root visiting for runtime methods, not currently required
since the GcRoots in these methods are null.

Added missing GetInterfaceMethodIfProxy in GetMethodLine, fixes
--trace run-tests 005, 044.

Fixed optimizing compiler bug where we used a normal stack location
instead of double on ARM64, this fixes the debuggable tests.

TODO: Fix JDWP tests.

Bug: 19264997

Change-Id: I7c55f69c61d1b45351fd0dc7185ffe5efad82bd3

ART: Fix casts for 64-bit pointers on 32-bit compiler.

Bug: 19264997
Change-Id: Ief45cdd4bae5a43fc8bfdfa7cf744e2c57529457

Fix JDWP tests after ArtMethod change

Fixes Throwable::GetStackDepth for exception event detection after
internal stack trace representation change.

Adds missing ArtMethod::GetInterfaceMethodIfProxy call in case of
proxy method.

Bug: 19264997
Change-Id: I363e293796848c3ec491c963813f62d868da44d2

Fix accidental IMT and root marking regression

Was always using the conflict trampoline. Also included fix for
regression in GC time caused by extra roots. Most of the regression
was IMT.

Fixed bug in DumpGcPerformanceInfo where we would get SIGABRT due to
detached thread.

EvaluateAndApplyChanges:
From ~2500 -> ~1980
GC time: 8.2s -> 7.2s due to 1s less of MarkConcurrentRoots

Bug: 19264997
Change-Id: I4333e80a8268c2ed1284f87f25b9f113d4f2c7e0

Fix bogus image test assert

Previously we were comparing the size of the non moving space to
size of the image file.

Now we properly compare the size of the image space against the size
of the image file.

Bug: 19264997
Change-Id: I7359f1f73ae3df60c5147245935a24431c04808a

[MIPS64] Fix art_quick_invoke_stub argument offsets.

ArtMethod reference's size got bigger, so we need to move other args
and leave enough space for ArtMethod* and 'this' pointer.

This fixes mips64 boot.

Bug: 19264997
Change-Id: I47198d5f39a4caab30b3b77479d5eedaad5006ab

9 years agoFix another source of undeterministic inlining.
Nicolas Geoffray [Tue, 2 Jun 2015 10:25:09 +0000 (11:25 +0100)]
Fix another source of undeterministic inlining.

Needing an environment and throwing might depend in which
caller first tries to inline. HLoadClass has such logic. Therefore,
do not cache the non-inlineable flag for those cases.

Does not apply to aosp, as this code has been removed.

bug:20037935

Change-Id: I5e3d36ffb832fb3c3f3c604c79cdbf4f37c749e1

9 years agoMerge "Fix another source of undeterministic inlining." into mnc-dev
Nicolas Geoffray [Mon, 1 Jun 2015 17:13:34 +0000 (17:13 +0000)]
Merge "Fix another source of undeterministic inlining." into mnc-dev

9 years agoMerge "ART: Fix wrong hard-failure handling in verifier" into mnc-dev
Andreas Gampe [Mon, 1 Jun 2015 15:28:37 +0000 (15:28 +0000)]
Merge "ART: Fix wrong hard-failure handling in verifier" into mnc-dev

9 years agoMerge changes I3eee8df3,I78cc01fb into mnc-dev
Andreas Gampe [Mon, 1 Jun 2015 15:23:43 +0000 (15:23 +0000)]
Merge changes I3eee8df3,I78cc01fb into mnc-dev

* changes:
  Fix test 115-native-bridge for Mips.
  ART: Add support for special handlers in sigchainlib

9 years agoMerge "ART: Use v2 version of NativeBridge struct" into mnc-dev
Andreas Gampe [Mon, 1 Jun 2015 15:23:39 +0000 (15:23 +0000)]
Merge "ART: Use v2 version of NativeBridge struct" into mnc-dev

9 years agoFix another source of undeterministic inlining.
Nicolas Geoffray [Wed, 27 May 2015 11:53:36 +0000 (12:53 +0100)]
Fix another source of undeterministic inlining.

bug:20037935

(cherry picked from commit 5ae1325048f3d2143f62735ed41acebf28ee6742)

Change-Id: I4bbec76988cfd3061084055c16d2d9ef46845f0a

9 years agoMerge "Make inlining deterministic." into mnc-dev
Nicolas Geoffray [Mon, 1 Jun 2015 07:58:14 +0000 (07:58 +0000)]
Merge "Make inlining deterministic." into mnc-dev

9 years agoFix test 115-native-bridge for Mips.
Douglas Leung [Sat, 30 May 2015 02:50:02 +0000 (19:50 -0700)]
Fix test 115-native-bridge for Mips.

(cherry picked from commit d0af5479d61013362e43ae15cb69c9f8da915e08)

Change-Id: I3eee8df39e774d233f11c43a5578f407bfdebca1

9 years agoART: Add support for special handlers in sigchainlib
Andreas Gampe [Sat, 23 May 2015 01:31:50 +0000 (18:31 -0700)]
ART: Add support for special handlers in sigchainlib

Add support for a special managed handler in sigchainlib that
will be called as the first user handler.

Use this support for native bridge v2. Extend test 115-native-bridge
to test the functionality.

Bug: 20217701

(cherry picked from commit 03c2cc89428914adf52229d6a3867eef6127911a)

Change-Id: I78cc01fbdabe169154ff6b94c9f3ddb95b5c7448

9 years agoART: Use v2 version of NativeBridge struct
Andreas Gampe [Thu, 21 May 2015 01:01:30 +0000 (18:01 -0700)]
ART: Use v2 version of NativeBridge struct

Update the struct to the new version, but without implementation.

Bug: 20217701

(cherry picked from commit 540cc3d49c858e670591d8c00fcd87576cdbede6)

Change-Id: Ic23a60b949f119c7d8b0e7cb27a61e6c16532a23

9 years agoAdd unstarted runtime test for String.<init>.
Jeff Hao [Fri, 29 May 2015 17:53:17 +0000 (10:53 -0700)]
Add unstarted runtime test for String.<init>.

Bug: 21173514
Change-Id: I369806644879fffc01bdc123d81a551e6eedf465

9 years agoFix double-exception in super-class method validation.
Vladimir Marko [Fri, 8 May 2015 11:26:59 +0000 (12:26 +0100)]
Fix double-exception in super-class method validation.

Bug: 19333589

(cherry picked from commit d5e5a0e61b5b1fe0aaa7edc25a08adebd5a92353)

Change-Id: If394a678ef6271c1119dac3f959773f23e789c56

9 years agoMerge "ART: Add Mips o32 callee-save registers to SaveAll frame" into mnc-dev
Andreas Gampe [Fri, 29 May 2015 00:49:39 +0000 (00:49 +0000)]
Merge "ART: Add Mips o32 callee-save registers to SaveAll frame" into mnc-dev

9 years agoART: Add Mips o32 callee-save registers to SaveAll frame
Andreas Gampe [Thu, 28 May 2015 01:31:42 +0000 (18:31 -0700)]
ART: Add Mips o32 callee-save registers to SaveAll frame

The floating point registers f20-f31 are callee-save in the Mips
ABI. While the managed code does not touch them, they need to be
saved when throwing an exception, so that they will be correctly
restored and not smashed.

Bug: 21266656

(cherry picked from commit a4e0e67611f54180694e0807d6599c1132269b6c)

Change-Id: Ia96d52ce7fb41bf604da1797ce4d7a703e292415

9 years agoAdd JNI String.<init> test for global and weak global refs.
Jeff Hao [Thu, 28 May 2015 21:32:07 +0000 (14:32 -0700)]
Add JNI String.<init> test for global and weak global refs.

Test for change:
https://googleplex-android-review.git.corp.google.com/#/c/698642/

Change-Id: I3e1182d42f9e24448d8616000de58ebfe1e50fb8

9 years agoFix single-step in native thread
Sebastien Hertz [Thu, 28 May 2015 09:00:57 +0000 (11:00 +0200)]
Fix single-step in native thread

If we attempt to single-step in a thread that is not running Java
code, there is no current method on the stack. So we need to check
for null before trying to decode debug info.

Bug: 21320157

(cherry picked from commit 52f5f93873ec244320e05b033243c5c7a3ae40e2)

Change-Id: I961108071dd58a23f6327370b00c35a4cabe0aa7

9 years agoMerge "Fix updating of JNI references for String.<init>." into mnc-dev
Jeff Hao [Thu, 28 May 2015 02:46:01 +0000 (02:46 +0000)]
Merge "Fix updating of JNI references for String.<init>." into mnc-dev

9 years agoFix updating of JNI references for String.<init>.
Jeff Hao [Thu, 28 May 2015 02:29:29 +0000 (19:29 -0700)]
Fix updating of JNI references for String.<init>.

Was missing updates to globals and weak globals.

Bug: 21288130
Bug: 21440428
Change-Id: I5f801f68b61f6b066b441b92ace367e6ba434789

9 years agoFix valgrind includes
Dmitriy Ivanov [Wed, 27 May 2015 22:34:38 +0000 (15:34 -0700)]
Fix valgrind includes

 external/valgrind structure has been changed
 to reflect upstream projects struture.

 Making corresponding changes to art includes.

Bug: http://b/21471495
Change-Id: I2434a270f88502528df82c4820afedb002b65b8d
(cherry picked from commit 6130f739d8f35e01037ba5c3ec5e5a1057900479)

9 years agoReset libc targetSdkVersion
Dmitriy Ivanov [Sat, 23 May 2015 01:03:34 +0000 (18:03 -0700)]
Reset libc targetSdkVersion

 This will let libc/linker know which sdk version
 is targeted by the app. This is needed to work around
 incorrect DT_NEEDED entries in old apps.

Bug: http://b/21364029
Change-Id: I2f2907104106aac6c8831381ca171dc0302e6a9d
(cherry picked from commit 15efde2badd80b8b124f8e1444165e4afbac17f0)

9 years agoART: Fix wrong hard-failure handling in verifier
Andreas Gampe [Tue, 26 May 2015 20:35:39 +0000 (13:35 -0700)]
ART: Fix wrong hard-failure handling in verifier

Correctly return null for the method when a hard failure is
encountered. Also improve logging for order failures. Add a
regression test.

Bug: 20224106
Change-Id: I6e08202617147378b204af169308b67fc69f92c6

9 years agoART: Use kBadFprBase on mips64 and arm64.
Vladimir Marko [Wed, 27 May 2015 13:07:08 +0000 (14:07 +0100)]
ART: Use kBadFprBase on mips64 and arm64.

Fix incorrect usage of kBadGprBase to avoid misleading and
ambiguous data in crash investigations.

Bug: 21266656

(cherry picked from commit 5b09ea0af468d9232cf725ac7f7e73c145892c5c)

Change-Id: Ia4fc60a5d61471c7a6c8fd0545a897ace43d90be

9 years agoAdd missing oatdump test dependency
Mathieu Chartier [Wed, 27 May 2015 02:48:16 +0000 (19:48 -0700)]
Add missing oatdump test dependency

(cherry picked from commit ea216b3abf96d4121a96e8fdab5ce97d7f4d1c2b)

Bug: 18000316
Change-Id: Ic828e8be8e5d3ef7e112facd0db57013740d449a

9 years agoAdd oatdump test
Mathieu Chartier [Tue, 26 May 2015 21:44:35 +0000 (14:44 -0700)]
Add oatdump test

(cherry picked from commit 19510f02b011e545665f6219e6144c8e47aed5f0)

Bug: 18000316

Change-Id: Ic22d63dc64a9b7a492b5e6bfbd4c75f30c35dfd5

9 years agoFix mac build: cast fpr callee save addresses.
Vladimir Marko [Tue, 26 May 2015 19:42:30 +0000 (20:42 +0100)]
Fix mac build: cast fpr callee save addresses.

Bring back reinterpret_cast<>s removed by
    https://android-review.googlesource.com/151309 .
They are needed for mac builds.

Bug : 13925192

(cherry picked from commit 0eb42511405f3919572a480a009426dfb776cfb5)

Change-Id: If6e0cdbadcc84a046abe03d7eca5cccd0a50d141

9 years agoFix mac build: include <sys/time.h> in time_utils.cc .
Vladimir Marko [Tue, 26 May 2015 18:57:30 +0000 (19:57 +0100)]
Fix mac build: include <sys/time.h> in time_utils.cc .

Required for gettimeofday(). Not needed in utils.cc .

Bug: 13925192

(cherry picked from commit ce39200492e2715a94d96fbd39fa42b46115c255)

Change-Id: If40694965b84605819cac11a7937821aa74db82b

9 years agoART: Clean up arm64 kNumberOfXRegisters usage.
Vladimir Marko [Tue, 19 May 2015 17:08:00 +0000 (18:08 +0100)]
ART: Clean up arm64 kNumberOfXRegisters usage.

Avoid undefined behavior for arm64 stemming from 1u << 32 in
loops with upper bound kNumberOfXRegisters.

Create iterators for enumerating bits in an integer either
from high to low or from low to high and use them for
<arch>Context::FillCalleeSaves() on all architectures.

Refactor runtime/utils.{h,cc} by moving all bit-fiddling
functions to runtime/base/bit_utils.{h,cc} (together with
the new bit iterators) and all time-related functions to
runtime/base/time_utils.{h,cc}. Improve test coverage and
fix some corner cases for the bit-fiddling functions.

Bug: 13925192

(cherry picked from commit 80afd02024d20e60b197d3adfbb43cc303cf29e0)

Change-Id: I905257a21de90b5860ebe1e39563758f721eab82

9 years agoJDWP: fix breakpoint on catch statement
Sebastien Hertz [Tue, 26 May 2015 09:53:39 +0000 (11:53 +0200)]
JDWP: fix breakpoint on catch statement

Setting a breakpoint on a catch statement in the source actually
installs the breakpoint on a DEX move-exception instruction. At this
point, an exception is pending in the current thread.

The issue is no exception must be pending in the current thread to
report the breakpoint event. This is required to be able to call JNI
functions to create JDWP ids.

This CL fixes it by clearing the pending exception before reporting
event and restore it after reporting the event.

Bug: 21382373

(cherry picked from commit de48aa6708a3d5dacf7db3d64965e23261fb15d3)

Change-Id: Ie107eb47b6f2559c4fa5297f4033e07baad06f38

9 years agoMake inlining deterministic.
Nicolas Geoffray [Tue, 26 May 2015 13:35:06 +0000 (14:35 +0100)]
Make inlining deterministic.

Only the case where two methods are not in the same dex
file could lead to undeterministic behavior.

bug:20037935

(cherry picked from commit ff199d84b02efe6cd7162a3c414db99240592454)

Change-Id: If1b0bff3a228be4caec9a068210b1d4d2a7bae1f

9 years agoMerge "Fix for potential moving GC bugs around proxy class." into mnc-dev
Hiroshi Yamauchi [Fri, 22 May 2015 22:32:42 +0000 (22:32 +0000)]
Merge "Fix for potential moving GC bugs around proxy class." into mnc-dev

9 years agoFix for potential moving GC bugs around proxy class.
Hiroshi Yamauchi [Thu, 21 May 2015 19:05:27 +0000 (12:05 -0700)]
Fix for potential moving GC bugs around proxy class.

- Handlerize proxy_class which is live across multiple allocation
  points in ClassLinker::CreateProxyClass().

- In ClassLinker::CreateProxyClass(), insert a proxy class into the
  class table before creating ArtFields for it (and update it later in
  LinkClass()) because the field roots (ArtField::declaring_class_)
  won't be updated by GC unless the class is in the class table. If GC
  happens before they are updated by FixupTemporaryDeclaringClass()
  from LinkClass(), FixupTemporaryDeclaringClass() may not update the
  field roots correctly because the old class may already be moved but
  the fields roots may not. Reduce a window of time where the fields
  roots could be stale.

- In ClassLinker::LinkClass(), directly wrap a new class in a handle
  to avoid a window of time where new_class may be potentially stale.

- Print more diagnostic info about the holder of the field upon a mark
  sweep invalid ref crash.

- Add an additional sanity check in Field::GetArtField().

Bug: 20557050

Change-Id: I9ad32d304922da96b7e1fad262d97de21cbac776

9 years agoMerge "ART: Sometimes even empty methods take forever to verify" into mnc-dev
Andreas Gampe [Thu, 21 May 2015 21:34:05 +0000 (21:34 +0000)]
Merge "ART: Sometimes even empty methods take forever to verify" into mnc-dev

9 years agoMerge "Revert "DO NOT MERGE ART: Turn off duplicate-classes checking"" into mnc-dev
Andreas Gampe [Thu, 21 May 2015 21:15:37 +0000 (21:15 +0000)]
Merge "Revert "DO NOT MERGE ART: Turn off duplicate-classes checking"" into mnc-dev

9 years agoART: Sometimes even empty methods take forever to verify
Andreas Gampe [Thu, 21 May 2015 21:06:46 +0000 (14:06 -0700)]
ART: Sometimes even empty methods take forever to verify

In cases of very high load and/or bad scheduling, the verifier may
take longer than the threshold duration to verify an empty method.
The LargeMethod detection needs to accept that the code_item may
be null.

Bug: 21364300
Change-Id: Iceff3e4688cc1a5fe7a836f7a9bf6c49a392b618

9 years agoRevert "DO NOT MERGE ART: Turn off duplicate-classes checking"
Andreas Gampe [Thu, 21 May 2015 20:33:40 +0000 (20:33 +0000)]
Revert "DO NOT MERGE ART: Turn off duplicate-classes checking"

This reverts commit aafcfca5fe545365ef377fff2897b8a908f03e71.

Bug: 21333911
Change-Id: Ibbc6b1be8bebc1d0ab9c5955b34eb89f40577baa

9 years agoART: Refactor UnstartedRuntime for testing
Andreas Gampe [Sat, 16 May 2015 02:24:12 +0000 (19:24 -0700)]
ART: Refactor UnstartedRuntime for testing

Expose the UnstartedRuntime implementation functions as private static
methods of a class. Add a gtest that can invoke these functions. Add
sample tests for String and Memory.

Bug: 21173514

(cherry picked from commit 799681b176ad25437ce2849639f54f610dcbf684)

Change-Id: Ib5bde6347fafaf7607c642542ea7d5938ff4b1df

9 years agoMerge "DO NOT MERGE ART: Turn off duplicate-classes checking" into mnc-dev
Andreas Gampe [Thu, 21 May 2015 15:49:28 +0000 (15:49 +0000)]
Merge "DO NOT MERGE ART: Turn off duplicate-classes checking" into mnc-dev

9 years agoMerge "Intercept JNI invocation of String.<init> methods." into mnc-dev
Jeff Hao [Thu, 21 May 2015 01:39:36 +0000 (01:39 +0000)]
Merge "Intercept JNI invocation of String.<init> methods." into mnc-dev

9 years agoIntercept JNI invocation of String.<init> methods.
Jeff Hao [Wed, 20 May 2015 03:30:23 +0000 (20:30 -0700)]
Intercept JNI invocation of String.<init> methods.

libmono uses JNI AllocObject and CallNonvirtualVoidMethod to create and
initialize a string instead of using the recommended NewObject. This
change adds an intercept to change the String.<init> call to a
StringFactory call instead. Then, it uses the object id of the original
string object referrer and maps it to the result of the StringFactory.

Bug: 21288130
Change-Id: Ib4db402c178bc37188d5c5faf30b6e4fdc747b17

9 years agoMerge "ART: Fix RegisterNative order" into mnc-dev
Andreas Gampe [Thu, 21 May 2015 01:15:36 +0000 (01:15 +0000)]
Merge "ART: Fix RegisterNative order" into mnc-dev

9 years agoART: Fix gtest dependency
Andreas Gampe [Wed, 20 May 2015 23:09:36 +0000 (16:09 -0700)]
ART: Fix gtest dependency

Gtests should depend on the debug version of libart-disassembler.

Bug: 21273194

(cherry picked from commit 0ae3bf872d3898ed6826216f3f8a04c819e1426b)

Change-Id: Iaf216a1c0cff650296ebf83fe4e8352f5614cb28

9 years agoMerge "Fix a cts crash around proxy class fields." into mnc-dev
Hiroshi Yamauchi [Wed, 20 May 2015 23:10:39 +0000 (23:10 +0000)]
Merge "Fix a cts crash around proxy class fields." into mnc-dev

9 years agoFix a cts crash around proxy class fields.
Hiroshi Yamauchi [Wed, 20 May 2015 22:51:29 +0000 (15:51 -0700)]
Fix a cts crash around proxy class fields.

org.apache.harmony.tests.java.io.SerializationStressTest4#test_writeObject_Proxy

As the static fields of proxy classes share the dex file indices, they
shouldn't be resolved in the dex cache or else Field::GetArtField()
may return a wrong art field that belong to a different proxy class.

Bug: 20557050

Change-Id: If672c0e67bc49e672e34d75ffbe29c65f5a423b9

9 years agoDO NOT MERGE ART: Turn off duplicate-classes checking
Andreas Gampe [Wed, 20 May 2015 21:48:10 +0000 (14:48 -0700)]
DO NOT MERGE ART: Turn off duplicate-classes checking

Bug: 21333911
Change-Id: I9832526a6d2996aadb459e3ec0930cbaf151478a

9 years agoART: Fix RegisterNative order
Andreas Gampe [Mon, 18 May 2015 22:52:22 +0000 (15:52 -0700)]
ART: Fix RegisterNative order

First check for both direct and virtual methods in the current class,
then move to the parent.

Optimize registration by checking first whether the current method
under test is native. This slows down registering implementations
in parent classes. Add a CheckJNI warning for this.

Add a run-test to check the behavior. Fix host comparison testing.

Bug: 19569721

(cherry picked from commit 3f1dc56914177993b1b018bf21ce7d39d7feecda)

Change-Id: I61e77117d96310632aad123d7f1279d0f834dc99

9 years agoMerge "Fix debuggable compiler flag detection for secondary dex files" into mnc-dev
Sebastien Hertz [Wed, 20 May 2015 06:55:21 +0000 (06:55 +0000)]
Merge "Fix debuggable compiler flag detection for secondary dex files" into mnc-dev

9 years agoART: Change huge-method warning in verifier
Andreas Gampe [Tue, 19 May 2015 03:50:12 +0000 (20:50 -0700)]
ART: Change huge-method warning in verifier

Change the logging to be included in the took-a-long-time warning,
instead of being a non-descriptive standalone. This should reduce
the noise.

Bug: 21149450

(cherry picked from commit a4f5bf6ea99d6b3095a4ca261352729633bc44c5)

Change-Id: Ia4493dd12f54a8452a46541f6da86530584016ea

9 years agoFix debuggable compiler flag detection for secondary dex files
Sebastien Hertz [Wed, 13 May 2015 10:14:05 +0000 (12:14 +0200)]
Fix debuggable compiler flag detection for secondary dex files

Compiles secondary dex files like the primary dex file: if it has
been compiled with the --debuggable flag, compile secondary dex files
with the --debuggable flag too.

Therefore, dex files loaded at runtime are compiled the same way as
dex files compiled at install time on the classpath (excluding the
boot image that is not compiled debuggable).

Also adds debuggable key in the oat header and bump the oat version.

Bug: 20944228

(cherry picked from commit 0de1133ba600f299b3d67938f650720d9f859eb2)

Change-Id: If6b2236e7fe547cc421f57b573043748018d3ae0

9 years agoMerge "Test and fix bug checking status of secondary multidex files." into mnc-dev
Richard Uhler [Mon, 18 May 2015 15:18:55 +0000 (15:18 +0000)]
Merge "Test and fix bug checking status of secondary multidex files." into mnc-dev

9 years agoTest and fix bug checking status of secondary multidex files.
Richard Uhler [Thu, 14 May 2015 20:21:13 +0000 (13:21 -0700)]
Test and fix bug checking status of secondary multidex files.

We were accidentally returning 'false' instead of 'true' to indicate a native
multidex file with an up-to-date primary dex file checksum but out-of-date
secondary dex file checksum is out of date.

Bug: 21022815
Change-Id: I43d360ca9251d0df38ad7f8289f6ef339c0a3280

9 years agoJDWP: more GC safety
Sebastien Hertz [Wed, 8 Apr 2015 07:36:07 +0000 (09:36 +0200)]
JDWP: more GC safety

Ensures GC safety when keeping references that may be moved by GC:
- SingleStepControl: stores ArtMethod* in a GcRoot
- ModBasket: stores references in a StackHandleScope

Bug: 18166750

(cherry picked from commit 261bc044a3575512869586593e99e97cd8b1c321)

Change-Id: I35971a901537956739d1f089d61cb4ea9dc6c93d

9 years agoMerge "Undo arm64 workaround." into mnc-dev
Chih-Hung Hsieh [Fri, 15 May 2015 23:09:19 +0000 (23:09 +0000)]
Merge "Undo arm64 workaround." into mnc-dev

9 years agoUndo arm64 workaround.
Chih-Hung Hsieh [Tue, 12 May 2015 19:06:57 +0000 (12:06 -0700)]
Undo arm64 workaround.

Now we have new llvm to compile art for arm64 without -fno-vectorize.
BUG: 21080674

Change-Id: Id1b3a88ab9d4cf78b7f0dfd8cb435ed6e7ab7cb2
(cherry picked from commit b6cee946d44dc1e961c9656830b567e38104f896)

9 years agoMerge "Print more info on mark sweep invalid ref crash." into mnc-dev
Hiroshi Yamauchi [Fri, 15 May 2015 22:47:18 +0000 (22:47 +0000)]
Merge "Print more info on mark sweep invalid ref crash." into mnc-dev

9 years agoPrint more info on mark sweep invalid ref crash.
Hiroshi Yamauchi [Fri, 15 May 2015 22:23:30 +0000 (15:23 -0700)]
Print more info on mark sweep invalid ref crash.

- Add extra info about the field holder.
- Suspend threads when verifying roots.

Bug: 20557050
Change-Id: Ia1f2269aaa3b1a81d0594e781e439a5decfb82f9

9 years agoAdd new style String operations during compilation init, part 2
Kenny Root [Thu, 14 May 2015 22:58:17 +0000 (15:58 -0700)]
Add new style String operations during compilation init, part 2

This allows some class initializers that deal with Strings to run during
compilation. However, java.lang.Character.toUpperCase() is blocking
initialization for some parts.

(cherry picked from commit 57f91e8956f4496391bff028a1b990540cc91c22)

Bug: 21036900
Change-Id: Ia969c6a643f510bc798f94fb10bca1a68fe2ae67

9 years agoStop wrapping close(2) with TEMP_FAILURE_RETRY in art.
Elliott Hughes [Fri, 15 May 2015 15:25:58 +0000 (08:25 -0700)]
Stop wrapping close(2) with TEMP_FAILURE_RETRY in art.

Note that all the TEMP_FAILURE_RETRY([A-Z] calls in this file are
wrong. The member functions return -errno, so only an EPERM failure
will return -1 (but errno should be EPERM, so you won't loop).

Bug: http://b/20501816
Change-Id: Ibde6a2c7bf92469d008d6d510f9391669ae37a84
(cherry picked from commit 6a887d6a1d1ca089b48663a5ae11f973b98785a9)

9 years agoMerge "In hprof, use an address within string for char array of empty string." into...
Jeff Hao [Fri, 15 May 2015 00:56:57 +0000 (00:56 +0000)]
Merge "In hprof, use an address within string for char array of empty string." into mnc-dev

9 years agoMerge changes I2ea008b7,Ibd7a643d into mnc-dev
Kenny Root [Fri, 15 May 2015 00:26:26 +0000 (00:26 +0000)]
Merge changes I2ea008b7,Ibd7a643d into mnc-dev

* changes:
  Add new style String operations during compilation init
  Fix non-range String init calls

9 years agoIn hprof, use an address within string for char array of empty string.
Jeff Hao [Fri, 15 May 2015 00:19:15 +0000 (17:19 -0700)]
In hprof, use an address within string for char array of empty string.

Bug: 21089461
Change-Id: I203345caf74fba2e9bf0549256147d84d1bb829e

9 years agoAdd new style String operations during compilation init
Kenny Root [Thu, 14 May 2015 22:58:17 +0000 (15:58 -0700)]
Add new style String operations during compilation init

This allows some class initializers that deal with Strings to run during
compilation. This includes the current implementation of
java.security.Security because it reads the "java.security" resource.

Bug: 21036900
Change-Id: I2ea008b774d4ed359e155318e0d06c1566186c34

9 years agoFix non-range String init calls
Kenny Root [Thu, 14 May 2015 23:48:22 +0000 (16:48 -0700)]
Fix non-range String init calls

When the String constructor was called via invoke-direct, it is changed
to the new StringFactory which is static. That means that the args need
to be shifted by one to deal with the change from non-static to static.
However, the non-range version of the invoke-direct was not shifted
correctly causing unstarted runtime initialization to get the wrong
first_dest_reg argument.

Bug: 21036900
Change-Id: Ibd7a643d877514ea396d7e4ab0dea327207cb78f

9 years agoRemove doublequoted command to adb sh -c.
Hiroshi Yamauchi [Thu, 14 May 2015 20:42:06 +0000 (13:42 -0700)]
Remove doublequoted command to adb sh -c.

(cherry pick commit 0a4c61db049f7ddcd9cbebb54e67a1285d621da9)

Change-Id: I0e0fceedf927df25b8d6b0cf235f43f928cb3534

9 years agoMerge "In hprof, set string class instance size to that of an empty string." into...
Jeff Hao [Thu, 14 May 2015 21:49:08 +0000 (21:49 +0000)]
Merge "In hprof, set string class instance size to that of an empty string." into mnc-dev

9 years agoIn hprof, set string class instance size to that of an empty string.
Jeff Hao [Wed, 13 May 2015 01:58:32 +0000 (18:58 -0700)]
In hprof, set string class instance size to that of an empty string.

Bug: 21066704
Change-Id: Ic52193f5801117ca642055ea700fc4bc21b690e8

9 years agoPrint field info on mark sweep invalid ref crash.
Hiroshi Yamauchi [Thu, 14 May 2015 04:14:22 +0000 (21:14 -0700)]
Print field info on mark sweep invalid ref crash.

(cherry pick commit eb2baaf20d9059c0fc38141780ec05bea0486c40)

Bug: 20557050
Change-Id: I3abb7a44e3b7ed3256653824fd1705aac5f7d72c

9 years agoQuick: Fix marking high words in DCE.
Vladimir Marko [Thu, 14 May 2015 10:47:39 +0000 (11:47 +0100)]
Quick: Fix marking high words in DCE.

This CL properly fixes the high word marking and reverts
    https://android-review.googlesource.com/150352
which was just covering up the underlying issue. A unit test
for the encountered issue is provided, though it does not
expose the deficiency in the cover-up CL.

Bug: 20640451

(cherry picked from commit 9cacef6e811940c2f21e7e54055379a2c43f0d06)

Change-Id: I4c4ca82fe4b2e34feb38090d88a5d5c754914f89

9 years agoART: Do not relocate app program headers in patchoat.
Vladimir Marko [Wed, 13 May 2015 18:06:30 +0000 (19:06 +0100)]
ART: Do not relocate app program headers in patchoat.

Change the check whether to relocate program headers in
patchoat to simply look whether there is a PT_LOAD section
with p_vaddr == 0. If there is, don't relocate the headers,
it should be an app. Otherwise, it's a boot image and needs
to be relocated.

Add overflow checking to ElfFileImpl<>::GetLoadedSize().

Bug: 21047854

(cherry picked from commit 3fc9903407c6e89ffbbc92ded9e272d9de58e9b6)

Change-Id: Ib3e1295fc06993bcfbaadd8f253ee4f5498f52e9

9 years agoAlso print class for NoSuchFieldException
Mathieu Chartier [Wed, 13 May 2015 20:13:24 +0000 (13:13 -0700)]
Also print class for NoSuchFieldException

Example message:
Caused by: java.lang.NoSuchFieldException: No field value in class Ljava/lang/String;

Added test.

Bug: 20881251

Change-Id: I4043cbf26c3077952b6c151da0d0edd980da26b1

9 years agoART: Rediscover loops after deleting blocks in DCE
David Brazdil [Thu, 7 May 2015 08:59:30 +0000 (09:59 +0100)]
ART: Rediscover loops after deleting blocks in DCE

The way DCE currently updates loop information does not cover all
cases. This patch removes the logic, resets loop information of live
blocks to pre-SSA state and reanalyzes the affected loops.

Change-Id: I0b996a70235b95a8db0de9a23a03f71db57a21b8
(cherry picked from commit a4b8c21dae70ae34aee13628632c39a675c06022)

9 years agoMerge "ART: arm indexOf intrinsics for the optimizing compiler" into mnc-dev
Andreas Gampe [Tue, 12 May 2015 23:11:41 +0000 (23:11 +0000)]
Merge "ART: arm indexOf intrinsics for the optimizing compiler" into mnc-dev

9 years agoMerge "Hold heap bitmap lock in Heap::GetObjectsAllocated" into mnc-dev
Mathieu Chartier [Tue, 12 May 2015 21:58:54 +0000 (21:58 +0000)]
Merge "Hold heap bitmap lock in Heap::GetObjectsAllocated" into mnc-dev

9 years agoQuick: Fix DCE, clear high word flag in RemoveChange().
Vladimir Marko [Tue, 12 May 2015 21:27:21 +0000 (22:27 +0100)]
Quick: Fix DCE, clear high word flag in RemoveChange().

Bug: 20640451

(cherry picked from commit ade58e14582c6ab81978e9cfcbbf5e54cc23fe18)

Change-Id: I8ac7fea3d9d2a434ee79fb917e68a4dc96e5482f

9 years agoMerge "Add notes about fast JNI calls." into mnc-dev
Hiroshi Yamauchi [Tue, 12 May 2015 21:37:35 +0000 (21:37 +0000)]
Merge "Add notes about fast JNI calls." into mnc-dev

9 years agoAdd notes about fast JNI calls.
Hiroshi Yamauchi [Tue, 12 May 2015 21:21:34 +0000 (14:21 -0700)]
Add notes about fast JNI calls.

(cherry pick commit 36bce58f01a6b37e4d07ff9544c03a3238be087f)

Bug: 19665903
Change-Id: I7cc37ab572d2e9ff86f6388c80a3c453a2bca046

9 years agoMerge "Fix bug in removal of *.flock files." into mnc-dev
Richard Uhler [Tue, 12 May 2015 21:21:20 +0000 (21:21 +0000)]
Merge "Fix bug in removal of *.flock files." into mnc-dev

9 years agoHold heap bitmap lock in Heap::GetObjectsAllocated
Mathieu Chartier [Tue, 12 May 2015 17:47:11 +0000 (10:47 -0700)]
Hold heap bitmap lock in Heap::GetObjectsAllocated

Fixes a race condition where add and remove space could cause a crash
when we iterated over the spaces.

TODO: Add a spaces lock or something to guard against this.

Bug: 21031927

Change-Id: I7f0d558316f8e9d9f22ffd182e8666355bf50d47

9 years agoFix bug in removal of *.flock files.
Richard Uhler [Thu, 7 May 2015 17:19:35 +0000 (10:19 -0700)]
Fix bug in removal of *.flock files.

Bug: 20816098
(cherry picked from commit 581f4e9065b9b7f788315d3ea1a45e51ae168589)

Change-Id: Ib7bd394a9dd0299f09d386ae010972b461217550

9 years agoART: arm indexOf intrinsics for the optimizing compiler
Andreas Gampe [Fri, 8 May 2015 05:31:55 +0000 (22:31 -0700)]
ART: arm indexOf intrinsics for the optimizing compiler

Add intrinsics implementations for indexOf in the optimizing
compiler. These are mostly ported from Quick.

Bug: 20889065

(cherry picked from commit ba6fdbcb764d5a8972f5ff2d7147e4d78226b347)

Change-Id: I18ee849d41187a381f99529669e6f97040aaacf6

9 years agoQuick: Fix DCE to mark wide register overlaps correctly.
Vladimir Marko [Tue, 12 May 2015 17:27:20 +0000 (18:27 +0100)]
Quick: Fix DCE to mark wide register overlaps correctly.

Previously we missed some cases of overlap with registers
coming from previous blocks.

Bug: 20640451

(cherry picked from commit 83d46ef1eaa8fdecadfdb9564d80e50b42646c37)

Change-Id: I1be879edfbc900b70cee411d9e31e5a4b524530a

9 years agoAdd test for String init called from unresolvable class.
Jeff Hao [Tue, 12 May 2015 01:39:28 +0000 (18:39 -0700)]
Add test for String init called from unresolvable class.

Bug: 20971268
Change-Id: I0cb027f5e29667e9d522eb01a6b966cd69abb104

9 years agoMerge art project from goog/master into goog/mnc-dev.
Jeff Hao [Mon, 11 May 2015 20:38:14 +0000 (13:38 -0700)]
Merge art project from goog/master into goog/mnc-dev.

9 years agoam d0d3b974: am 1774ca95: am bdd9f2d8: Merge "Remove unused StackHandleScope"
Sebastien Hertz [Mon, 11 May 2015 19:36:17 +0000 (19:36 +0000)]
am d0d3b974: am 1774ca95: am bdd9f2d8: Merge "Remove unused StackHandleScope"

* commit 'd0d3b974998111ee4b0c6692590f6b05a765bacc':
  Remove unused StackHandleScope

9 years agoam 1774ca95: am bdd9f2d8: Merge "Remove unused StackHandleScope"
Sebastien Hertz [Mon, 11 May 2015 19:20:12 +0000 (19:20 +0000)]
am 1774ca95: am bdd9f2d8: Merge "Remove unused StackHandleScope"

* commit '1774ca95e2cae05eeb312567a68dd93eaf792acb':
  Remove unused StackHandleScope

9 years agoam bdd9f2d8: Merge "Remove unused StackHandleScope"
Sebastien Hertz [Mon, 11 May 2015 19:08:27 +0000 (19:08 +0000)]
am bdd9f2d8: Merge "Remove unused StackHandleScope"

* commit 'bdd9f2d870099e326a281ac90993b37b999c35ea':
  Remove unused StackHandleScope

9 years agoMerge "Remove unused StackHandleScope"
Sebastien Hertz [Mon, 11 May 2015 18:58:31 +0000 (18:58 +0000)]
Merge "Remove unused StackHandleScope"

9 years agoam f3713fbe: am cbfc2b94: am 1d316ada: Merge "Insert a read barrier in the JNI bridge."
Hiroshi Yamauchi [Mon, 11 May 2015 18:38:22 +0000 (18:38 +0000)]
am f3713fbe: am cbfc2b94: am 1d316ada: Merge "Insert a read barrier in the JNI bridge."

* commit 'f3713fbe906c9aa1196382602cb870ae3f3e12d7':
  Insert a read barrier in the JNI bridge.

9 years agoam cbfc2b94: am 1d316ada: Merge "Insert a read barrier in the JNI bridge."
Hiroshi Yamauchi [Mon, 11 May 2015 18:26:37 +0000 (18:26 +0000)]
am cbfc2b94: am 1d316ada: Merge "Insert a read barrier in the JNI bridge."

* commit 'cbfc2b9443e4d18948d5bbd054b5dd3569d8943c':
  Insert a read barrier in the JNI bridge.

9 years agoam a34ea222: am 1ed3ab7c: am bd0cfef5: Merge "Fix typo in VLOG message."
Richard Uhler [Mon, 11 May 2015 18:14:15 +0000 (18:14 +0000)]
am a34ea222: am 1ed3ab7c: am bd0cfef5: Merge "Fix typo in VLOG message."

* commit 'a34ea222385996d9b6c6e057bad3ca7dae79cfba':
  Fix typo in VLOG message.

9 years agoam c6c4b52d: am fa389ffa: am c55efc73: Merge "Add more diagnostics info to flaky...
Richard Uhler [Mon, 11 May 2015 18:14:14 +0000 (18:14 +0000)]
am c6c4b52d: am fa389ffa: am c55efc73: Merge "Add more diagnostics info to flaky oat file assistant test."

* commit 'c6c4b52dfa8d4883338e922cd7200062d3e5c735':
  Add more diagnostics info to flaky oat file assistant test.

9 years agoam a57a8f86: am 2f8a04dc: am 9dfba720: Merge "ART: x86 indexOf intrinsics for the...
Andreas Gampe [Mon, 11 May 2015 18:14:13 +0000 (18:14 +0000)]
am a57a8f86: am 2f8a04dc: am 9dfba720: Merge "ART: x86 indexOf intrinsics for the optimizing compiler"

* commit 'a57a8f86c9f6c5c3667df7d87e0ee49ef184fd61':
  ART: x86 indexOf intrinsics for the optimizing compiler

9 years agoam 1d316ada: Merge "Insert a read barrier in the JNI bridge."
Hiroshi Yamauchi [Mon, 11 May 2015 18:13:39 +0000 (18:13 +0000)]
am 1d316ada: Merge "Insert a read barrier in the JNI bridge."

* commit '1d316adafda81cb2f30e210d3d108b97c7c11f15':
  Insert a read barrier in the JNI bridge.

9 years agoMerge "Insert a read barrier in the JNI bridge."
Hiroshi Yamauchi [Mon, 11 May 2015 18:04:09 +0000 (18:04 +0000)]
Merge "Insert a read barrier in the JNI bridge."

9 years agoam 1ed3ab7c: am bd0cfef5: Merge "Fix typo in VLOG message."
Richard Uhler [Mon, 11 May 2015 18:00:14 +0000 (18:00 +0000)]
am 1ed3ab7c: am bd0cfef5: Merge "Fix typo in VLOG message."

* commit '1ed3ab7c07ff2ff281ae8bc960ce31bba37f8d67':
  Fix typo in VLOG message.

9 years agoam fa389ffa: am c55efc73: Merge "Add more diagnostics info to flaky oat file assistan...
Richard Uhler [Mon, 11 May 2015 18:00:13 +0000 (18:00 +0000)]
am fa389ffa: am c55efc73: Merge "Add more diagnostics info to flaky oat file assistant test."

* commit 'fa389ffa36e0c6ad74b5f01adce733e502efc992':
  Add more diagnostics info to flaky oat file assistant test.

9 years agoam 2f8a04dc: am 9dfba720: Merge "ART: x86 indexOf intrinsics for the optimizing compiler"
Andreas Gampe [Mon, 11 May 2015 18:00:11 +0000 (18:00 +0000)]
am 2f8a04dc: am 9dfba720: Merge "ART: x86 indexOf intrinsics for the optimizing compiler"

* commit '2f8a04dca06c417c6c8cd4eb74025aba1d49020b':
  ART: x86 indexOf intrinsics for the optimizing compiler

9 years agoam bd0cfef5: Merge "Fix typo in VLOG message."
Richard Uhler [Mon, 11 May 2015 17:52:44 +0000 (17:52 +0000)]
am bd0cfef5: Merge "Fix typo in VLOG message."

* commit 'bd0cfef567012fa6c75243d9157ddceaab7cdaac':
  Fix typo in VLOG message.

9 years agoam c55efc73: Merge "Add more diagnostics info to flaky oat file assistant test."
Richard Uhler [Mon, 11 May 2015 17:52:42 +0000 (17:52 +0000)]
am c55efc73: Merge "Add more diagnostics info to flaky oat file assistant test."

* commit 'c55efc7335e35f6731b04afc3a1db838c086beb3':
  Add more diagnostics info to flaky oat file assistant test.