OSDN Git Service

android-x86/art.git
7 years agoMerge "ART: Make graph visualizer thread-safe"
Treehugger Robot [Fri, 28 Oct 2016 15:14:14 +0000 (15:14 +0000)]
Merge "ART: Make graph visualizer thread-safe"

7 years agoART: Make graph visualizer thread-safe
Andreas Gampe [Thu, 27 Oct 2016 19:04:57 +0000 (12:04 -0700)]
ART: Make graph visualizer thread-safe

Store visualizer to a temporary string stream during compilation.
Print to the final output on destruction, and do so under a lock.

Note: the order of methods in the output is only guaranteed to be
      deterministic with single-threaded compilation (-j1).

Test: m
Test: Compile multithread
Test: Check output file that begin_compilation and end_compilation
      are interleaved
Test: Check that names of compiled methods match

Change-Id: I7eb3be2f88333cf1f116fe71b77cffa1ac702208

7 years agoMerge "Remove default argument values in GenerateGcRootFieldLoad."
Roland Levillain [Fri, 28 Oct 2016 14:15:10 +0000 (14:15 +0000)]
Merge "Remove default argument values in GenerateGcRootFieldLoad."

7 years agoMerge "Use CLREX in ARM/ARM64 CAS intrinsic Baker read barrier slow paths."
Roland Levillain [Fri, 28 Oct 2016 13:18:47 +0000 (13:18 +0000)]
Merge "Use CLREX in ARM/ARM64 CAS intrinsic Baker read barrier slow paths."

7 years agoMerge "method_verifier_test: Allow soft verifier failures for java/lang/invoke.*"
Narayan Kamath [Fri, 28 Oct 2016 11:50:47 +0000 (11:50 +0000)]
Merge "method_verifier_test: Allow soft verifier failures for java/lang/invoke.*"

7 years agomethod_verifier_test: Allow soft verifier failures for java/lang/invoke.*
Narayan Kamath [Fri, 28 Oct 2016 09:57:41 +0000 (10:57 +0100)]
method_verifier_test: Allow soft verifier failures for java/lang/invoke.*

Classes in this package might use experimental opcodes.

Bug: 32496585
Bug: 30550796
Test: make test-art-host
Change-Id: Ibf1ea78b090fff065b792f00afa143182ef195d4

7 years agoMerge "class_linker: Change allocation of MethodType dex_cache entries."
Narayan Kamath [Fri, 28 Oct 2016 11:49:26 +0000 (11:49 +0000)]
Merge "class_linker: Change allocation of MethodType dex_cache entries."

7 years agoclass_linker: Change allocation of MethodType dex_cache entries.
Narayan Kamath [Fri, 28 Oct 2016 09:19:54 +0000 (10:19 +0100)]
class_linker: Change allocation of MethodType dex_cache entries.

We allocate them regardless of the value of the runtime flag to
avoid needing changes to the compiler etc. The memory hit can be
mitigated in production systems that don't use MethodHandles by
setting kDexCacheMethodTypeCacheSize to 0.

Also, add DCHECKS in the interpreter to make sure the runtime
never executes an invoke-polymorphic instruction when method handles
are disabled.

Test: make test-art-host
Bug: 30550796
Change-Id: Id4b2065d99dc13625a51037b7d1a9f0ac5ff6121

7 years agoMerge "Add support for Baker read barriers in UnsafeCASObject intrinsics."
Roland Levillain [Fri, 28 Oct 2016 10:09:33 +0000 (10:09 +0000)]
Merge "Add support for Baker read barriers in UnsafeCASObject intrinsics."

7 years agoMerge "compiler_driver: loosen DCHECK for java/lang/invoke classes."
Narayan Kamath [Fri, 28 Oct 2016 08:54:59 +0000 (08:54 +0000)]
Merge "compiler_driver: loosen DCHECK for java/lang/invoke classes."

7 years agocompiler_driver: loosen DCHECK for java/lang/invoke classes.
Narayan Kamath [Thu, 27 Oct 2016 10:47:30 +0000 (11:47 +0100)]
compiler_driver: loosen DCHECK for java/lang/invoke classes.

Verifier support for invoke-polymorphic hasn't been implemented
yet, so boot classpath classes that use it will not be verified
at compile time. This change will be reverted once verifier support
is implemented.

This change is a hack.

Test: make test-art-host
Bug: 32496585
Bug: 30550796

Change-Id: Id8fcb3fd0d5ddd09f1c80f751a5f96364b137855

7 years agoMerge "ART: Add missing PrettyCause"
Treehugger Robot [Thu, 27 Oct 2016 21:02:22 +0000 (21:02 +0000)]
Merge "ART: Add missing PrettyCause"

7 years agoMerge "ART: Blacklist test 908 for GC_STRESS"
Treehugger Robot [Thu, 27 Oct 2016 20:45:19 +0000 (20:45 +0000)]
Merge "ART: Blacklist test 908 for GC_STRESS"

7 years agoMerge "ART: Add function to retrieve all tagged objects"
Treehugger Robot [Thu, 27 Oct 2016 20:29:26 +0000 (20:29 +0000)]
Merge "ART: Add function to retrieve all tagged objects"

7 years agoART: Blacklist test 908 for GC_STRESS
Andreas Gampe [Thu, 27 Oct 2016 19:03:13 +0000 (12:03 -0700)]
ART: Blacklist test 908 for GC_STRESS

The test "measures" GC invocations and expects stable deterministic
behavior that cannot be guaranteed with a small heap.

Bug: 31684633
Test: m ART_TEST_GC_STRESS=true test-art-host
Change-Id: Id40f42e34b373643802e393fce7741eef549fb4b

7 years agoART: Add missing PrettyCause
Andreas Gampe [Thu, 27 Oct 2016 18:50:18 +0000 (11:50 -0700)]
ART: Add missing PrettyCause

Add missing name. Refactor so that build breaks next time anyone
forgets adding this.

Bug: 31385027
Test: m test-art-host
Change-Id: I7f5a510b56829aa39e8ca6bcff11c3e9eee95000

7 years agoRemove default argument values in GenerateGcRootFieldLoad.
Roland Levillain [Thu, 27 Oct 2016 17:02:48 +0000 (18:02 +0100)]
Remove default argument values in GenerateGcRootFieldLoad.

These values were never or rarely used.

Test: mmma art (with and without `ART_USE_READ_BARRIER=true`)
Bug: 12687968
Bug: 29516974
Change-Id: I5d15140ce501bf50d7a87871b1e492cee54913db

7 years agoMerge "Remove H[Reverse]PostOrderIterator and HInsertionOrderIterator."
Vladimir Marko [Thu, 27 Oct 2016 15:44:54 +0000 (15:44 +0000)]
Merge "Remove H[Reverse]PostOrderIterator and HInsertionOrderIterator."

7 years agoMerge "Remove some unneeded header includes"
David Sehr [Thu, 27 Oct 2016 15:24:06 +0000 (15:24 +0000)]
Merge "Remove some unneeded header includes"

7 years agoMerge "ARM: VIXL32: Exclude recently added test that fails."
Treehugger Robot [Thu, 27 Oct 2016 15:07:31 +0000 (15:07 +0000)]
Merge "ARM: VIXL32: Exclude recently added test that fails."

7 years agoRemove H[Reverse]PostOrderIterator and HInsertionOrderIterator.
Vladimir Marko [Tue, 25 Oct 2016 15:54:12 +0000 (16:54 +0100)]
Remove H[Reverse]PostOrderIterator and HInsertionOrderIterator.

Use range-based loops instead, introducing helper functions
ReverseRange() for iteration in reverse order in containers.
When the contents of the underlying container change inside
the loop, use an index-based loop that better exposes the
container data modifications, compared to the old iterator
interface that's hiding it which may lead to subtle bugs.

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

7 years agoMerge "ARM: VIXL32: Pass test 406-fields and a few others."
Roland Levillain [Thu, 27 Oct 2016 12:55:18 +0000 (12:55 +0000)]
Merge "ARM: VIXL32: Pass test 406-fields and a few others."

7 years agoARM: VIXL32: Exclude recently added test that fails.
Artem Serov [Wed, 26 Oct 2016 09:31:59 +0000 (10:31 +0100)]
ARM: VIXL32: Exclude recently added test that fails.

Test: export ART_USE_VIXL_ARM_BACKEND=true && \
      mma test-art-host dist && \
      mma test-art-target dist

Change-Id: I49b28c7bfbe178bf11f0c4b3e61e0372317ae215

7 years agoMerge "MethodHandles: Remove reference to Jack 4.11.BETA from build rule."
Benoit Lamarche [Thu, 27 Oct 2016 10:51:25 +0000 (10:51 +0000)]
Merge "MethodHandles: Remove reference to Jack 4.11.BETA from build rule."

7 years agoUse CLREX in ARM/ARM64 CAS intrinsic Baker read barrier slow paths.
Roland Levillain [Wed, 26 Oct 2016 12:10:46 +0000 (13:10 +0100)]
Use CLREX in ARM/ARM64 CAS intrinsic Baker read barrier slow paths.

Follow clang's implementation, which uses CLREX in
compare-and-exchange operations on the failure path, i.e.
when the value read by the LDREX (ARM) or LDXR (ARM64)
instruction is not the expected value, in order to release
the monitor.  The previous implementation was perfectly
correct, but this one may improve performance on some
micro-architectures.

This change only affects the
art::arm::ReadBarrierMarkAndUpdateFieldSlowPathARM and
art::arm64::ReadBarrierMarkAndUpdateFieldSlowPathARM64 slow
paths.

Test: make test-art-target-run-test-004-UnsafeTest
Bug: 29516905
Bug: 12687968
Change-Id: I99edd1ae6489dcec4a0089bfef52736114c6cd48

7 years agoMethodHandles: Remove reference to Jack 4.11.BETA from build rule.
Narayan Kamath [Thu, 27 Oct 2016 08:45:58 +0000 (09:45 +0100)]
MethodHandles: Remove reference to Jack 4.11.BETA from build rule.

It is no longer necessary, since the default Jack can handle
invoke-polymorphic now.

Test: make test-art-host

Change-Id: I0439fe1729c2204627408c1975b9c8b965328397

7 years agoMerge "Add handle wrapper for interpreter iget/iput quick"
Treehugger Robot [Thu, 27 Oct 2016 08:08:35 +0000 (08:08 +0000)]
Merge "Add handle wrapper for interpreter iget/iput quick"

7 years agoAdd handle wrapper for interpreter iget/iput quick
Mathieu Chartier [Thu, 27 Oct 2016 05:57:02 +0000 (22:57 -0700)]
Add handle wrapper for interpreter iget/iput quick

JDWP has thread suspension in instrumentation listeners. The fix is
to use handle wrappers here. This change fixes JDWP tests.

Bug: 31113334

Test: art/tools/run-jdwp-tests.sh '--mode=host' '--variant=X64' --debug

Change-Id: Ic7dcb1201ec44946e8002547b2f7f5645b4dea48

7 years agoMerge "Add handle wrapper for DoCallCommon"
Mathieu Chartier [Thu, 27 Oct 2016 06:18:10 +0000 (06:18 +0000)]
Merge "Add handle wrapper for DoCallCommon"

7 years agoAdd handle wrapper for DoCallCommon
Mathieu Chartier [Thu, 27 Oct 2016 04:04:58 +0000 (21:04 -0700)]
Add handle wrapper for DoCallCommon

Prevents potential moving GC bugs from thread suspension caused
by GetTypeItem. Fixes build-art.

Bug: 31113334

Test: clean-oat-host && build-art && test-art-host

Change-Id: I9ef18b1d1dab61cc86a7468d535972eba51763f5

7 years agoMerge "Move interpreter to ObjPtr"
Mathieu Chartier [Thu, 27 Oct 2016 01:07:05 +0000 (01:07 +0000)]
Merge "Move interpreter to ObjPtr"

7 years agoMerge "Fix bad auto merge conflict resolution in CC"
Mathieu Chartier [Thu, 27 Oct 2016 00:57:32 +0000 (00:57 +0000)]
Merge "Fix bad auto merge conflict resolution in CC"

7 years agoFix bad auto merge conflict resolution in CC
Mathieu Chartier [Wed, 26 Oct 2016 23:46:46 +0000 (16:46 -0700)]
Fix bad auto merge conflict resolution in CC

We should not be clearing the region space since:
https://android-review.googlesource.com/#/c/294708/

Bug: 12687968

Test: test-art-host CC baker
Change-Id: I78050c61c8cdcc0b777d3324ba3f7ded80b2cf52

7 years agoRemove some unneeded header includes
David Sehr [Wed, 26 Oct 2016 23:09:13 +0000 (16:09 -0700)]
Remove some unneeded header includes

Bug: none
Test: Builds still work
Change-Id: I6c83326cc12aa0e7825312b238f5e0ae694ccffc

7 years agoMove interpreter to ObjPtr
Mathieu Chartier [Tue, 25 Oct 2016 22:08:01 +0000 (15:08 -0700)]
Move interpreter to ObjPtr

Moved most of interpreter, interpreter_common,
interpreter_switch_impl, and some of mterp to ObjPtr.

Bug: 31113334

Test: test-art-host ART_TEST_INTERPRETER=true
Test: art/tools/run-libcore-tests.sh '--mode=host' '--variant=X32' --debug

Change-Id: I0935d18287e1332205c17c5a018aa167788ab897

7 years agoMerge "Avoid unnecessarily clearing/resetting region_space_ for each GC."
Hiroshi Yamauchi [Wed, 26 Oct 2016 21:27:59 +0000 (21:27 +0000)]
Merge "Avoid unnecessarily clearing/resetting region_space_ for each GC."

7 years agoMerge "Fix build on XCode 8 w/OSX 10.12 SDK"
Treehugger Robot [Wed, 26 Oct 2016 19:29:14 +0000 (19:29 +0000)]
Merge "Fix build on XCode 8 w/OSX 10.12 SDK"

7 years agoMerge "Add mode bits to open() with O_CREAT."
Treehugger Robot [Wed, 26 Oct 2016 19:04:14 +0000 (19:04 +0000)]
Merge "Add mode bits to open() with O_CREAT."

7 years agoMerge "Blacklist 130-hprof for tracing configs."
Hiroshi Yamauchi [Wed, 26 Oct 2016 18:54:23 +0000 (18:54 +0000)]
Merge "Blacklist 130-hprof for tracing configs."

7 years agoMerge "Always call into native loader when loading a native library"
Dimitry Ivanov [Wed, 26 Oct 2016 18:27:37 +0000 (18:27 +0000)]
Merge "Always call into native loader when loading a native library"

7 years agoMerge "Improved induction variable analysis and loop optimizations."
Aart Bik [Wed, 26 Oct 2016 18:08:09 +0000 (18:08 +0000)]
Merge "Improved induction variable analysis and loop optimizations."

7 years agoMerge "Reduce file descriptor limit for 151-OpenFileLimit."
Treehugger Robot [Wed, 26 Oct 2016 17:43:38 +0000 (17:43 +0000)]
Merge "Reduce file descriptor limit for 151-OpenFileLimit."

7 years agoMerge "ART: Change InstructionSetFeatures to return unique_ptr"
Treehugger Robot [Wed, 26 Oct 2016 17:30:26 +0000 (17:30 +0000)]
Merge "ART: Change InstructionSetFeatures to return unique_ptr"

7 years agoMerge "ARM: VIXL32: Implement more codegen code to pass a few more tests."
Roland Levillain [Wed, 26 Oct 2016 17:20:34 +0000 (17:20 +0000)]
Merge "ARM: VIXL32: Implement more codegen code to pass a few more tests."

7 years agoFix build on XCode 8 w/OSX 10.12 SDK
Dan Willemsen [Wed, 26 Oct 2016 17:13:15 +0000 (10:13 -0700)]
Fix build on XCode 8 w/OSX 10.12 SDK

CLOCK_REALTIME (along with clock_gettime and friends) are now defined,
so the build fails with a redefinition error.

Test: m checkbuild (w/XCode 8 on 10.11 with 10.12 SDK)
Change-Id: Ic8a5cc872ded1766597fda5f098d0e044cd063ee

7 years agoMerge "Forgot these files from previous VerifierDeps change."
Nicolas Geoffray [Wed, 26 Oct 2016 15:56:42 +0000 (15:56 +0000)]
Merge "Forgot these files from previous VerifierDeps change."

7 years agoForgot these files from previous VerifierDeps change.
Nicolas Geoffray [Wed, 26 Oct 2016 15:55:18 +0000 (16:55 +0100)]
Forgot these files from previous VerifierDeps change.

https://android-review.googlesource.com/#/c/294326/ was missing
these files.

bug: 30937355
test: m test-art-host
test: verifier_deps_test.cc
Change-Id: Ic17ee6c70d17e998a2835415a6e7b25a2473ac37

7 years agoART: Change InstructionSetFeatures to return unique_ptr
Andreas Gampe [Tue, 6 Jan 2015 23:17:07 +0000 (15:17 -0800)]
ART: Change InstructionSetFeatures to return unique_ptr

This makes clear the ownership of the object.

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

7 years agoReduce file descriptor limit for 151-OpenFileLimit.
Richard Uhler [Wed, 26 Oct 2016 15:33:31 +0000 (16:33 +0100)]
Reduce file descriptor limit for 151-OpenFileLimit.

Under the assumption it is failing on host in some cases because it
takes too long to reach the limit. This change reduces the time it
takes to run the test from 50s down to 2s.

Test: time ./test/run-test --host --prebuild --interpreter --relocate --runtime-option -Xcheck:jni --64 151-OpenFileLimit
Bug: 32302133
Change-Id: I833e3a7aa2164a3cee2744f8e8c7e02365844aa0

7 years agoMerge "Save the non-verified classes in the VerifierDeps."
Nicolas Geoffray [Wed, 26 Oct 2016 14:24:43 +0000 (14:24 +0000)]
Merge "Save the non-verified classes in the VerifierDeps."

7 years agoAdd support for Baker read barriers in UnsafeCASObject intrinsics.
Roland Levillain [Wed, 26 Oct 2016 12:03:38 +0000 (13:03 +0100)]
Add support for Baker read barriers in UnsafeCASObject intrinsics.

Prior to doing the compare-and-swap operation, ensure the
expected reference stored in the holding object's field is
in the to-space by loading it, emitting a read barrier and
updating that field with a strong compare-and-set operation
with relaxed memory synchronization ordering (if needed).

Test: ART host and target tests and Nexus 5X boot test with Baker read barriers.
Bug: 29516905
Bug: 12687968
Change-Id: I480f6a9b59547f11d0a04777406b9bfeb905bfd2

7 years agoSave the non-verified classes in the VerifierDeps.
Nicolas Geoffray [Tue, 25 Oct 2016 16:20:18 +0000 (17:20 +0100)]
Save the non-verified classes in the VerifierDeps.

We will need that information when taking an OTA to make sure
the same set of classes needs to be verified at runtime.

Currently, the vdex file will contain a list of unverified
classes. We could alternatively encode a bit vector of the size
of the type_id array, but the few experiments I did show that
the bit vector is actually larger. We can refine this later.

bug: 30937355
test: m test-art-host
test: verifier_deps_test.cc

Change-Id: I2670e4fd2e54ee7a148246baa705fda3a56617ff

7 years agoMerge "Reduce number of physical pages used for DexCache's arrays"
Treehugger Robot [Wed, 26 Oct 2016 10:44:23 +0000 (10:44 +0000)]
Merge "Reduce number of physical pages used for DexCache's arrays"

7 years agoMerge "Interpreter: Add support for method handle transforms [Part 1]."
Treehugger Robot [Wed, 26 Oct 2016 10:35:53 +0000 (10:35 +0000)]
Merge "Interpreter: Add support for method handle transforms [Part 1]."

7 years agoMerge "Fall back to true anonymous mmap if out of file descriptors."
Treehugger Robot [Wed, 26 Oct 2016 08:59:38 +0000 (08:59 +0000)]
Merge "Fall back to true anonymous mmap if out of file descriptors."

7 years agoInterpreter: Add support for method handle transforms [Part 1].
Narayan Kamath [Wed, 19 Oct 2016 10:05:04 +0000 (11:05 +0100)]
Interpreter: Add support for method handle transforms [Part 1].

Method handle transformations are implemented in Java by
subclasses of java.lang.invoke.Transformers.Transformer. Transformer
extends MethodHandle and provides a transformer method defined like so:

public static class TransformerImpl extends Transformer {
    @Override
    public void transform(EmulatedStackFrame emulatedStackFrame) throws Throwable {
    }
}

An EmulatedStackFrame is synthesized by the runtime based on the
caller stack frame and arguments specified by the instruction. It will
contain all input arguments to the method their associated types. It
will also exactly match the method type specified by the target handle
(i.e, argument coversions are performed by the runtime).

The transformer method operates on supplied EmulatedStackFrame
and other instance state to synthesize the transformation. In some
cases, these transformations will end up calling other signature
polymorphic methods. In those cases, the transformer can construct
an EmulatedStackFrame and issue the invoke passing that through as
the single input argument. For e.g,

  EmulatedStackFrame sf = EmulatedStackFrame.newInstance();
  sf.pushArgument("foo", String.class);
  sf.pushIntArgument(42);

  // The callsite type for this polymorphic invoke is
  // (Ldalvik/system/EmulatedStackFrame)V;
  delegate.invoke(sf);

The runtime will treat such polymorphic invokes specially and unmarshal
this EmulatedStackFrame on to the callee stack frame based on the type
and number of arguments contained in the EmulatedStackFrame and the
declared type of the target method handle.

In this change :

Adds the basic plumbing for transformer invokes. In particular, the code
for marshaling and unmarshaling emulated stack frames isn't implemented
and will be added in a follow up method. This plumbing is sufficient to
implement a test case of a method handle transform that doesn't need any
input arguments, so is trivially implementable without proper
EmulatedStackFrame support.

bug: 30550796
Test: make test-art-host
Change-Id: Iafa29accaef26d0a33f8b83713bed5d929df547e

7 years agoMerge "Remove unused std::ostringstream variable."
Treehugger Robot [Wed, 26 Oct 2016 08:46:20 +0000 (08:46 +0000)]
Merge "Remove unused std::ostringstream variable."

7 years agoMerge "ART: Refactor class-linker methods"
Treehugger Robot [Wed, 26 Oct 2016 00:21:33 +0000 (00:21 +0000)]
Merge "ART: Refactor class-linker methods"

7 years agoART: Add function to retrieve all tagged objects
Andreas Gampe [Tue, 25 Oct 2016 19:05:53 +0000 (12:05 -0700)]
ART: Add function to retrieve all tagged objects

Add functionality to retrieve all tagged objects. Add an allocator
that uses Allocate and Deallocate to optimize.

Amend test 903.

Bug: 31385027
Test: m test-art-host
Change-Id: Ibce79ddea33da0bb1354c41852e1d8cb63fff958

7 years agoMerge "ART: Initialize field in IndirectReferenceTable"
Treehugger Robot [Tue, 25 Oct 2016 21:38:53 +0000 (21:38 +0000)]
Merge "ART: Initialize field in IndirectReferenceTable"

7 years agoAdd mode bits to open() with O_CREAT.
George Burgess IV [Tue, 25 Oct 2016 20:08:17 +0000 (13:08 -0700)]
Add mode bits to open() with O_CREAT.

If you call open() with O_CREAT, you need to pass a third argument to
open; see http://man7.org/linux/man-pages/man2/open.2.html .

We're trying to (re-)introduce checks that will turn open calls like
these into compile-time errors, but in order to do that, we need to
clean up all existing instances of this kind of code.

Bug: None.
Test: Still builds. m test-art-host-gtest-profile_assistant_test passes.
Change-Id: Ia754999a30cfc01c0826c69687b33c09884aea6d

7 years agoMerge "Fix race with LOS Begin() and End()"
Mathieu Chartier [Tue, 25 Oct 2016 21:28:53 +0000 (21:28 +0000)]
Merge "Fix race with LOS Begin() and End()"

7 years agoMerge "Enable agent attaching during live phase"
Leonard Mosescu [Tue, 25 Oct 2016 19:49:26 +0000 (19:49 +0000)]
Merge "Enable agent attaching during live phase"

7 years agoEnable agent attaching during live phase
Leonard Mosescu [Fri, 7 Oct 2016 00:26:36 +0000 (17:26 -0700)]
Enable agent attaching during live phase

This is the ART part, the plumbing from VMDebug_attachAgent() to
actually loading the agent into the runtime.

Test: m test-art-host

Bug: 31682382

Change-Id: I3ccc67aa050c1f78278882128983686ed44ddec2

7 years agoMerge "Revert "ART: Temporarily use global references for GetLoadedClasses""
Treehugger Robot [Tue, 25 Oct 2016 19:03:11 +0000 (19:03 +0000)]
Merge "Revert "ART: Temporarily use global references for GetLoadedClasses""

7 years agoART: Initialize field in IndirectReferenceTable
Andreas Gampe [Tue, 25 Oct 2016 19:01:48 +0000 (12:01 -0700)]
ART: Initialize field in IndirectReferenceTable

Initialize last known previous segment state.

Bug: 32125344
Test: m test-art-host
Test: m valgrind-test-art-host
Change-Id: I894f467a9f1dae8de55c1e113f0b00a127b13f33

7 years agoAvoid unnecessarily clearing/resetting region_space_ for each GC.
Hiroshi Yamauchi [Tue, 25 Oct 2016 18:55:10 +0000 (11:55 -0700)]
Avoid unnecessarily clearing/resetting region_space_ for each GC.

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

7 years agoFix race with LOS Begin() and End()
Mathieu Chartier [Tue, 25 Oct 2016 17:45:08 +0000 (10:45 -0700)]
Fix race with LOS Begin() and End()

There was a race for the first large object allocation that cause
callers of Begin() and End() to see a null End() and non-null
Begin(). The fix is to hold the lock and get both Begin() and End().

Bug: 32387879

Test: test-art-host CC

Change-Id: I6173bf3a55d3ba017ffa5b5e9f566025c65b7555

7 years agoART: Refactor class-linker methods
Andreas Gampe [Tue, 2 Dec 2014 23:43:52 +0000 (15:43 -0800)]
ART: Refactor class-linker methods

Hide the LookupClass with hash version. Clients should not have to
know about that performance detail.

Hide FindClassInPathClassLoader. This is an implementation detail.

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

7 years agoMerge "Clear (madvise) card table for CC"
Mathieu Chartier [Tue, 25 Oct 2016 17:36:53 +0000 (17:36 +0000)]
Merge "Clear (madvise) card table for CC"

7 years agoRevert "ART: Temporarily use global references for GetLoadedClasses"
Andreas Gampe [Tue, 25 Oct 2016 16:55:53 +0000 (09:55 -0700)]
Revert "ART: Temporarily use global references for GetLoadedClasses"

This reverts commit d2d0353de9e5c10f2a4a9ff2102d2b777c134a37.

The IndirectReferenceTable now allows resizing for local references.

Bug: 31684578
Bug: 32125344
Test: m test-art-host
Change-Id: I47dab19eb7ae66fc7d55d202a13a87f508c35e03

7 years agoMerge "Remove workaround for repo."
Treehugger Robot [Tue, 25 Oct 2016 16:53:55 +0000 (16:53 +0000)]
Merge "Remove workaround for repo."

7 years agoMerge "Let dexdump prompt filename for zipped multi-dex files."
Aart Bik [Tue, 25 Oct 2016 15:56:10 +0000 (15:56 +0000)]
Merge "Let dexdump prompt filename for zipped multi-dex files."

7 years agoMerge "Fix the Thumb-2 definition of the CLREX instruction."
Roland Levillain [Tue, 25 Oct 2016 15:45:43 +0000 (15:45 +0000)]
Merge "Fix the Thumb-2 definition of the CLREX instruction."

7 years agoReduce number of physical pages used for DexCache's arrays
Artem Udovichenko [Fri, 9 Sep 2016 11:02:25 +0000 (14:02 +0300)]
Reduce number of physical pages used for DexCache's arrays

This commit reduces the amount of physical pages allocated for the .bss
section of an application's oat file.
Many of elements in the application's DexCache arrays are empty.
But during coping content of the DexCaches arrays from
the app's art file into the .bss section all pages become dirty.
The commit fixes that by copying non null elements only. So pages
in the .bss section that contains zeroes remains untouched.
This approach allows to save 209Kb of memory after one minute of
GMaps use.
This number is the difference between the size of .bss section and
the Rss value from the /proc/<pid>/smaps file.

Test: run test-art-host

Change-Id: I3d7bed0805b95b5f344303581274ca8e8e69940e

7 years agoMerge changes Iae3a933e,I08ff5d6e
Andreas Gampe [Tue, 25 Oct 2016 15:18:14 +0000 (15:18 +0000)]
Merge changes Iae3a933e,I08ff5d6e

* changes:
  ART: Make IndirectReferenceTable resizable
  ART: Change IndirectReferenceTable

7 years agoMerge "ART: Clean up IndirectReferenceTable"
Andreas Gampe [Tue, 25 Oct 2016 15:16:31 +0000 (15:16 +0000)]
Merge "ART: Clean up IndirectReferenceTable"

7 years agoMerge "Clean up app image .bss dex cache arrays fixup."
Vladimir Marko [Tue, 25 Oct 2016 14:51:57 +0000 (14:51 +0000)]
Merge "Clean up app image .bss dex cache arrays fixup."

7 years agoFix the Thumb-2 definition of the CLREX instruction.
Roland Levillain [Mon, 24 Oct 2016 15:31:16 +0000 (16:31 +0100)]
Fix the Thumb-2 definition of the CLREX instruction.

Test: make test-art-host-gtest-assembler_thumb2_test
Change-Id: I433fa35451aa944e300d5d582dc16b2b9a8bcfb3

7 years agoMerge "Build target which faciliates ART testing image/image creation"
Calin Juravle [Tue, 25 Oct 2016 14:36:15 +0000 (14:36 +0000)]
Merge "Build target which faciliates ART testing image/image creation"

7 years agoMerge "Clear OOME from DexCache allocation when another thread succeeded."
Vladimir Marko [Tue, 25 Oct 2016 14:07:31 +0000 (14:07 +0000)]
Merge "Clear OOME from DexCache allocation when another thread succeeded."

7 years agoBuild target which faciliates ART testing image/image creation
Calin Juravle [Mon, 24 Oct 2016 11:40:19 +0000 (12:40 +0100)]
Build target which faciliates ART testing image/image creation

Bug: 32365426

Test: m art-job-images
Change-Id: I19f74b7880e8b88c20fcd26729ec05a48b618dbb

7 years agoMerge "Revert "Disable kBssEntry LoadString sharpening.""
Vladimir Marko [Tue, 25 Oct 2016 12:32:27 +0000 (12:32 +0000)]
Merge "Revert "Disable kBssEntry LoadString sharpening.""

7 years agoClean up app image .bss dex cache arrays fixup.
Vladimir Marko [Tue, 25 Oct 2016 10:51:35 +0000 (11:51 +0100)]
Clean up app image .bss dex cache arrays fixup.

Do not store type and method array forwarding address
in old arrays. They are available from the DexCache.

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

7 years agoClear OOME from DexCache allocation when another thread succeeded.
Vladimir Marko [Tue, 25 Oct 2016 12:04:00 +0000 (13:04 +0100)]
Clear OOME from DexCache allocation when another thread succeeded.

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

7 years agoARM: VIXL32: Pass test 406-fields and a few others.
Alexandre Rames [Mon, 17 Oct 2016 13:57:13 +0000 (14:57 +0100)]
ARM: VIXL32: Pass test 406-fields and a few others.

This patch focuses on passing test `406-fields`. Other tests pass as well:
* 017-float
* 018-stack-overflow
* 041-narrowing
* 302-float-conversion
* 406-fields
* 414-optimizing-arith-sub
* 419-long-parameter
* 429-ssa-builder
* 439-swap-double
* 440-stmp
* 477-long-2-float-convers-precision
* 551-implicit-null-checks
* 565-checker-condition-liveness
* 583-checker-zero
* 703-floating-point-div
* 705-register-conflict

Test: export ART_USE_VIXL_ARM_BACKEND=true && \
      mma test-art-host dist && \
      mma test-art-target dist

Change-Id: Id203d45436c8fd869550e44e2591b4a2dff74795

7 years agoMerge "method_handles: Minor refactor of PerformArgumentConversions."
Narayan Kamath [Tue, 25 Oct 2016 11:36:16 +0000 (11:36 +0000)]
Merge "method_handles: Minor refactor of PerformArgumentConversions."

7 years agoRemove workaround for repo.
Nicolas Geoffray [Tue, 25 Oct 2016 11:00:19 +0000 (12:00 +0100)]
Remove workaround for repo.

The chromium buildbots do not have the issue anymore.

Change-Id: I9f9cf4505dda027fb23883f3f4b311d213b15199

7 years agoRevert "Disable kBssEntry LoadString sharpening."
Vladimir Marko [Mon, 24 Oct 2016 16:53:39 +0000 (16:53 +0000)]
Revert "Disable kBssEntry LoadString sharpening."

Fix .bss GC root walking by registering the oat file
with the class loader's class table.

Also fix potentially outdated ObjPtr<> use in debug build.

This reverts commit b55fdbb30b3bc4e334c241153b98c0a6ea4a4a2b.

Test: m test-art-host
Bug: 32124939
Change-Id: I0b7e3b93cb53c7b22408aa10a04eaf5582c69ee8

7 years agoRemove unused std::ostringstream variable.
Richard Uhler [Tue, 25 Oct 2016 07:52:31 +0000 (08:52 +0100)]
Remove unused std::ostringstream variable.

Test: m build-art-host
Change-Id: I44b6aab9192c2b1d01cc35bcfd029e3cf52e0d2d

7 years agoFall back to true anonymous mmap if out of file descriptors.
Richard Uhler [Mon, 24 Oct 2016 14:54:44 +0000 (15:54 +0100)]
Fall back to true anonymous mmap if out of file descriptors.

MemMap::MapAnonymous needs a file descriptor to create an ashmem
region to label otherwise anonymous mmaps for debugging purposes. If
the process has no file descriptors available, fall back to
traditional anonymous mmap rather than failing.

Test: m test-art-host, m test-art-target
Bug: 32013594
Bug: 32302133
Change-Id: I6b2c770fc031eb8d429407f3a0e7408c52cb1985

7 years agoMerge "Encode quickening info in .vdex."
Nicolas Geoffray [Tue, 25 Oct 2016 07:27:07 +0000 (07:27 +0000)]
Merge "Encode quickening info in .vdex."

7 years agoART: Make IndirectReferenceTable resizable
Andreas Gampe [Tue, 25 Oct 2016 02:35:19 +0000 (19:35 -0700)]
ART: Make IndirectReferenceTable resizable

Allow backing table to be resized. This can be used for the local
reference table, where synchronization is not an issue.

Bug: 32125344
Test: m test-art-host
Change-Id: Iae3a933e330026231b17fdde44bcdd99c235dff1

7 years agoClear (madvise) card table for CC
Mathieu Chartier [Mon, 24 Oct 2016 22:45:41 +0000 (15:45 -0700)]
Clear (madvise) card table for CC

Since the cards are not really used, we can madvise them to reduce
RAM. Image and zygote cards are cleared in pause to prevent races
between with mutators.

Pause time goes up by only 1.5us on N6P maps:
(Paused)ClearCards: Sum: 755us 99% C.I. 0.250us-28us Avg: 1.540us Max: 28us

AOSP N6P before (60s after boot system wide CC):
4,194K: .GC
4,172K: .GC
4,110K: .GC

After:
3,253K: .GC
3,205K: .GC
3,245K: .GC

Bug: 12687968

Test: test-art-host

Change-Id: I3194b5b8044c2dca427302c32d9974920fecb289

7 years agoART: Change IndirectReferenceTable
Andreas Gampe [Fri, 14 Oct 2016 00:12:56 +0000 (17:12 -0700)]
ART: Change IndirectReferenceTable

Change cookie structure to allow for more entries. Use a local
hole-count caching scheme. The design is driven by two
considerations. For one, the change is small and mostly local.
The other point is to still allow inlining of functions involved
with JNI transitions.

This change is in preparation for a resizable backing table for
"unlimite" local references.

micro_native tests show changes are in the noise.

Bug: 32125344
Test: m test-art-host
Change-Id: I08ff5d6eaed75d13ec88f469fb0d18328a0eeb70

7 years agoART: Clean up IndirectReferenceTable
Andreas Gampe [Mon, 24 Oct 2016 20:19:37 +0000 (13:19 -0700)]
ART: Clean up IndirectReferenceTable

Introduce constants and move some functions into the
IndirectReferenceTable class.

Slightly change IndirectRef encoding to be more obvious (and slighly
more optimized when decoding).

Bug: 32125344
Test: m test-art-host
Change-Id: I05819eccb733b611de582fb8d7151f1a110c305a

7 years agoBlacklist 130-hprof for tracing configs.
Hiroshi Yamauchi [Tue, 25 Oct 2016 00:10:12 +0000 (17:10 -0700)]
Blacklist 130-hprof for tracing configs.

Due to flakiness on art-tracing and art-interpreter-tracing.

Bug: 32383962
Test: test-art-host with ART_TEST_TRACE=true.
Change-Id: I7280c14ec7ce2bd4d5e5a599b4c42762baa07e13

7 years agoLet dexdump prompt filename for zipped multi-dex files.
Aart Bik [Mon, 24 Oct 2016 23:07:59 +0000 (16:07 -0700)]
Let dexdump prompt filename for zipped multi-dex files.

Test: test-art-host-dexdump test-art-host-gtest-dexdump_test

Bug:32365197
Change-Id: I25a274da93cd3317fd5b18ad578ac4dcad1b83a1

7 years agoMerge "ART: Blacklist test 908 for target"
Andreas Gampe [Mon, 24 Oct 2016 23:14:47 +0000 (23:14 +0000)]
Merge "ART: Blacklist test 908 for target"

7 years agoART: Blacklist test 908 for target
Andreas Gampe [Mon, 24 Oct 2016 22:50:49 +0000 (15:50 -0700)]
ART: Blacklist test 908 for target

As usual, black-list an agent test for the target.

Bug: 31684633
Test: m test-art-host-run-test-908-gc-start-finish
Change-Id: I0c246f7af7942ae098dc1d6829b34562ec4222e5