OSDN Git Service

android-x86/art.git
9 years agoMerge "Fix art_quick_instrumentation_exit stub for x86_64"
Sebastien Hertz [Thu, 12 Mar 2015 14:30:08 +0000 (14:30 +0000)]
Merge "Fix art_quick_instrumentation_exit stub for x86_64"

9 years agoFix art_quick_instrumentation_exit stub for x86_64
Sebastien Hertz [Thu, 12 Mar 2015 14:10:50 +0000 (15:10 +0100)]
Fix art_quick_instrumentation_exit stub for x86_64

Restores callee-saved registers.

Bug: 19708384
Change-Id: I1cb47b1cc616af613816c4ee041bdfc975bf9f20

9 years agoMerge "Run the natural loop recognizer before building SSA."
Nicolas Geoffray [Thu, 12 Mar 2015 11:35:29 +0000 (11:35 +0000)]
Merge "Run the natural loop recognizer before building SSA."

9 years agoRun the natural loop recognizer before building SSA.
Nicolas Geoffray [Thu, 12 Mar 2015 11:16:23 +0000 (11:16 +0000)]
Run the natural loop recognizer before building SSA.

SSA building checks the consistency of the graph when dealing
with dead phis.

Fixes continuous AOSP builds with optimizing.

Change-Id: Ia9a0f0adc24a8e144e54444e090ad828b9b40040

9 years agoMerge "Revert "Opt Compiler: Materialise constants that cannot be encoded""
Nicolas Geoffray [Thu, 12 Mar 2015 11:06:25 +0000 (11:06 +0000)]
Merge "Revert "Opt Compiler: Materialise constants that cannot be encoded""

9 years agoRevert "Opt Compiler: Materialise constants that cannot be encoded"
Nicolas Geoffray [Thu, 12 Mar 2015 11:06:03 +0000 (11:06 +0000)]
Revert "Opt Compiler: Materialise constants that cannot be encoded"

Fails building the core image.

This reverts commit 758c2f65805564e0c51cccaacf8307e52a9e312b.

Change-Id: Ic3ebd8a08a3d17a513d820035b430f6de4125866

9 years agoMerge "Give an expected type to phis created for multiple returns."
Nicolas Geoffray [Thu, 12 Mar 2015 11:01:55 +0000 (11:01 +0000)]
Merge "Give an expected type to phis created for multiple returns."

9 years agoGive an expected type to phis created for multiple returns.
Nicolas Geoffray [Thu, 12 Mar 2015 10:34:11 +0000 (10:34 +0000)]
Give an expected type to phis created for multiple returns.

When inlining, we used to take the type of the inlined method
for the phi in case of multiple returns. I recently changed the
logic of phi types to only be of int/float/double/ref, so we
need to call ToPhiType when creating the phi.

Change-Id: I960067ca8a8814509c2a7c52c08387d892ebf4a3

9 years agoMerge "Opt Compiler: Materialise constants that cannot be encoded"
Nicolas Geoffray [Thu, 12 Mar 2015 10:52:05 +0000 (10:52 +0000)]
Merge "Opt Compiler: Materialise constants that cannot be encoded"

9 years agoMerge "ART: Check that boot image classes are verified"
Andreas Gampe [Thu, 12 Mar 2015 01:41:32 +0000 (01:41 +0000)]
Merge "ART: Check that boot image classes are verified"

9 years agoMerge "Rosalloc thread local allocation path without a cas."
Hiroshi Yamauchi [Wed, 11 Mar 2015 23:32:57 +0000 (23:32 +0000)]
Merge "Rosalloc thread local allocation path without a cas."

9 years agoRosalloc thread local allocation path without a cas.
Hiroshi Yamauchi [Mon, 9 Mar 2015 18:57:48 +0000 (11:57 -0700)]
Rosalloc thread local allocation path without a cas.

Speedup on N4:
MemAllocTest 3044 -> 2396 (~21% reduction)
BinaryTrees  4101 -> 2929 (~26% reduction)

Bug: 9986565
Change-Id: Ia1d1a37b9e001f903c3c056e8ec68fc8c623a78b

9 years agoMerge "Properly compile multidex for tests when using Jack."
Richard Uhler [Wed, 11 Mar 2015 21:12:42 +0000 (21:12 +0000)]
Merge "Properly compile multidex for tests when using Jack."

9 years agoMerge "ART: Fix finalizable class in Unstarted Runtime"
Andreas Gampe [Wed, 11 Mar 2015 21:10:12 +0000 (21:10 +0000)]
Merge "ART: Fix finalizable class in Unstarted Runtime"

9 years agoART: Fix finalizable class in Unstarted Runtime
Andreas Gampe [Wed, 11 Mar 2015 20:24:35 +0000 (13:24 -0700)]
ART: Fix finalizable class in Unstarted Runtime

Add a finalizable check for emulation of Class.newInstance, as this
is not allowed in transactional mode.

Change-Id: I9633929bf484ac8807b97209ab4b422c320b04da

9 years agoMerge "ART: Fix AbortTransaction in Unstarted Runtime"
Andreas Gampe [Wed, 11 Mar 2015 20:07:37 +0000 (20:07 +0000)]
Merge "ART: Fix AbortTransaction in Unstarted Runtime"

9 years agoART: Fix AbortTransaction in Unstarted Runtime
Andreas Gampe [Wed, 11 Mar 2015 19:44:47 +0000 (12:44 -0700)]
ART: Fix AbortTransaction in Unstarted Runtime

Can only call AbortTransaction if in a transaction. Should log
something else otherwise and fail.

Change-Id: I31ea3558c38fb6284ee6cacd1eafe01910e0965e

9 years agoMerge "Fix incompatible class change error for JIT stress mode"
Mathieu Chartier [Wed, 11 Mar 2015 19:52:04 +0000 (19:52 +0000)]
Merge "Fix incompatible class change error for JIT stress mode"

9 years agoFix incompatible class change error for JIT stress mode
Mathieu Chartier [Fri, 6 Mar 2015 18:59:06 +0000 (10:59 -0800)]
Fix incompatible class change error for JIT stress mode

There was a problem with miranda methods, when we would dequicken to
one of these, it wouldn't resolve as virtual during the method
lowering resolve. The solution is to try resolving as interface if we
fail to resolve as virtual.

Fixed a bug in dequickening where unreachable register lines with
quick invokes would cause CHECK failuers. In this case we punt to the
interpreter (test 435-try-*).

Added test regression test. Example failure:
java.lang.IncompatibleClassChangeError: The method
'void Main$TheInterface.m()' was expected to be of type virtual but
instead was found to be of type interface (declaration of
'java.lang.reflect.ArtMethod' appears in
out/host/linux-x86/framework/core-libart-hostdex.jar)
  at Main.DoStuff(Main.java:37)
  at Main.main(Main.java:44)

Bug: 17950037

Change-Id: I39c32cc8849bf02032a4f61a7ce57462b7fcac75

9 years agoProperly compile multidex for tests when using Jack.
Richard Uhler [Wed, 11 Mar 2015 19:36:24 +0000 (12:36 -0700)]
Properly compile multidex for tests when using Jack.

Bug: 19687200
Change-Id: I8c5771ccd474aa06001c3a48cc82550589ac7055

9 years agoMerge "Fix a bug in the SSA builder."
Nicolas Geoffray [Wed, 11 Mar 2015 18:29:19 +0000 (18:29 +0000)]
Merge "Fix a bug in the SSA builder."

9 years agoFix a bug in the SSA builder.
Nicolas Geoffray [Wed, 11 Mar 2015 18:13:21 +0000 (18:13 +0000)]
Fix a bug in the SSA builder.

The build would leave behind phis with incompatible input types
(for example float and int). We need another dead phi run after
the type propagation to ensure all such phis are dead.

Change-Id: I6ef1da725c7d4a1ebaf6b52dd7eb0c7bacd261b2

9 years agoOpt Compiler: Materialise constants that cannot be encoded
Serban Constantinescu [Sun, 22 Feb 2015 22:08:01 +0000 (22:08 +0000)]
Opt Compiler: Materialise constants that cannot be encoded

The VIXL MacroAssembler deals gracefully with any immediate. However
when the constant has multiple uses and cannot be encoded in the
instruction's immediate field we are better off using a register for
the constant and thus sharing the constant generation between multiple
uses.

Eg:
  var += #Const;    // #Const cannot be encoded.
  var += #Const;

Before:                 After:
  mov wip0, #Const        mov w4, #Const
  add w0, w0, wip0        add w0, w0, w4
  mov wip0, #Const        add w0, w0, w4
  add w0, w0, wip0

Change-Id: I8d1f620872d1241cf582fb4f3b45b5091b790146
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
9 years agoMerge "Fix sampling profiler race condition"
Mathieu Chartier [Wed, 11 Mar 2015 17:42:05 +0000 (17:42 +0000)]
Merge "Fix sampling profiler race condition"

9 years agoFix sampling profiler race condition
Mathieu Chartier [Wed, 11 Mar 2015 16:54:22 +0000 (09:54 -0700)]
Fix sampling profiler race condition

Thread 1 is running RunSamplingThread and has just read trace into
the_trace.

Thread 2 is calling Trace::Stop and has just suspended all the
threads. At this point thread 1 is blocked on the SuspendAll.
Thread 2 goes and deletes the trace which Thread 1 still has a
pointer to, calls ResumeAll(). At this point thread 1 suspends the
threads and adds samples to the just deleted trace.

The fix is to join the thread before we delete the trace.

Bug: 18950006
Change-Id: I3090c4dac392a4e5d880c4dc8d9385aef53c7425

9 years agoMerge "ART: Missing include"
Andreas Gampe [Wed, 11 Mar 2015 17:02:05 +0000 (17:02 +0000)]
Merge "ART: Missing include"

9 years agoART: Missing include
Andreas Gampe [Wed, 11 Mar 2015 16:53:50 +0000 (09:53 -0700)]
ART: Missing include

Fix missing include.

Change-Id: I439bdf3a5c7dc2a710f3dfa0dca494ac3698de60

9 years agoMerge "ART: Refactor unstarted runtime"
Andreas Gampe [Wed, 11 Mar 2015 16:27:43 +0000 (16:27 +0000)]
Merge "ART: Refactor unstarted runtime"

9 years agoART: Refactor unstarted runtime
Andreas Gampe [Mon, 9 Mar 2015 19:57:41 +0000 (12:57 -0700)]
ART: Refactor unstarted runtime

Refactor and clean up unstarted runtime.

Bug: 19542228
Change-Id: Ib3e4b3517e06e8242d4fed32ca59419fef553a47

9 years agoMerge "Revert "Revert "[optimizing] Enable x86 long support."""
Nicolas Geoffray [Wed, 11 Mar 2015 15:02:31 +0000 (15:02 +0000)]
Merge "Revert "Revert "[optimizing] Enable x86 long support."""

9 years agoRevert "Revert "[optimizing] Enable x86 long support.""
Nicolas Geoffray [Mon, 9 Mar 2015 10:28:50 +0000 (10:28 +0000)]
Revert "Revert "[optimizing] Enable x86 long support.""

This reverts commit 154552e666347d41d95d7619c6ee56249ff4feca.

Change-Id: Idc726551c249a888b7ff5fde8508ae50e81b2e13

9 years agoMerge "patchoat: DisableAutoClose when patching in place"
Andreas Gampe [Wed, 11 Mar 2015 05:18:43 +0000 (05:18 +0000)]
Merge "patchoat: DisableAutoClose when patching in place"

9 years agopatchoat: DisableAutoClose when patching in place
Julien Delayen [Thu, 5 Mar 2015 15:37:52 +0000 (16:37 +0100)]
patchoat: DisableAutoClose when patching in place

Installd can give the same input and output when
patching directly in the dalvik-cache.
For this particular case, we need to DisableAutoClose
to avoid closing twice the same fd.

Change-Id: Ic1c0f1006f776e6aeb3772c83c52309c78a4bdfd
Signed-off-by: Julien Delayen <julien.delayen@intel.com>
Signed-off-by: Guilhem IMBERTON <guilhem.imberton@intel.com>
9 years agoMerge remote-tracking branch 'goog/stage-aosp-master' into HEAD
Bill Yi [Tue, 10 Mar 2015 21:56:17 +0000 (14:56 -0700)]
Merge remote-tracking branch 'goog/stage-aosp-master' into HEAD

9 years agoMerge "Fix dex2dex logic"
Mathieu Chartier [Tue, 10 Mar 2015 21:12:50 +0000 (21:12 +0000)]
Merge "Fix dex2dex logic"

9 years agoFix dex2dex logic
Mathieu Chartier [Tue, 10 Mar 2015 20:45:40 +0000 (13:45 -0700)]
Fix dex2dex logic

There was a bug in the dex2dex logic where would only dex2dex if
IsCandidateForCompilation was true or method verifier had check casts.

The bug was caused by not adding verification results, which caused
verification_results_->GetVerifiedMethod to not have verified methods
in most cases for interpreter-only and verify-none compilation.

Caffeinemark interpret-only before:
Sieve score = 1184
Loop score = 630
Logic score = 3519
String score = 1532
Float score = 882
Method score = 686
Overall score = 1159

After:
Sieve score = 2820
Loop score = 1942
Logic score = 4694
String score = 1679
Float score = 2288
Method score = 1294
Overall score = 2244

Bug: 17950037

Change-Id: I535ab8784b434b0a8e3f66e3ab4936d10a1b04bf

9 years agoam d82d5755: Merge "Test uses libart.so, so can\'t be run NDEBUG."
Nicolas Geoffray [Tue, 10 Mar 2015 19:32:31 +0000 (19:32 +0000)]
am d82d5755: Merge "Test uses libart.so, so can\'t be run NDEBUG."

* commit 'd82d5755bbfa272d4bfe0144df1ba713e02f8335':
  Test uses libart.so, so can't be run NDEBUG.

9 years agoMerge "Test uses libart.so, so can't be run NDEBUG."
Nicolas Geoffray [Tue, 10 Mar 2015 19:27:10 +0000 (19:27 +0000)]
Merge "Test uses libart.so, so can't be run NDEBUG."

9 years agoTest uses libart.so, so can't be run NDEBUG.
Nicolas Geoffray [Tue, 10 Mar 2015 19:26:24 +0000 (19:26 +0000)]
Test uses libart.so, so can't be run NDEBUG.

Change-Id: I22c7391e07a9d06a8ce9a4d23a21ba9f60bcfe64

9 years agoam 0b2bfbd4: Merge "Fix tests now that the SSA builder is pruning more phis."
Nicolas Geoffray [Tue, 10 Mar 2015 19:05:47 +0000 (19:05 +0000)]
am 0b2bfbd4: Merge "Fix tests now that the SSA builder is pruning more phis."

* commit '0b2bfbd440f86c8c0c7ab41b74d5557edf6e9d49':
  Fix tests now that the SSA builder is pruning more phis.

9 years agoMerge "Fix tests now that the SSA builder is pruning more phis."
Nicolas Geoffray [Tue, 10 Mar 2015 19:00:53 +0000 (19:00 +0000)]
Merge "Fix tests now that the SSA builder is pruning more phis."

9 years agoFix tests now that the SSA builder is pruning more phis.
Nicolas Geoffray [Tue, 10 Mar 2015 18:59:31 +0000 (18:59 +0000)]
Fix tests now that the SSA builder is pruning more phis.

Change-Id: I503400e7343322e31ad393d51367b404d6ed7bd8

9 years agoam 21c7906e: Merge "ART: Relax test 703"
Andreas Gampe [Tue, 10 Mar 2015 18:38:43 +0000 (18:38 +0000)]
am 21c7906e: Merge "ART: Relax test 703"

* commit '21c7906e08b801f1afcb62bdd1f1763c93e5ea06':
  ART: Relax test 703

9 years agoMerge "ART: Relax test 703"
Andreas Gampe [Tue, 10 Mar 2015 18:32:15 +0000 (18:32 +0000)]
Merge "ART: Relax test 703"

9 years agoam 48e702fe: Merge "Make the SSA builder honor the debuggable flag."
Nicolas Geoffray [Tue, 10 Mar 2015 18:12:14 +0000 (18:12 +0000)]
am 48e702fe: Merge "Make the SSA builder honor the debuggable flag."

* commit '48e702fe11458b334e6abcc8f562729ccb5b27dd':
  Make the SSA builder honor the debuggable flag.

9 years agoMerge "Make the SSA builder honor the debuggable flag."
Nicolas Geoffray [Tue, 10 Mar 2015 18:07:54 +0000 (18:07 +0000)]
Merge "Make the SSA builder honor the debuggable flag."

9 years agoam 39d9fe2e: Merge "Add way to print JIT related info at shutdown"
Mathieu Chartier [Tue, 10 Mar 2015 17:44:45 +0000 (17:44 +0000)]
am 39d9fe2e: Merge "Add way to print JIT related info at shutdown"

* commit '39d9fe2eb3552a002c53ed41701c6faffe3cd75a':
  Add way to print JIT related info at shutdown

9 years agoMerge "Add way to print JIT related info at shutdown"
Mathieu Chartier [Tue, 10 Mar 2015 17:40:07 +0000 (17:40 +0000)]
Merge "Add way to print JIT related info at shutdown"

9 years agoam cb85ad66: Merge "Use quick compiler to generate odex for oat file assistant tests."
Richard Uhler [Tue, 10 Mar 2015 17:30:40 +0000 (17:30 +0000)]
am cb85ad66: Merge "Use quick compiler to generate odex for oat file assistant tests."

* commit 'cb85ad6673a0b0815fe40100a14984fd187a5f89':
  Use quick compiler to generate odex for oat file assistant tests.

9 years agoMerge "Use quick compiler to generate odex for oat file assistant tests."
Richard Uhler [Tue, 10 Mar 2015 17:24:26 +0000 (17:24 +0000)]
Merge "Use quick compiler to generate odex for oat file assistant tests."

9 years agoam 9a5342ef: Merge "Revert "Turn on logging for oat file assistant tests.""
Richard Uhler [Tue, 10 Mar 2015 17:03:50 +0000 (17:03 +0000)]
am 9a5342ef: Merge "Revert "Turn on logging for oat file assistant tests.""

* commit '9a5342ef8535b54305dab72e2ac1b3412a053f9d':
  Revert "Turn on logging for oat file assistant tests."

9 years agoUse quick compiler to generate odex for oat file assistant tests.
Richard Uhler [Tue, 10 Mar 2015 17:02:23 +0000 (10:02 -0700)]
Use quick compiler to generate odex for oat file assistant tests.

This is needed to generate non-PIC odex files, because optimizing
compiler always generates PIC.

Change-Id: Ic77a0faef6b36f13c61607327640e3378a7ee75e

9 years agoMerge "Revert "Turn on logging for oat file assistant tests.""
Richard Uhler [Tue, 10 Mar 2015 16:58:59 +0000 (16:58 +0000)]
Merge "Revert "Turn on logging for oat file assistant tests.""

9 years agoRevert "Turn on logging for oat file assistant tests."
Richard Uhler [Tue, 10 Mar 2015 16:57:05 +0000 (16:57 +0000)]
Revert "Turn on logging for oat file assistant tests."

This reverts commit f45599d8f92748c5c2d2aec515948932c52444eb.

Change-Id: I33c6c5bf1d2643bdf8ce13708f376d01599c2a98

9 years agoMake the SSA builder honor the debuggable flag.
Nicolas Geoffray [Mon, 9 Mar 2015 10:02:49 +0000 (10:02 +0000)]
Make the SSA builder honor the debuggable flag.

This requires to properly type phis that are only
used by environments, and discard phis with incomptable types.
The code generators do not handle these conflicting types. In
the process, ensure a phi has a type that does not depend
on the order of the inputs (for example (char, short) -> short),
and set int for int-like types. We can refine this later.

Change-Id: I60ab601d6d00b1cbf18623ee4ff1795aa28f84a1

9 years agoART: Relax test 703
Andreas Gampe [Tue, 10 Mar 2015 02:29:48 +0000 (19:29 -0700)]
ART: Relax test 703

NaNs are a set of numbers. Do not expect one specific one as the
result of a NaN computation.

Change-Id: Ib98d61ea1fe8c2dd80027d1a23b8a77bfb248a27

9 years agoam f719fdd2: Merge "[MIPS64] Fix GenInlinedPeek and GenInlinedPoke functions."
Andreas Gampe [Tue, 10 Mar 2015 16:14:47 +0000 (16:14 +0000)]
am f719fdd2: Merge "[MIPS64] Fix GenInlinedPeek and GenInlinedPoke functions."

* commit 'f719fdd20e6282f3579cb99529bb65e852612647':
  [MIPS64] Fix GenInlinedPeek and GenInlinedPoke functions.

9 years agoMerge "[MIPS64] Fix GenInlinedPeek and GenInlinedPoke functions."
Andreas Gampe [Tue, 10 Mar 2015 16:09:25 +0000 (16:09 +0000)]
Merge "[MIPS64] Fix GenInlinedPeek and GenInlinedPoke functions."

9 years agoam 7e9c99bd: Merge "Turn on logging for oat file assistant tests."
Richard Uhler [Tue, 10 Mar 2015 15:48:39 +0000 (15:48 +0000)]
am 7e9c99bd: Merge "Turn on logging for oat file assistant tests."

* commit '7e9c99bd850e22b8a5e2b5419bcf0b1abf0e29e5':
  Turn on logging for oat file assistant tests.

9 years ago[MIPS64] Fix GenInlinedPeek and GenInlinedPoke functions.
Goran Jakovljevic [Tue, 10 Mar 2015 15:44:08 +0000 (16:44 +0100)]
[MIPS64] Fix GenInlinedPeek and GenInlinedPoke functions.

Change-Id: I4994bb2f9075cb3b6488e5a5b88dbed17b80595a

9 years agoMerge "Turn on logging for oat file assistant tests."
Richard Uhler [Tue, 10 Mar 2015 15:42:14 +0000 (15:42 +0000)]
Merge "Turn on logging for oat file assistant tests."

9 years agoTurn on logging for oat file assistant tests.
Richard Uhler [Tue, 10 Mar 2015 15:38:31 +0000 (08:38 -0700)]
Turn on logging for oat file assistant tests.

Temporary to debug test failure.

Change-Id: Idbfcdbdae5e0aa3544b01f1a1ab0297a81d736d5

9 years agoam 2af72de8: Merge "Remove ThrowLocation."
Nicolas Geoffray [Tue, 10 Mar 2015 15:23:00 +0000 (15:23 +0000)]
am 2af72de8: Merge "Remove ThrowLocation."

* commit '2af72de83957fb52426b8f9144e9814d35b78951':
  Remove ThrowLocation.

9 years agoMerge "Remove ThrowLocation."
Nicolas Geoffray [Tue, 10 Mar 2015 15:08:13 +0000 (15:08 +0000)]
Merge "Remove ThrowLocation."

9 years agoam 072e48ed: Merge "Create OatFileAssistant class for assisting with oat files."
Richard Uhler [Tue, 10 Mar 2015 15:03:37 +0000 (15:03 +0000)]
am 072e48ed: Merge "Create OatFileAssistant class for assisting with oat files."

* commit '072e48ed63aa4f99bec1dbbe8a7872a4bcc03e41':
  Create OatFileAssistant class for assisting with oat files.

9 years agoam e8e42f35: Merge "JDWP: allocate DebugInvokeReq only when requested"
Sebastien Hertz [Tue, 10 Mar 2015 15:03:36 +0000 (15:03 +0000)]
am e8e42f35: Merge "JDWP: allocate DebugInvokeReq only when requested"

* commit 'e8e42f3548fd894f860912bb1b71ce6fa2d7daf3':
  JDWP: allocate DebugInvokeReq only when requested

9 years agoRemove ThrowLocation.
Nicolas Geoffray [Tue, 10 Mar 2015 11:03:29 +0000 (11:03 +0000)]
Remove ThrowLocation.

Note that this is a cleanup change, and has no functionality change.
The ThrowLocation had no use anymore.

Change-Id: I3d2126af1dc673cec3a0453ff3d56a172663a5f6

9 years agoMerge "Create OatFileAssistant class for assisting with oat files."
Richard Uhler [Tue, 10 Mar 2015 14:41:25 +0000 (14:41 +0000)]
Merge "Create OatFileAssistant class for assisting with oat files."

9 years agoMerge "JDWP: allocate DebugInvokeReq only when requested"
Sebastien Hertz [Tue, 10 Mar 2015 08:48:46 +0000 (08:48 +0000)]
Merge "JDWP: allocate DebugInvokeReq only when requested"

9 years agoam 54a8cc68: Merge "Trim arenas for JIT"
Mathieu Chartier [Tue, 10 Mar 2015 02:09:59 +0000 (02:09 +0000)]
am 54a8cc68: Merge "Trim arenas for JIT"

* commit '54a8cc689dc23f346c9aac0d5fc6f47e61df8cad':
  Trim arenas for JIT

9 years agoAdd way to print JIT related info at shutdown
Mathieu Chartier [Mon, 9 Mar 2015 22:38:54 +0000 (15:38 -0700)]
Add way to print JIT related info at shutdown

Added a runtime option called -XX:DumpJITInfoOnShutdown with prints
various interesting JIT statistics during the shutdown of the runtime
if enabled.

Example of running EvaluateAndApplyChanges with the option:
I art     : Code cache size=427KB data cache size=84KB num methods=1598
I art     : Start Dumping histograms for 1598 iterations for JIT timings
I art     : Compiling: Sum: 727.850ms 99% C.I. 135us-4402us Avg: 455.475us Max: 15567us
I art     : Verifying: Sum: 191.074ms 99% C.I. 19us-1450.500us Avg: 119.570us Max: 5142us
I art     : TrimMaps:  Sum: 62.053ms 99% C.I. 13us-199.374us Avg: 38.831us Max: 10058us
I art     : MakeExecutable:  Sum: 11.153ms 99% C.I. 4us-47us Avg: 6.979us Max: 47us
I art     : Initializing:  Sum: 7.991ms 99% C.I. 1us-49.781us Avg: 5us Max: 4852us
I art     : Done Dumping histograms

Bug: 17950037
Change-Id: I23538b24f947e5f6934f55579b8baa9d806eb3d5

9 years agoMerge "Trim arenas for JIT"
Mathieu Chartier [Mon, 9 Mar 2015 22:15:18 +0000 (22:15 +0000)]
Merge "Trim arenas for JIT"

9 years agoCreate OatFileAssistant class for assisting with oat files.
Richard Uhler [Thu, 15 Jan 2015 17:37:19 +0000 (09:37 -0800)]
Create OatFileAssistant class for assisting with oat files.

The oat file assistant is used for determining whether dex2oat or
patchoat is needed, for running dex2oat or patchoat as needed to make
an oat file up to date, and to load dex files associated with a given
dex location.

The introduction of the OatFileAssistant class is meant to clean up and
consolidate code related to the management of oat files that was
duplicated and spread across dalvik_system_DexFile.cc and
class_linker.cc.

Bug: 11301553
Change-Id: I0c16027b9bae4570c2c50faa9c14f581c0cbafb8

9 years agoTrim arenas for JIT
Mathieu Chartier [Mon, 9 Mar 2015 18:30:17 +0000 (11:30 -0700)]
Trim arenas for JIT

Moved arena pool into the runtime. Added arena trimming to arena
pool. When called, this madvises the used memory.

Changed the JIT compiler to trim arenas after compilation. Changed
the arena mmap name to dalvik-LinearAlloc.

Native PSS before:
  80353 kB: Native
  80775 kB: Native
  78116 kB: Native
After:
  73357 kB: Native
  70181 kB: Native
  70306 kB: Native

Bug: 17950037
Bug: 17643507
Bug: 19264997

Change-Id: I63e7a898fd6e909c2c677fa57b5917a7b1398930

9 years agoam b3226684: Merge "ART: Fix init-failure graph tool"
Andreas Gampe [Mon, 9 Mar 2015 21:15:07 +0000 (21:15 +0000)]
am b3226684: Merge "ART: Fix init-failure graph tool"

* commit 'b3226684f0ee69094f896cb99a9d1f12585eac42':
  ART: Fix init-failure graph tool

9 years agoMerge "ART: Fix init-failure graph tool"
Andreas Gampe [Mon, 9 Mar 2015 21:10:14 +0000 (21:10 +0000)]
Merge "ART: Fix init-failure graph tool"

9 years agoam 81d38f74: Merge "Use the current Java stack instead of the ThrowLocation."
Nicolas Geoffray [Mon, 9 Mar 2015 17:40:50 +0000 (17:40 +0000)]
am 81d38f74: Merge "Use the current Java stack instead of the ThrowLocation."

* commit '81d38f74219774d87389f83f23595ffc8fe814b1':
  Use the current Java stack instead of the ThrowLocation.

9 years agoART: Fix init-failure graph tool
Andreas Gampe [Mon, 9 Mar 2015 17:36:54 +0000 (10:36 -0700)]
ART: Fix init-failure graph tool

Fix missing entries when the failed class doesn't appear in the
stack trace.

Add coloring for loadLibrary and getProperty.

Change-Id: I35df917ac8b1ada1f6eb2e418fa6ff9ca6b17048

9 years agoMerge "Use the current Java stack instead of the ThrowLocation."
Nicolas Geoffray [Mon, 9 Mar 2015 17:25:25 +0000 (17:25 +0000)]
Merge "Use the current Java stack instead of the ThrowLocation."

9 years agoUse the current Java stack instead of the ThrowLocation.
Nicolas Geoffray [Mon, 9 Mar 2015 14:56:37 +0000 (14:56 +0000)]
Use the current Java stack instead of the ThrowLocation.

The ThrowLocation contains information we can actually retrieve
from the current stack.

Change-Id: I7e5b2f519f95830c457cb31ea10a581aa9c973ee

9 years agoJDWP: allocate DebugInvokeReq only when requested
Sebastien Hertz [Wed, 25 Feb 2015 14:05:59 +0000 (15:05 +0100)]
JDWP: allocate DebugInvokeReq only when requested

Only allocates thread-local DebugInvokeReq when the debugger requests
a thread to invoke a method. The JDWP thread allocates that structure
then attaches it to the target thread. When the thread is resumed, it
executes the method. Once the invocation completes, the thread
detaches the DebugInvokeReq, signals the JDWP thread then suspends.
Finally, the JDWP thread wakes up, prepares the reply with the invoke
result (or exception) and deallocates the DebugInvokeReq.

Also ensures GC safety for object returned by the invoke. We add the
object to the JDWP object registry right after the invoke. We now
reference that object with a JDWP ObjectID instead of an Object* in
the DebugInvokeReq struct. This prevent from accessing a stale
reference if the GC runs and moves the Object*.

This CL includes the following changes:
- Move former DebugInvokeReq::ready flag to
  Thread::tls_32bit_sized_values::ready_for_debug_invoke. It's needed
  to know whether a thread has been suspended by an event, thus ready
  to invoke a method from the debugger.
- Remove DebugInvokeReq::invoke_needed: we now test if we attached a
  DebugInvokeReq* to the thread.
- Rename misleading FinishMethod function to RequestMethod.

Bug: 19142632
Bug: 18166750
Change-Id: I351fb4eb94bfe69fcafb544d21d55ff35a033000

9 years agoam 2cfdabd2: Merge "Fix run-test with JIT enabled"
Sebastien Hertz [Mon, 9 Mar 2015 14:13:24 +0000 (14:13 +0000)]
am 2cfdabd2: Merge "Fix run-test with JIT enabled"

* commit '2cfdabd2bb4833d7092819d27ef08a9e1cdffead':
  Fix run-test with JIT enabled

9 years agoMerge "Fix run-test with JIT enabled"
Sebastien Hertz [Mon, 9 Mar 2015 14:07:15 +0000 (14:07 +0000)]
Merge "Fix run-test with JIT enabled"

9 years agoFix run-test with JIT enabled
Sebastien Hertz [Mon, 9 Mar 2015 13:57:48 +0000 (14:57 +0100)]
Fix run-test with JIT enabled

Uses -Xusejit:true instead of -Xjit.

Bug: 17950037
Change-Id: I8280245e3e2aeced5927ade1632b7a110b040136

9 years agoam 504b1731: Merge "Revert "Revert "More Makefile fun for --debuggable."""
Nicolas Geoffray [Mon, 9 Mar 2015 14:00:37 +0000 (14:00 +0000)]
am 504b1731: Merge "Revert "Revert "More Makefile fun for --debuggable."""

* commit '504b1731dc8f115d7a6d6d54da6fa6a0e3f4b0c9':
  Revert "Revert "More Makefile fun for --debuggable.""

9 years agoMerge "Revert "Revert "More Makefile fun for --debuggable."""
Nicolas Geoffray [Mon, 9 Mar 2015 13:57:12 +0000 (13:57 +0000)]
Merge "Revert "Revert "More Makefile fun for --debuggable."""

9 years agoRevert "Revert "More Makefile fun for --debuggable.""
Nicolas Geoffray [Mon, 9 Mar 2015 12:21:26 +0000 (12:21 +0000)]
Revert "Revert "More Makefile fun for --debuggable.""

This reverts commit 9728a930fdf717cca60b48d9c2b715d0eed497fd.

Change-Id: Ieca964a793e58f11931f78f50be47a4a9f0dc21f

9 years agoam bf40b5ba: Merge "Revert "More Makefile fun for --debuggable.""
Nicolas Geoffray [Mon, 9 Mar 2015 12:18:38 +0000 (12:18 +0000)]
am bf40b5ba: Merge "Revert "More Makefile fun for --debuggable.""

* commit 'bf40b5ba88dff872f252c975dd6570571c7d5a90':
  Revert "More Makefile fun for --debuggable."

9 years agoam d633384a: Merge "Revert "Fix braino in Makefile.""
Nicolas Geoffray [Mon, 9 Mar 2015 12:18:37 +0000 (12:18 +0000)]
am d633384a: Merge "Revert "Fix braino in Makefile.""

* commit 'd633384abccd91224b93a3ff2f970f95611280d1':
  Revert "Fix braino in Makefile."

9 years agoMerge "Revert "More Makefile fun for --debuggable.""
Nicolas Geoffray [Mon, 9 Mar 2015 12:14:25 +0000 (12:14 +0000)]
Merge "Revert "More Makefile fun for --debuggable.""

9 years agoMerge "Revert "Fix braino in Makefile.""
Nicolas Geoffray [Mon, 9 Mar 2015 12:14:12 +0000 (12:14 +0000)]
Merge "Revert "Fix braino in Makefile.""

9 years agoRevert "Fix braino in Makefile."
Nicolas Geoffray [Mon, 9 Mar 2015 12:14:02 +0000 (12:14 +0000)]
Revert "Fix braino in Makefile."

This reverts commit 64657d2d840e5d4e6b4b71d5df6ee0fcc4a8afab.

Change-Id: I5b778027538a4247cf51eff338220328e741074f

9 years agoRevert "More Makefile fun for --debuggable."
Nicolas Geoffray [Mon, 9 Mar 2015 12:13:43 +0000 (12:13 +0000)]
Revert "More Makefile fun for --debuggable."

This reverts commit bd648cd3aef1ce82aaaa85924b1178a7f499cc29.

Change-Id: I9be508730dc5c25b9d08f914c5628e88bc4aa15b

9 years agoam c4ab6b04: Merge "Fix braino in Makefile."
Nicolas Geoffray [Mon, 9 Mar 2015 11:57:09 +0000 (11:57 +0000)]
am c4ab6b04: Merge "Fix braino in Makefile."

* commit 'c4ab6b04a96e0f4dc6a86ca869b545bfa3ec9391':
  Fix braino in Makefile.

9 years agoMerge "Fix braino in Makefile."
Nicolas Geoffray [Mon, 9 Mar 2015 11:50:32 +0000 (11:50 +0000)]
Merge "Fix braino in Makefile."

9 years agoFix braino in Makefile.
Nicolas Geoffray [Mon, 9 Mar 2015 11:39:12 +0000 (11:39 +0000)]
Fix braino in Makefile.

They are such a joy to work with.

Change-Id: I1a982c97fb9e2e9f34f921e7f6b481988a57f858

9 years agoam 5c9d8f0d: Merge "Compute the right catch location for the debugger."
Nicolas Geoffray [Mon, 9 Mar 2015 10:15:14 +0000 (10:15 +0000)]
am 5c9d8f0d: Merge "Compute the right catch location for the debugger."

* commit '5c9d8f0d2948c2b4fe4258f96e3598ad5b8fa23b':
  Compute the right catch location for the debugger.

9 years agoMerge "Compute the right catch location for the debugger."
Nicolas Geoffray [Mon, 9 Mar 2015 10:11:03 +0000 (10:11 +0000)]
Merge "Compute the right catch location for the debugger."

9 years agoCompute the right catch location for the debugger.
Nicolas Geoffray [Thu, 5 Mar 2015 10:40:17 +0000 (10:40 +0000)]
Compute the right catch location for the debugger.

Also remove tls ThrowLocation, it is not needed anymore.

Change-Id: I78fddf09ce968ca475e39c17fa76d699c589c8d9

9 years agoam 3dd536ff: Merge "More Makefile fun for --debuggable."
Nicolas Geoffray [Mon, 9 Mar 2015 09:19:55 +0000 (09:19 +0000)]
am 3dd536ff: Merge "More Makefile fun for --debuggable."

* commit '3dd536ffd7e8f82e4587964545b272acbd61d68e':
  More Makefile fun for --debuggable.