OSDN Git Service
Andreas Gampe [Mon, 22 Dec 2014 18:30:56 +0000 (18:30 +0000)]
am
55933045: Merge "ART: Do not JNI abort on nullptr GetObjectRefType" into lmp-mr1-dev
* commit '
55933045bcbb66dd76046aa279841f3a1efba7b5':
ART: Do not JNI abort on nullptr GetObjectRefType
Andreas Gampe [Mon, 22 Dec 2014 18:27:42 +0000 (18:27 +0000)]
Merge "ART: Do not JNI abort on nullptr GetObjectRefType" into lmp-mr1-dev
Andreas Gampe [Sat, 20 Dec 2014 08:08:35 +0000 (00:08 -0800)]
ART: Do not JNI abort on nullptr GetObjectRefType
A nullptr is a valid input, as it is different from a null reference.
Bug:
18820997
(cherry picked from commit
a87630724ef4f8760684fa69c8ecc685735aff88)
Change-Id: Ibda8907ba13b20d2055049492a356ffdf4ddc714
Andreas Gampe [Sat, 20 Dec 2014 07:15:04 +0000 (07:15 +0000)]
am
5e3dd904: Merge "ART: Use interpret-only for vmSafeMode" into lmp-mr1-dev
* commit '
5e3dd904f86783bf4b835084c51d8d3625f00897':
ART: Use interpret-only for vmSafeMode
Andreas Gampe [Sat, 20 Dec 2014 07:10:32 +0000 (07:10 +0000)]
Merge "ART: Use interpret-only for vmSafeMode" into lmp-mr1-dev
Andreas Gampe [Fri, 19 Dec 2014 17:53:27 +0000 (09:53 -0800)]
ART: Use interpret-only for vmSafeMode
Set the compiler filter when the zygote tells us that the app is
in vmSafeMode. This ensures that secondary dex files will also be
compiled interpret-only.
Bug:
18812762
Change-Id: Idb61870beebe2eeb5b11554f95ea6a725c77f16a
Hiroshi Yamauchi [Sat, 20 Dec 2014 01:01:26 +0000 (01:01 +0000)]
am
634d58a9: Pass the real capacity to CreateRosAlloc.
* commit '
634d58a91ed636043feed600ca17c6c945a4fb20':
Pass the real capacity to CreateRosAlloc.
Hiroshi Yamauchi [Sat, 20 Dec 2014 00:02:07 +0000 (16:02 -0800)]
Pass the real capacity to CreateRosAlloc.
(cherrypick commit
94c41dfcaf4bc131964ddd3013432841b07c3839)
Bug:
18808732
Change-Id: Id65469c3deb70c9f750f89cf0e7606849b801a21
Vladimir Marko [Fri, 19 Dec 2014 21:32:25 +0000 (21:32 +0000)]
am
091f9543: Merge "Fix running out of temps when storing invoke-interface result." into lmp-mr1-dev
* commit '
091f954303f97bd280c4c7800c130bd198ff1165':
Fix running out of temps when storing invoke-interface result.
Andreas Gampe [Fri, 19 Dec 2014 21:32:24 +0000 (21:32 +0000)]
am
8a9f0049: ART: Do not compile swap file functionality on Mac
* commit '
8a9f0049821803051201edebc6d9a0f0639756c3':
ART: Do not compile swap file functionality on Mac
Vladimir Marko [Fri, 19 Dec 2014 21:27:35 +0000 (21:27 +0000)]
Merge "Fix running out of temps when storing invoke-interface result." into lmp-mr1-dev
Andreas Gampe [Fri, 19 Dec 2014 20:04:06 +0000 (12:04 -0800)]
ART: Do not compile swap file functionality on Mac
Bug:
18596910
Change-Id: Ic06429f41840ce318cfaa837efecc69c2076440e
Vladimir Marko [Fri, 19 Dec 2014 19:27:26 +0000 (19:27 +0000)]
Fix running out of temps when storing invoke-interface result.
On ARM, after emitting invoke-interface we didn't have any
free temps to use for storing the result, so we would crash
if the result was an unpromoted dalvik register with stack
location too far from SP.
Bug:
18769895
Change-Id: Ie6c131d68f1853a8317b305a22eab22faea80e90
Andreas Gampe [Fri, 19 Dec 2014 16:46:00 +0000 (16:46 +0000)]
am
d9ce7fc1: ART: Fix swap space free list
* commit '
d9ce7fc19b061be7745d8d8a32bc954a0c62d326':
ART: Fix swap space free list
Andreas Gampe [Fri, 19 Dec 2014 08:14:38 +0000 (00:14 -0800)]
ART: Fix swap space free list
You should look for the element's size, not the freed size, when
coalescing nodes.
Bug:
18809642
Change-Id: I0c4396d52ef68f392f1e8c76a57e3fb5587b77fb
Andreas Gampe [Fri, 19 Dec 2014 03:33:09 +0000 (03:33 +0000)]
am
62746d8d: ART: Swap-space in the compiler
* commit '
62746d8d9c4400e4764f162b22bfb1a32be287a9':
ART: Swap-space in the compiler
Andreas Gampe [Tue, 9 Dec 2014 00:59:43 +0000 (16:59 -0800)]
ART: Swap-space in the compiler
Introduce a swap-space and corresponding allocator to transparently
switch native allocations to memory backed by a file.
Bug:
18596910
Change-Id: I131448f3907115054a592af73db86d2b9257ea33
Sebastien Hertz [Thu, 18 Dec 2014 07:03:29 +0000 (07:03 +0000)]
am
15ff1a86: Merge "JDWP: fix setting multiple breakpoints in the same method" into lmp-mr1-dev
* commit '
15ff1a8642fbbe3fb29273f35005ccc7524bb942':
JDWP: fix setting multiple breakpoints in the same method
Sebastien Hertz [Thu, 18 Dec 2014 06:57:03 +0000 (06:57 +0000)]
Merge "JDWP: fix setting multiple breakpoints in the same method" into lmp-mr1-dev
Andreas Gampe [Thu, 18 Dec 2014 02:47:25 +0000 (02:47 +0000)]
am
f535c69f: ART: Punt to the interpreter for VerifiedMethod errors
* commit '
f535c69f115c61ffadca1bd2706244d0aa30f9aa':
ART: Punt to the interpreter for VerifiedMethod errors
Andreas Gampe [Wed, 17 Dec 2014 22:35:46 +0000 (14:35 -0800)]
ART: Punt to the interpreter for VerifiedMethod errors
In case that the GC map can't be created (because of size restrictions),
do not fail the class. Instead punt to the interpreter.
Bug:
17791183
Change-Id: I348bb306dbfc85c235fa93c0c527fba6627551fe
Sebastien Hertz [Wed, 17 Dec 2014 15:35:50 +0000 (16:35 +0100)]
JDWP: fix setting multiple breakpoints in the same method
When setting multiple breakpoints in the same method, we were
incorrectly setting the deoptimization kind of all the breakpoints
set after a first breakpoint. This resulted in incorrect
deoptimization/undeoptimization and even an abort. This was caught
by running the debugger with sanity checks enabled with libartd.so.
We now set next breakpoints with the deoptimization kind of the first
existing breakpoint (if any) so we trigger right [un]deoptimization
when adding or removing a breakpoint.
Bug:
18782753
Bug:
18651686
(cherry picked from commit
abe93e0098a2648fa286cfea01954737e32c7be9)
Change-Id: I95424e361dc04df0adb54b5afac5b4da2b8b2731
Mathieu Chartier [Thu, 11 Dec 2014 20:47:54 +0000 (20:47 +0000)]
am
74608312: Merge "Increase default allocation stack size" into lmp-mr1-dev
* commit '
746083126bb04ade001eb9d9b3aeea364633567f':
Increase default allocation stack size
Mathieu Chartier [Thu, 11 Dec 2014 20:39:08 +0000 (20:39 +0000)]
Merge "Increase default allocation stack size" into lmp-mr1-dev
Mathieu Chartier [Thu, 11 Dec 2014 02:45:30 +0000 (18:45 -0800)]
Increase default allocation stack size
Prevents some GC for alloc which can occur if the allocation stack
overflows.
Bug:
18707404
Change-Id: I00e8e518aa5105b69c70603a8395c81617b87d14
Andreas Gampe [Thu, 11 Dec 2014 18:34:16 +0000 (18:34 +0000)]
am
d2c8f92c: Merge "ART: More ELF and oat file safety measures" into lmp-mr1-dev
* commit '
d2c8f92ccbcb885a7d7bd499a840012df3d8d70a':
ART: More ELF and oat file safety measures
Andreas Gampe [Thu, 11 Dec 2014 18:27:18 +0000 (18:27 +0000)]
Merge "ART: More ELF and oat file safety measures" into lmp-mr1-dev
Andreas Gampe [Thu, 11 Dec 2014 04:51:45 +0000 (20:51 -0800)]
ART: More ELF and oat file safety measures
In an ELF file, look for a shstrtab section when loading in
program-header-only mode. If the section is outside the file size,
it strongly indicates a broken compile.
When compiling oat files in the class linker, explicitly unlink
on failure. This should catch cases when dex2oat is killed or
crashes and doesn't have a chance to delete its (partial) output.
Bug:
15567083
Change-Id: Ia0c75f151d91c6f26a71696967255d6d409ca882
Dmitriy Ivanov [Wed, 10 Dec 2014 22:19:47 +0000 (22:19 +0000)]
am
cba59c39: Merge "Link libsigchain.a instead of sigchain.o" into lmp-mr1-dev
* commit '
cba59c39cc42fb661016c6677e89160937fe9e66':
Link libsigchain.a instead of sigchain.o
Dmitriy Ivanov [Wed, 10 Dec 2014 22:13:46 +0000 (22:13 +0000)]
Merge "Link libsigchain.a instead of sigchain.o" into lmp-mr1-dev
Brian Carlstrom [Wed, 10 Dec 2014 20:42:20 +0000 (20:42 +0000)]
am
6aa9ebe9: Merge "Fix verifier bug caused by confusing ArtMethod::IsDirect vs ArtMethod::IsStatic semantics." into lmp-mr1-dev
* commit '
6aa9ebe9e90eda9433ec37b87ed883e9cc434ca2':
Fix verifier bug caused by confusing ArtMethod::IsDirect vs ArtMethod::IsStatic semantics.
Brian Carlstrom [Wed, 10 Dec 2014 20:37:04 +0000 (20:37 +0000)]
Merge "Fix verifier bug caused by confusing ArtMethod::IsDirect vs ArtMethod::IsStatic semantics." into lmp-mr1-dev
Sebastien Hertz [Wed, 10 Dec 2014 20:23:28 +0000 (20:23 +0000)]
am
ae2533bc: Merge "Ensure void type is resolved when running without image" into lmp-mr1-dev
* commit '
ae2533bc91e04915335cc2d8a3c60021a3b3fade':
Ensure void type is resolved when running without image
Sebastien Hertz [Wed, 10 Dec 2014 20:16:04 +0000 (20:16 +0000)]
Merge "Ensure void type is resolved when running without image" into lmp-mr1-dev
Dmitriy Ivanov [Mon, 20 Oct 2014 21:11:00 +0000 (14:11 -0700)]
Link libsigchain.a instead of sigchain.o
Relative paths may sometimes lead to failed builds
if sources are built in particular order.
Also it is possible to export symbols from static lib
with LOCAL_WHOLE_STATIC_LIBRARIES variable.
(cherry picked from commit
e49a4f6db74f4e66486a6aaf6564f997a94e230f)
Bug:
18701723
Change-Id: I6d62594c2e84020d67254747c1fd465e1144920e
Sebastien Hertz [Tue, 9 Dec 2014 18:08:15 +0000 (19:08 +0100)]
Ensure void type is resolved when running without image
To initialize java.lang.Void correctly, we need to ensure the 'void'
class is initialized in the dex cache of core-libart (because Java
code relies on it). However, if we run without image, the dex cache
may not contain the void class before we initialize java.lang.Void
class.
This CL fixes this by forcing the resolution of 'void' class when
initializing the runtime without image.
We also generalize that to other types by not skipping verification
when running with preopted oat files without image. By verifying
all classes, we ensure all resolved types are in the dex caches.
Bug:
18338511
Change-Id: I65e345da47be6eda1ee55897c01a9a4cc1444915
Brian Carlstrom [Wed, 10 Dec 2014 04:15:42 +0000 (20:15 -0800)]
Fix verifier bug caused by confusing ArtMethod::IsDirect vs ArtMethod::IsStatic semantics.
Bug:
18485243
(cherry picked from commit
be6fa5eb4a571e14481cf43f4cb264629c069153)
Change-Id: I6e4d8e7587f7e03288ce039471154c1e6ebc7d8a
Sebastien Hertz [Tue, 9 Dec 2014 22:19:49 +0000 (22:19 +0000)]
am
ab0f981e: Merge "Support proxy method in StackVisitor::GetThisObject" into lmp-mr1-dev
* commit '
ab0f981e81d3c812cd34ca3e7be1e7f11ed8ca14':
Support proxy method in StackVisitor::GetThisObject
Sebastien Hertz [Tue, 9 Dec 2014 21:53:37 +0000 (21:53 +0000)]
Merge "Support proxy method in StackVisitor::GetThisObject" into lmp-mr1-dev
Bill Buzbee [Tue, 9 Dec 2014 20:13:10 +0000 (20:13 +0000)]
am
59f6b7a2: Merge "ART: GenLongArith has to clobber same operands for 2-op instr" into lmp-mr1-dev
* commit '
59f6b7a22845421772daa12f2c7c97ffcdf3b037':
ART: GenLongArith has to clobber same operands for 2-op instr
Bill Buzbee [Tue, 9 Dec 2014 20:13:09 +0000 (20:13 +0000)]
am
b837bd2b: Merge "ART: GenNegLong incorrectly handled register overlap for x86" into lmp-mr1-dev
* commit '
b837bd2bbd29022b48dfbe7910002d3e139e65e4':
ART: GenNegLong incorrectly handled register overlap for x86
Bill Buzbee [Tue, 9 Dec 2014 20:06:41 +0000 (20:06 +0000)]
Merge "ART: GenLongArith has to clobber same operands for 2-op instr" into lmp-mr1-dev
Bill Buzbee [Tue, 9 Dec 2014 20:06:25 +0000 (20:06 +0000)]
Merge "ART: GenNegLong incorrectly handled register overlap for x86" into lmp-mr1-dev
nikolay serdjuk [Thu, 13 Nov 2014 12:15:23 +0000 (18:15 +0600)]
ART: GenLongArith has to clobber same operands for 2-op instr
When we generate code for 'add-long/2addr v4, v4' and v4 is in
memory, we load v4 in a physical register, do operation and
store result in memory. After that, we should clobber the
physical register because it is not valid anymore.
Signed-off-by: nikolay serdjuk <nikolay.y.serdjuk@intel.com>
(cherry picked from commit
6b9356cf0feb2a4100798481869fd4d18180c29f)
Bug:
18671047
Bug: https://code.google.com/p/android/issues/detail?id=81542
Change-Id: Ie11e29cd32358ddbdccf66eaad46aa07f1269133
nikolay serdjuk [Mon, 10 Nov 2014 09:53:27 +0000 (16:53 +0700)]
ART: GenNegLong incorrectly handled register overlap for x86
There is a bug in the GenNegLong: it should invoke
OpRegCopy(temp_reg, rl_result.reg.GetHigh());
instead of
OpRegCopy(temp_reg, rl_result.reg);
But, anyway there is no need to handle the overlap
anymore because it is already handled in OpRegCopyWide()
which is invoked from StoreValueWide().
Signed-off-by: nikolay serdjuk <nikolay.y.serdjuk@intel.com>
(cherry picked from commit
d24c9346138b7b8723461d94d9866762a59929d9)
Bug:
18671045
Bug: https://code.google.com/p/android/issues/detail?id=81544
Change-Id: I6d67a2a1507043c15de4616d0df59459630d4104
Sebastien Hertz [Tue, 25 Nov 2014 15:30:53 +0000 (16:30 +0100)]
Support proxy method in StackVisitor::GetThisObject
Adds function artQuickGetProxyThisObject which returns the 'this'
object of the proxy method using the QuickArgumentVisitor. Since
proxy methods have the same layout than the kRefsAndArgs runtime
method and 'this' is the 1st method argument, it is located in the
first GPR.
Bug:
17965861
(cherry picked from commit
a836bc9760419af4a515f96c66100a39e865f3b9)
Change-Id: I09b5c1cdfc051d9395bba929d4650804eb3b1f7f
Sebastien Hertz [Tue, 9 Dec 2014 10:20:23 +0000 (10:20 +0000)]
am
a8ff529e: Merge "JDWP: avoid crash on unsupported modifier" into lmp-mr1-dev
* commit '
a8ff529ea561aa67f07e97cf29b43f5d6dbfa898':
JDWP: avoid crash on unsupported modifier
Sebastien Hertz [Tue, 9 Dec 2014 09:28:48 +0000 (09:28 +0000)]
Merge "JDWP: avoid crash on unsupported modifier" into lmp-mr1-dev
Brian Carlstrom [Tue, 9 Dec 2014 06:50:36 +0000 (06:50 +0000)]
am
16abc5f2: Fix reference table sorting
* commit '
16abc5f28ac9792fd1ba2c82f123cfd871cddbdb':
Fix reference table sorting
Brian Carlstrom [Tue, 9 Dec 2014 00:22:06 +0000 (16:22 -0800)]
Fix reference table sorting
Bug:
18638116
Change-Id: I30894d5c33a2702b0c0be7fc9789b42256eea8b1
Hans Boehm [Fri, 5 Dec 2014 22:33:57 +0000 (22:33 +0000)]
am
5f421f16: Merge "Make Barrier robust against spurious wakeups" into lmp-mr1-dev
* commit '
5f421f16b6f8866233eb5d7d40991c2b00ec1482':
Make Barrier robust against spurious wakeups
Hans Boehm [Fri, 5 Dec 2014 22:22:14 +0000 (22:22 +0000)]
Merge "Make Barrier robust against spurious wakeups" into lmp-mr1-dev
Jean Christophe Beyler [Fri, 5 Dec 2014 16:50:21 +0000 (16:50 +0000)]
am
eb1404a0: ART: Fix variable formatting and CodeLayout\'s multiple visits
* commit '
eb1404a0b59c4a981af61852c94129507efc331a':
ART: Fix variable formatting and CodeLayout's multiple visits
Jean Christophe Beyler [Thu, 4 Sep 2014 15:15:11 +0000 (08:15 -0700)]
ART: Fix variable formatting and CodeLayout's multiple visits
The CodeLayout pass visits multiple times the same BasicBlock. This patch
fixes that issue to reduce its overhead.
The patch also fixes cUnit to c_unit in the bb_optimization files.
Signed-off-by: Jean Christophe Beyler <jean.christophe.beyler@intel.com>
Bug:
18507840
(cherry picked from commit
75bcc3780bc40dd7c265e150aff5b891135ff6e3)
Change-Id: I4675ba0b4886c35f0093ac54e171dd87548f60c8
Sebastien Hertz [Fri, 5 Dec 2014 09:52:15 +0000 (10:52 +0100)]
JDWP: avoid crash on unsupported modifier
Returns NOT_IMPLEMENTED error if we receive an event request with an
unsupported modifier.
Bug: https://code.google.com/p/android/issues/detail?id=81037
Bug:
18617787
Change-Id: I97729e2f98af3a75d24604926a89860255d4acae
Hans Boehm [Wed, 3 Dec 2014 02:31:31 +0000 (18:31 -0800)]
Make Barrier robust against spurious wakeups
Fix Barrier implementation so that Wait cannot return prematurely
due to a spurious condition variable wakeup or interrupted futex call.
Document the resulting semantics of barrier.h, which are a bit surprising,
but appear to be exactly what current clients need.
Fix the test so that it actually passes with the fixed barrier.h,
and no longer tests for properties that can't be correctly satisfied.
Improve comment for InitTimeSpec, which we almost used.
(Differs from AOSP patch in that Increment returns void here,
as does cv TimedWait. In AOSP they return bool.)
Bug:
18509123
Change-Id: I0b25f33bcd22322ba04e3951cd484843788c2bf5
(cherry picked from commit
5567c11b9157eec110c0631aa2bff5836631e868)
Brian Carlstrom [Thu, 4 Dec 2014 23:18:25 +0000 (23:18 +0000)]
am
8775cc33: am
c1bfaa22: Remove dex2oat watchdog warning
* commit '
8775cc33f0cab1a9bd866be0df9dbe4541ecbe0d':
Remove dex2oat watchdog warning
Brian Carlstrom [Thu, 4 Dec 2014 23:06:44 +0000 (23:06 +0000)]
am
c1bfaa22: Remove dex2oat watchdog warning
* commit '
c1bfaa22570b4f771ae1cd832201b01ec84e32c1':
Remove dex2oat watchdog warning
Mathieu Chartier [Thu, 4 Dec 2014 15:10:22 +0000 (15:10 +0000)]
am
25fda920: Remove method verification results right after compiling a method
* commit '
25fda92083d5b93b38cc1f6b12ac6a44d992d6a4':
Remove method verification results right after compiling a method
Andreas Gampe [Thu, 4 Dec 2014 15:10:16 +0000 (15:10 +0000)]
am
d97465c3: ART: Fix unclosed files in dex2oat
* commit '
d97465c3742cc3c82843665f2678b881de29854b':
ART: Fix unclosed files in dex2oat
Brian Carlstrom [Thu, 4 Dec 2014 06:29:37 +0000 (22:29 -0800)]
Remove dex2oat watchdog warning
The warning output is breaking vm-tests on some devices. It does not
seem to serve much of a purpose given that it does not go to logcat
and long running compiles can be identified by the time summary
printed at the end of dex2oat.
Bug:
18609574
Change-Id: Ic4f3d118d99e4b307cbb7c4c2b57f05a003e092e
Mathieu Chartier [Thu, 4 Dec 2014 01:38:22 +0000 (17:38 -0800)]
Remove method verification results right after compiling a method
This saves memory since it allows the code arrays from methods
compiled in future methods to use the ram we just freed from the
verification results.
GmsCore.apk:
Before: dex2oat took 77.383s (threads: 2) arena alloc=6MB java alloc=30MB native alloc=77MB free=13KB
After: dex2oat took 72.180s (threads: 2) arena alloc=6MB java alloc=30MB native alloc=60MB free=13KB
Bug:
18596910
Change-Id: I5d6df380e4fe58751a2b304202083f4d30b33b7c
Andreas Gampe [Wed, 3 Dec 2014 22:28:02 +0000 (14:28 -0800)]
ART: Fix unclosed files in dex2oat
Under some error conditions files are not closed, and the close guard
will complain.
Bug:
18603475
Change-Id: I7155e3f4f6231844edd375b9302ecf1ba8079950
Mathieu Chartier [Wed, 3 Dec 2014 02:48:40 +0000 (02:48 +0000)]
Mathieu Chartier [Wed, 3 Dec 2014 02:23:21 +0000 (18:23 -0800)]
Fix mac build
Macs don't have malloc.h, hopefully this fixes the build.
Change-Id: Id7600ea79197f36d3dfb5e7d589ac2f6ee325f85
Mathieu Chartier [Wed, 3 Dec 2014 02:17:20 +0000 (02:17 +0000)]
am
3029df6d: Print memory usage in dex2oat shutdown
* commit '
3029df6d212894647ba0e5c23443c40912c6ecc8':
Print memory usage in dex2oat shutdown
Mathieu Chartier [Tue, 2 Dec 2014 23:43:48 +0000 (15:43 -0800)]
Print memory usage in dex2oat shutdown
Example on mako:
I/dex2oat (31071): dex2oat took 31.195s (threads: 2) arena alloc=1013KB java alloc=13MB native alloc=32MB free=1490KB
Bug:
18069309
Change-Id: I08eac00842be35d4e659bddc8513f2062be725c9
Vladimir Marko [Tue, 2 Dec 2014 16:57:23 +0000 (16:57 +0000)]
am
99f50c41: Merge "Quick: Fix neg-long on ARM for overlapping regs." into lmp-mr1-dev
* commit '
99f50c41b99504f2aaeea3b967c41301482749ac':
Quick: Fix neg-long on ARM for overlapping regs.
Vladimir Marko [Tue, 2 Dec 2014 16:50:54 +0000 (16:50 +0000)]
Merge "Quick: Fix neg-long on ARM for overlapping regs." into lmp-mr1-dev
Sebastien Hertz [Tue, 2 Dec 2014 16:47:24 +0000 (16:47 +0000)]
am
be413415: Merge "JDWP: only deoptimize when it is required" into lmp-mr1-dev
* commit '
be41341596c6f2bfa6ef3bdf46b263e5e8afcbbe':
JDWP: only deoptimize when it is required
Sebastien Hertz [Tue, 2 Dec 2014 16:39:09 +0000 (16:39 +0000)]
Merge "JDWP: only deoptimize when it is required" into lmp-mr1-dev
Mathieu Chartier [Tue, 2 Dec 2014 01:04:40 +0000 (01:04 +0000)]
am
4f4ddd5f: Merge "Try normal allocation if large object allocation fails" into lmp-mr1-dev
* commit '
4f4ddd5fe83ad7e070ad72a0513b2863a511511e':
Try normal allocation if large object allocation fails
Mathieu Chartier [Tue, 2 Dec 2014 00:57:21 +0000 (00:57 +0000)]
Merge "Try normal allocation if large object allocation fails" into lmp-mr1-dev
Mathieu Chartier [Tue, 2 Dec 2014 00:54:59 +0000 (00:54 +0000)]
am
d59c1700: Fix growth limit / footprint limit problems
* commit '
d59c170057dcc213a858652abc71eec710898a41':
Fix growth limit / footprint limit problems
Mathieu Chartier [Mon, 1 Dec 2014 23:00:27 +0000 (15:00 -0800)]
Try normal allocation if large object allocation fails
If a large object allocation fails, we now try the normal allocators.
Bug:
18504942
Change-Id: I18b9759d6af885556941542c57fec584f18197f1
Mathieu Chartier [Mon, 1 Dec 2014 21:40:48 +0000 (13:40 -0800)]
Fix growth limit / footprint limit problems
We now properly clear the growth limit of all the spaces when
ClearGrowthLimit is called. Previously we didn't clear the growth
limit of the background space.
This wasn't caught by heap test since it only manifested itself
when we had a zygote space.
Bug:
18504942
Change-Id: Ibb3d76cba54a45ef755d7e2ced8c2e16cd2996b0
Mathieu Chartier [Mon, 1 Dec 2014 19:30:29 +0000 (19:30 +0000)]
am
ea1c3d77: Set dex_cache_strings_ when we call Class::SetDexCache
* commit '
ea1c3d77b92b30ec527f2ca5bfe316a882b698e0':
Set dex_cache_strings_ when we call Class::SetDexCache
Mathieu Chartier [Mon, 1 Dec 2014 18:31:15 +0000 (10:31 -0800)]
Set dex_cache_strings_ when we call Class::SetDexCache
Ensures that these two variables never get out of sync. The error
was presumably related to not doing this for proxy classes. This
caused java code which was looking at the dex_cache_strings_ field
to incorrectly access a null array.
Bug:
18548887
Change-Id: If53c6ade3588b82a480d6674dfbd5caa2e5069fd
Vladimir Marko [Mon, 1 Dec 2014 16:48:48 +0000 (16:48 +0000)]
Quick: Fix neg-long on ARM for overlapping regs.
Bug:
18569347
(cherry picked from commit
2f340a843ea5b3413c901f8c2365243b68864468)
Change-Id: Icde3bfdd7c90d51548823ce1f81caf9484de2be5
Dmitriy Ivanov [Thu, 27 Nov 2014 18:21:14 +0000 (18:21 +0000)]
am
db6b8dc2: Merge "Disable stack mprotects when running on valgrind" into lmp-mr1-dev
* commit '
db6b8dc220d5c2372365a971c41b83d7874f9d6a':
Disable stack mprotects when running on valgrind
Dmitriy Ivanov [Thu, 27 Nov 2014 18:16:27 +0000 (18:16 +0000)]
Merge "Disable stack mprotects when running on valgrind" into lmp-mr1-dev
Mathieu Chartier [Thu, 27 Nov 2014 01:40:55 +0000 (01:40 +0000)]
Revert "Revert "Add missing thread state change to kWaitingForCheckPointsToRun""
This reverts commit
12e29285346a68e46444a5a7b87608475c1147ac.
Change-Id: I24e42309f19f781f3159cb715e8a64d6aea4b464
Mathieu Chartier [Thu, 27 Nov 2014 01:38:49 +0000 (01:38 +0000)]
Revert "Add missing thread state change to kWaitingForCheckPointsToRun"
This reverts commit
20e11a7956eaebf97d7ed44bbca1c42948b3a580.
Change-Id: Ifde51cba3f02c64f2dac5bd95ddaf474f15e4f86
Mathieu Chartier [Wed, 26 Nov 2014 23:37:52 +0000 (15:37 -0800)]
Add missing thread state change to kWaitingForCheckPointsToRun
Fixes tests
Change-Id: I4907d83ee1e9bcd2f6a823e402950d8051d4556a
Mathieu Chartier [Wed, 26 Nov 2014 19:21:15 +0000 (11:21 -0800)]
Trim reference tables when we trim the heap
Before:
System server:
virtual shared shared private private
size RSS PSS clean dirty clean dirty # object
2200 300 229 0 80 0 220 77 /dev/ashmem/dalvik-indirect ref table (deleted)
Location:
1896 128 102 0 28 0 100 39 /dev/ashmem/dalvik-indirect ref table (deleted)
After:
virtual shared shared private private
size RSS PSS clean dirty clean dirty # object
System server:
2216 64 64 0 0 0 64 79 /dev/ashmem/dalvik-indirect ref table (deleted)
Location:
2120 48 48 0 0 0 48 67 /dev/ashmem/dalvik-indirect ref table (deleted)
No pause time regression measured in memalloc test.
Bug:
17643507
Change-Id: I32d3e64cdcf8dd2f7aea509c81631597bbb9b392
Mathieu Chartier [Wed, 26 Nov 2014 02:36:01 +0000 (18:36 -0800)]
Add a way to change the IMT size
Useful for having smaller imts on memory constrainted devices.
Setting ART_IMT_SIZE=x will change the size of the IMT.
Bug:
17643507
Change-Id: Ia6bcfcb067c7e21c7f3003cf6254e4b2666ef169
Dmitriy Ivanov [Wed, 26 Nov 2014 18:30:11 +0000 (10:30 -0800)]
Disable stack mprotects when running on valgrind
Bug:
18155388
Change-Id: I17d7e3c707e83b864b0394ebbfb2438021faf76f
Mathieu Chartier [Tue, 25 Nov 2014 23:32:03 +0000 (23:32 +0000)]
Merge "Move dex cache strings from ArtMethod -> Class" into lmp-mr1-dev
buzbee [Tue, 25 Nov 2014 23:04:39 +0000 (23:04 +0000)]
Merge "Quick compiler: handle embedded switch data." into lmp-mr1-dev
buzbee [Tue, 25 Nov 2014 22:39:38 +0000 (14:39 -0800)]
Quick compiler: handle embedded switch data.
Although switch data is generally placed at the end of a dex
file by dx, it can occur elsewhere (and does via obsfucators).
This CL fixes a parsing error related to embedded switch data by
ensuring valid dex instructions following the embedded data appear
in their own basic blocks.
b/
18524584
Change-Id: I815bb5ec939803f706f98beb3afbefc8b527f730
Mathieu Chartier [Tue, 25 Nov 2014 19:20:28 +0000 (11:20 -0800)]
Fix oatwriter code deduping
Now that the GC maps are part of the oat method header they need
to be checked in CodeOffsetsKeyComparator.
Bug:
18523556
Change-Id: I539a6e7216166342b22515c1e2cf831dad32e41e
Mathieu Chartier [Tue, 25 Nov 2014 02:29:54 +0000 (18:29 -0800)]
Move dex cache strings from ArtMethod -> Class
Adds one load for const strings which are not direct.
Saves >= 60KB of memory avg per app.
Image size: -350KB.
Bug:
17643507
Change-Id: I2d1a3253d9de09682be9bc6b420a29513d592cc8
Sebastien Hertz [Mon, 17 Nov 2014 18:00:37 +0000 (19:00 +0100)]
JDWP: only deoptimize when it is required
We don't need to deoptimize anything when we forced the use of the
interpreter (-Xint). In this case, no compiled code is executed
(except native methods which are not concerned by deoptimization).
Therefore we even don't need to enable/disable deoptimization support
in instrumentation.
We also don't need to deoptimize a method that hasn't been compiled.
Since it will run with interpreter, there is no point deoptimizing
it. However this method may be inlined in a compiled caller method
so we still need to deoptimize everything in this case.
This CL updates breakpoint support by storing the required kind of
deoptimization for a particular method. There are 3 cases:
- kNothing: the method does not require deoptimization.
- kSelectiveDeoptimization: the method needs to be deoptimized.
- kFullDeoptimization: we must deoptimize everythinig.
When uninstalling a breakpoint, we need to do the reverse operation.
Also fixes the SanityCheckExistingBreakpoints function to control
breakpoints related to the given method only and adds extra verbose
ilogs when choosing the appropriate deoptimization kind.
Includes a partial cherry-pick of commit
87553c9fa1298ffb40127b2bb6413859fd3f79df to use method
ClassLinker::GetOatMethodQuickCodeFor.
Bug:
18407046
(cherry picked from commit
f3928794a10516e2ac0ffe2686a10891788d4b9c)
Change-Id: I50853cc5fc5c52650485785a1198d35ea0f7fb8e
Mathieu Chartier [Mon, 24 Nov 2014 18:31:19 +0000 (10:31 -0800)]
Fix failing tests
Forgot to fix these with other CL.
Change-Id: I5ac158ca0d312b601fbf1e12722fe271751c88f2
Mathieu Chartier [Sat, 22 Nov 2014 00:51:29 +0000 (16:51 -0800)]
Delete ArtMethod gc_map_ field
Moved the gc_map field from OatMethod to OatQuickMethodHeader.
Deleted the ArtMethod gc_map_ field.
Bug:
17643507
Change-Id: Ifa0470c3e4c2f8a319744464d94c6838b76b3d48
Mathieu Chartier [Thu, 20 Nov 2014 23:04:10 +0000 (15:04 -0800)]
Add fast string sharpening
String sharpening changes const strings to PC relative loads instead
of always going through the dex cache. This saves code size and
probably improves performance slightly.
Before:
49602992 system@framework@boot.oat
After:
49385904 system@framework@boot.oat
Pre-cursor to removing dex_cache_strings_ field from ArtMethod.
Bug:
17643507
Change-Id: I1787f48774631eee0accafeea257aa8d0e91e8d6
Mathieu Chartier [Fri, 21 Nov 2014 01:08:58 +0000 (17:08 -0800)]
Fix oatdump to use OatHeader pointer size
Bug:
18473190
Change-Id: If505b4f62105899f4f1257d3bccda3e6eb0dcd7c
Hiroshi Yamauchi [Thu, 20 Nov 2014 18:08:31 +0000 (10:08 -0800)]
Tune rosalloc buffer sizes.
We now use one-page buffers for size brackets 4-7, instead of two-page
buffers, and the first 8 size brackets for thread-local allocations,
instead of 11.
No slowdown observed with MemAllocTest, EvaluateAndApplyChanges, and
BinaryTrees.
Bug:
18377775
Change-Id: Ie1bb46bcf5d3729197e48e26a27da4cc39dd807e
Igor Murashkin [Thu, 20 Nov 2014 00:06:33 +0000 (00:06 +0000)]
Merge "dex2oat: Pack likely-dirty objects together when generating the boot image" into lmp-mr1-dev
Igor Murashkin [Fri, 14 Nov 2014 23:01:59 +0000 (15:01 -0800)]
dex2oat: Pack likely-dirty objects together when generating the boot image
This introduces a new algorithm into image writer which "bins" objects
by how likely they are to be dirtied at runtime. Objects in the same bin
are placed contiguously in memory (i.e. into the same page). We try to
tune the bin selection based on how clean or how dirty the object will
likely be at runtime.
As-is, this saves about 150KB per-process (private-dirty pages) and 700KB in
zygote (shared-dirty).
There is still about 800KB of objects that are clean but located in
dirty pages, so with more analysis we can tune the bin selection and get
even more memory savings.
Bug:
17611661
Change-Id: Ia1455e4c56ffd0a36ae2a723d35b7e06502980f7