History log of /art/runtime/arch/arm/quick_entrypoints_arm.S
Revision Date Author Comments
2d857af288e020909a17dee1cb2b6e227a527d67 18-Jul-2016 Mathieu Chartier <mathieuc@google.com> Do allocation fence before pushing on allocation stack

Heap::VisitObjects relies on having valid classes for objects in
the allocation stack. If the writes reorder, the thread calling
VisitObjects could see the free list pointer instead of the class
of the object. I believe this is causing crashes in VisitObjects.

Bug: 28790624

Test: Volantis booted

(cherry picked from commit 011dc2c4b9f3a064cba801679aedd3251fe191e3)

Change-Id: Ib620acbcd641ccd59fea9a66f5587c5026110a22
a048ca8e0ff6d0e79d070decf9fa2331e2d13824 08-Jun-2016 Nicolas Geoffray <ngeoffray@google.com> Fix FOUR_ARG_DOWNCALL assembly stubs on arm and x86.

They were creating a stack that the runtime did not understand.

bug:28348339

(cherry picked from commit 0f838aa279a296b5f14c231065bb2f96b02d9caf)

Change-Id: Iecaa274512b42ad76fccb48c11a0076d0292c240
fc6898769ae1ef91ec3e41c0a273401213cb82cd 26-Apr-2016 Andreas Gampe <agampe@google.com> ART: Log all monitor operations to systrace

Add a VLOG option ("-verbose:systrace-locks") to log all monitor
operations to systrace. This requires non-fastpath thread
entrypoints, and ATRACE tags for locking and unlocking.

Do a bit of cleanup to the entrypoint initialization to share
common setup.

Bug: 28423466
Change-Id: Ie67e4aa946ec15f8fcf8cb7134c5d3cff0119ab3
59028d90d51a800bcea8be354d77d7be924da3a0 29-Mar-2016 Goran Jakovljevic <Goran.Jakovljevic@imgtec.com> MIPS: Improving art_quick_imt_conflict_trampoline

This is fixing stub_test for MIPS32 and MIPS64. This is follow up
change for Ie74d1c77cf73d451a1142bdc5e3683f9f84bb4e7.

Change-Id: I3c53ef690aff49d7cf9ad3de3aaed9a3d2e1c6b9
796d63050a18f263b93ea34951a61deaecab3422 13-Mar-2016 Nicolas Geoffray <ngeoffray@google.com> Add an ImtConflictTable to better resolve IMT conflicts.

- Attach a ImtConflictTable to conflict runtime ArtMethod.
- Initially 0, a new one will be created at the first hit of
the conflict method.
- If the assembly code does not find a target method in the table,
we will create a new one again, copying the data from the previous
table and adding the new mapping.

Implemented for arm/arm64/x86/x64.

bug:27556801
bug:24769046

Change-Id: Ie74d1c77cf73d451a1142bdc5e3683f9f84bb4e7
d72945c6b18831630af8755fcf041f5a59c82cae 16-Mar-2016 Hiroshi Yamauchi <yamauchi@google.com> Revert "Revert "Assembly TLAB allocation fast path for arm64.""

This reverts commit 52fa2c698b995c21940f366cf3a44204ddf4f8e9.

Fix the mvn instructions.

Bug: 9986565
Change-Id: Ib7b2023cd54c57131442e1de85c64f40b818313d
52fa2c698b995c21940f366cf3a44204ddf4f8e9 16-Mar-2016 Nicolas Geoffray <ngeoffray@google.com> Revert "Assembly TLAB allocation fast path for arm64."

Assembly code does not compile
Bug: 9986565

This reverts commit b7e52b02a82c69e59c88f06945fb21672dfe9923.

Change-Id: I80de1bcd6270e2d76f79cb708811a41c039ea5bb
563cf332e4560601207b2d039b42f6b0fdff8ce8 16-Mar-2016 Nicolas Geoffray <ngeoffray@google.com> Revert "Tentative fix for build breakage with read barriers."

This reverts commit 448f21e2c1cb43b193736598719979ebd2aed0b0.

Change-Id: Id821effa06697b1464581bcd9c8f34cd0ea69896
448f21e2c1cb43b193736598719979ebd2aed0b0 16-Mar-2016 Nicolas Geoffray <ngeoffray@google.com> Tentative fix for build breakage with read barriers.

Change-Id: I490821357525bdeb19c330f350635bd645f8ab53
b7e52b02a82c69e59c88f06945fb21672dfe9923 10-Mar-2016 Hiroshi Yamauchi <yamauchi@google.com> Assembly TLAB allocation fast path for arm64.

This is the arm64 version of CL 187537.

Speedup (GSS GC with TLAB on N9):
BinaryTrees: 591 -> 493 ms (-17%)
MemAllocTest: 792 -> 755 ms (-5%)

Bug: 9986565

Change-Id: Icdad28cab0fd835679c640b7eae59b33ac2d6654
10d4c08c0ea9df0a85a11e1c77974df24078c0ec 24-Feb-2016 Hiroshi Yamauchi <yamauchi@google.com> Assembly region TLAB allocation fast path for arm.

This is for the CC collector.

Share the common fast path code with the tlab fast path code.

Speedup (on N5):
BinaryTrees: 2291 -> 902 ms (-60%)
MemAllocTest: 2137 -> 1845 ms (-14%)

Bug: 9986565
Bug: 12687968

Change-Id: Ica63094ec2f85eaa4fd04d202a20090399275d85
f969a209c30e3af636342d2fb7851d82a2529bf7 09-Mar-2016 Roland Levillain <rpl@google.com> Fix and enable java.lang.StringFactory intrinsics.

The following intrinsics were not considered by the
intrinsics recognizer:
- StringNewStringFromBytes
- StringNewStringFromChars
- StringNewStringFromString
This CL enables them and add tests for them.

This CL also:
- Fixes the locations of the ARM64 & MIPS64
StringNewStringFromString intrinsics.
- Fixes the definitions of the FOUR_ARG_DOWNCALL macros on
ARM and x86, which are used to implement the
art_quick_alloc_string_from_bytes* runtime entry points.
- Fixes PC info (stack maps) recording in the
StringNewStringFromBytes, StringNewStringFromChars and
StringNewStringFromString ARM, ARM64 & MIPS64 intrinsics.

Bug: 27425743
Change-Id: I38c00d3f0b2e6b64f7d3fe9146743493bef9e45c
7e1ce285c3c2cbd8d97c744699c2f2347fa7487b 12-Dec-2015 Hiroshi Yamauchi <yamauchi@google.com> Assembly TLAB allocation fast path for arm.

Speedup (GSS GC with TLAB on N5):
BinaryTrees: 1872 -> 796 ms (-57%)
MemAllocTest: 2522 -> 2219 ms (-12%)

Bug: 9986565
Change-Id: Icb9d1259461f3abe83a4a82c8aff911937eaf57d
d9994f069dfeaa32ba929ca78816b5b83e2a4134 11-Feb-2016 Nicolas Geoffray <ngeoffray@google.com> Re-enable OSR.

Fixes two bugs:
- Dealing with proxy methods, which the compiler and code cache
does not handle.
- Dealing with phi types, that may have been speculatively optimized
but do not hold once jumping to the compiled code.

Change-Id: I7dcd9976ef7b12128fff95d2b7ed3e69cc42e90a
d9bc433a89c41a255d1b669d075f802597839bdc 06-Feb-2016 Nicolas Geoffray <ngeoffray@google.com> Point fixes after OSR change.

- ldr -> ldrb in osr stub for arm32
- disable 570-checker-osr for tracing
- don't osr proxy methods.

Change-Id: I9c713c9b7eab86ca9beb75f228fb3b76185621ef
b331febbab8e916680faba722cc84b66b84218a3 05-Feb-2016 Nicolas Geoffray <ngeoffray@google.com> Revert "Revert "Implement on-stack replacement for arm/arm64/x86/x86_64.""

This reverts commit bd89a5c556324062b7d841843b039392e84cfaf4.

Change-Id: I08d190431520baa7fcec8fbdb444519f25ac8d44
bd89a5c556324062b7d841843b039392e84cfaf4 05-Feb-2016 David Brazdil <dbrazdil@google.com> Revert "Implement on-stack replacement for arm/arm64/x86/x86_64."

DCHECK whether loop headers are covered fails.

This reverts commit 891bc286963892ed96134ca1adb7822737af9710.

Change-Id: I0f9a90630b014b16d20ba1dfba31ce63e6648021
891bc286963892ed96134ca1adb7822737af9710 29-Jan-2016 Nicolas Geoffray <ngeoffray@google.com> Implement on-stack replacement for arm/arm64/x86/x86_64.

High-level overview:
- osr_method_threshold is used to know when to compile a method
in osr mode (-> treat all loops as irreducible).
- branch instructions in the compiler query whether they can
jump to an osr method.
- An osr entry point is found through the stack maps: if a stack
map is duplicated in the CodeInfo, it is an osr entry point.

Change-Id: Ifb39338cd281e2c7eccce67f4e18d46428be71e4
a7a4759946d9f11c88dc108b2b6a9518ce9c1e18 24-Nov-2015 Nicolas Geoffray <ngeoffray@google.com> Revert "lambda: Add support for invoke-interface for boxed innate lambdas"

955-lambda is flaky

Bug: 24618608
Bug: 25107649

This reverts commit 457e874459ae638145cab6d572e34d48480e39d2.

(cherry picked from commit 3a0909248e04b22c3981cbf617bc2502ed5b6380)

Change-Id: I24884344d21d7a4262e53e3f5dba57032687ddb7
3a0909248e04b22c3981cbf617bc2502ed5b6380 24-Nov-2015 Nicolas Geoffray <ngeoffray@google.com> Revert "lambda: Add support for invoke-interface for boxed innate lambdas"

955-lambda is flaky

Bug: 24618608
Bug: 25107649

This reverts commit 457e874459ae638145cab6d572e34d48480e39d2.

Change-Id: I24884344d21d7a4262e53e3f5dba57032687ddb7
457e874459ae638145cab6d572e34d48480e39d2 23-Oct-2015 Igor Murashkin <iam@google.com> lambda: Add support for invoke-interface for boxed innate lambdas

Lambda closures created with the 'create-lambda' instruction
(termed "innate lambdas") can be turned into an object with 'box-lambda'.

This CL enables support for those kinds of lambdas to work with
'invoke-interface' by generating a proxy class for the lambda.

Note: MIPS32/64 support not included.

Bug: 24618608
Bug: 25107649
Change-Id: Ic8f1bb66ebeaed4097e758a50becf1cff6ccaefb
3c183cec1fb337ed0247ba500c6949063072f565 31-Jul-2015 Przemyslaw Szczepaniak <pszczepaniak@google.com> Fix asm for String#indexOf/compareTo intrinsics

Fixed code for arm arch, it's still broken
on remaining architectures (will be done soon in
following CLs).

OpenJdk string lacks offset and length fields and requires
user to fetch the length from array object.

Change-Id: I682911e4ee72d9597e8a9735ac414c837569eb8e
dc412b6f49a65774b7af654f65cbff619cb7d85a 15-Oct-2015 Hiroshi Yamauchi <yamauchi@google.com> Revert "Revert "Implement rosalloc fast path in assembly for 32 bit arm.""

With a heap poisoning fix.

This reverts commit cf91c7d973f3b2f491abc61d47c141782c96d46e.

Bug: 9986565
Change-Id: Ia72edbde65ef6119e1931a77cc4c595a0b80ce31
cf91c7d973f3b2f491abc61d47c141782c96d46e 15-Oct-2015 Nicolas Geoffray <ngeoffray@google.com> Revert "Implement rosalloc fast path in assembly for 32 bit arm."

Tentative. Looks like heap poisoning breaks with this change.

bug: 9986565

This reverts commit e6316940db61faead36f9642cce137d41fc8f606.

Change-Id: I5c63758221464fe319315f40ae79c656048faed0
e6316940db61faead36f9642cce137d41fc8f606 08-Oct-2015 Hiroshi Yamauchi <yamauchi@google.com> Implement rosalloc fast path in assembly for 32 bit arm.

Measurements (N5, ms)
BinaryTrees: 1702 -> 987 (-42%)
MemAllocTest: 2480 -> 2270 (-8%)

Bug: 9986565

Change-Id: I460af3626ad724078463d27cf74a94b7ff7468c5
e460d1df1f789c7c8bb97024a8efbd713ac175e9 29-Sep-2015 Calin Juravle <calin@google.com> Revert "Revert "Support unresolved fields in optimizing"

The CL also changes the calling convetion for 64bit static field set
to use kArg2 instead of kArg1. This allows optimizing to keep
the asumptions:
- arm pairs are always of form (even_reg, odd_reg)
- ecx_edx is not used as a register on x86.

This reverts commit e6f49b47b6a4dc9c7684e4483757872cfc7ff1a1.

Change-Id: I93159917565824084abc96775f31be1a4249f2f3
639bdd13993644a267f177f8f5936496bda65e2b 03-Jun-2015 Andreas Gampe <agampe@google.com> ART: Single-frame deopt

Add deoptimization of a single frame. Works by removing the managed
code frame and jumping into the quick-to-interpreter bridge, and
the bridge understanding a stored ShadowFrame.

We need a separate fixup pass. For x86, we leave the return address
on the stack so we don't need to push it there.

Bug: 21611912
Change-Id: I06625685ced8b054244f8685ab50b238a705b9d2
0747466fca310eedea5fc49e37d54f240a0b3c0f 25-Aug-2015 Sebastien Hertz <shertz@google.com> Revert "Revert "Fix deoptimization with pending exception""

This reverts commit 6e2d5747d00697a25251d25dd33b953e54709507.

Fixes the deoptimization path from compiled code (generated by the
Optimizing compiler) by adding wrapper artDeoptimizeFromCompiledCode.
This wrapper, called through the matching assembler stub
art_quick_deoptimize_from_compiled_code, pushes the deoptimization
context just before deoptimizing the stack.

Bug: 23371176
Bug: 19944235
Change-Id: Ia7082656998aebdd0157438f7e6504c120e10d3e
6306921722283d2b0f8aac01883ad83215d6e864 22-Aug-2015 Man Cao <manc@google.com> Add a missing reader barrier in entrypoint stub

Also refactored some comments.

Change-Id: I5c50f487bf9d71f1be5f6c8814bf039993fc1267
1aee900d5a0b3a8d78725a7551356bda0d8554e1 15-Jul-2015 Man Cao <manc@google.com> Add read barrier support to the entrypoints.

Also remove "THIS_LOAD_REQUIRES_READ_BARRIER" since reading
an ArtMethod* no longer needs read barrier.

stub_test should also work with read barriers now.

Change-Id: I3fba18042de2f867a18dbdc38519986212bd9769
76914b0fc848fe0deed566af2255db7c183deaf2 18-Jul-2015 Andreas Gampe <agampe@google.com> ART: Fix arm32 quick_invoke_stub CFI

Follow-up to 4808846b2a8647a448aaa05d561a4f60b190196b.

Change-Id: I534ba39a4f59eaea9cfec8e81c944675284fc427
3031c8da0c5009183f770b005c245f9bf2a4d01b 14-Jul-2015 Andreas Gampe <agampe@google.com> ART: Remove art_quick_invoke_interface_trampoline

The function has only been used by the IMT conflict resolution
trampoline for a while. Merge the two, which saves a branch.

Change-Id: I2f8c9204adf839ddc5459cc04e70d98f858110a1
3d1e0c971a5022cf3f7d02a45fdfd3381d5a8f3b 11-Jul-2015 Andreas Gampe <agampe@google.com> ART: Fix arm32 assembly stub CFI

Follow-up to 7ea6a170486d81b127e69673cd1020c4db628c93.

Change-Id: Ib6df28653374994c78cd5586f2381d36b74ca846
c89b047ed85cfabbdc79a7b76be413fb366b501a 24-Jun-2015 Andreas Gampe <agampe@google.com> ART: Fix arm32 instrumentation exit stub

Properly store, pass and restore floating point result.

Bug: 22047833

(cherry picked from commit 844fb67a8b5638c4e195dbbe510dc1626824a16c)

Change-Id: If5d9efbe63334c9b6353f76ce6e4fe519602482a
844fb67a8b5638c4e195dbbe510dc1626824a16c 24-Jun-2015 Andreas Gampe <agampe@google.com> ART: Fix arm32 instrumentation exit stub

Properly store, pass and restore floating point result.

Bug: 22047833
Change-Id: If5d9efbe63334c9b6353f76ce6e4fe519602482a
bfa5eb6e8d15ea73a36f8df449630f285a91e995 30-May-2015 Hiroshi Yamauchi <yamauchi@google.com> Add heap poisoning support to the entrypoints.

In preparation for full compiler/managed-code support.

Enable stub_test with heap poisoning.

Bug: 12687968
Change-Id: I79fc54ce6386c0a1eb9621759bb4cc23bc393a75
5b3ee56cd63ee9e3c70c0412d044b81ab9c94513 14-Apr-2015 Roland Levillain <rpl@google.com> Delegate long-to-float type conversions to the runtime on ARM.

On ARM, translate long-to-float type conversions (from both
Quick and Optimizing) as calls to the runtime routine
art_l2f, instead of generating ad hoc code, so as to improve
the precision of the conversions.

Bug: 20413424
Change-Id: I8c414ee1c6f4ff1f32ee78f75734cfd3cf579f71
3d21bdf8894e780d349c481e5c9e29fe1556051c 22-Apr-2015 Mathieu Chartier <mathieuc@google.com> Move mirror::ArtMethod to native

Optimizing + quick tests are passing, devices boot.

TODO: Test and fix bugs in mips64.

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

Bug: 19264997

(cherry picked from commit e401d146407d61eeb99f8d6176b2ac13c4df1e33)

Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d

Fix some ArtMethod related bugs

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

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

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

TODO: Fix JDWP tests.

Bug: 19264997

Change-Id: I7c55f69c61d1b45351fd0dc7185ffe5efad82bd3

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

Bug: 19264997
Change-Id: Ief45cdd4bae5a43fc8bfdfa7cf744e2c57529457

Fix JDWP tests after ArtMethod change

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

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

Bug: 19264997
Change-Id: I363e293796848c3ec491c963813f62d868da44d2

Fix accidental IMT and root marking regression

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

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

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

Bug: 19264997
Change-Id: I4333e80a8268c2ed1284f87f25b9f113d4f2c7e0

Fix bogus image test assert

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

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

Bug: 19264997
Change-Id: I7359f1f73ae3df60c5147245935a24431c04808a

[MIPS64] Fix art_quick_invoke_stub argument offsets.

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

This fixes mips64 boot.

Bug: 19264997
Change-Id: I47198d5f39a4caab30b3b77479d5eedaad5006ab
e401d146407d61eeb99f8d6176b2ac13c4df1e33 22-Apr-2015 Mathieu Chartier <mathieuc@google.com> Move mirror::ArtMethod to native

Optimizing + quick tests are passing, devices boot.

TODO: Test and fix bugs in mips64.

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

Bug: 19264997
Change-Id: I622469a0cfa0e7082a2119f3d6a9491eb61e3f3d
8ea18d0f066f63fa4e5d154f14327468bf288e2b 26-May-2015 Nicolas Geoffray <ngeoffray@google.com> Pass the dex method index directly to interface trampoline.

This avoids computing the dex pc and re-finding the method
index again. I have kept the code for kDebugBuild.

Change-Id: Icd60e0deade755e32b54021c0875b1af592b8c3e
7ea6a170486d81b127e69673cd1020c4db628c93 19-May-2015 Nicolas Geoffray <ngeoffray@google.com> Don't hardcode the location of the caller.

This is to avoid shooting ourselves in the foot when
dealing with inlined frames. Instead, use common methods
for fetching the caller and its dex pc.

Change-Id: I3467a7b50cf163022d332e80356f0aab747de252
848f70a3d73833fc1bf3032a9ff6812e429661d9 15-Jan-2014 Jeff Hao <jeffhao@google.com> Replace String CharArray with internal uint16_t array.

Summary of high level changes:
- Adds compiler inliner support to identify string init methods
- Adds compiler support (quick & optimizing) with new invoke code path
that calls method off the thread pointer
- Adds thread entrypoints for all string init methods
- Adds map to verifier to log when receiver of string init has been
copied to other registers. used by compiler and interpreter

Change-Id: I797b992a8feb566f9ad73060011ab6f51eb7ce01
5ea536aa4a6414db01beaf6f8bd8cb9adc5cfc92 20-Apr-2015 Vladimir Marko <vmarko@google.com> Remove ArtMethod* parameter from dex cache entry points.

Load the ArtMethod* using an optimized stack walk instead.
This reduces the size of the generated code.

Three of the entry points are called only from a slow-path
and the fourth (InitializeTypeAndVerifyAccess) is rare and
already slow enough that the one or two extra loads
(depending on whether we already have the ArtMethod* in a
register) are insignificant. And as we're starting to use
PC-relative addressing of the dex cache arrays (already
done by Quick for the boot image), having the ArtMethod* in
a register becomes less likely anyway.

Change-Id: Ib19b9d204e355e13bf386662a8b158178bf8ad28
2cebb24bfc3247d3e9be138a3350106737455918 22-Apr-2015 Mathieu Chartier <mathieuc@google.com> Replace NULL with nullptr

Also fixed some lines that were too long, and a few other minor
details.

Change-Id: I6efba5fb6e03eb5d0a300fddb2a75bf8e2f175cb
e15ea086439b41a805d164d2beb07b4ba96aaa97 10-Feb-2015 Hiroshi Yamauchi <yamauchi@google.com> Reserve bits in the lock word for read barriers.

This prepares for the CC collector to use the standard object header
model by storing the read barrier state in the lock word.

Bug: 19355854
Bug: 12687968
Change-Id: Ia7585662dd2cebf0479a3e74f734afe5059fb70f
126d65952a03b3e44d5021208673c01920a982a4 03-Mar-2015 Nicolas Geoffray <ngeoffray@google.com> Fix generic JNI stubs to not discard the Java native frame.

Change-Id: Ic856b442fdde5ce91673fc5856eb0dfc84c75d28
1cc7dbabd03e0a6c09d68161417a21bd6f9df371 18-Dec-2014 Andreas Gampe <agampe@google.com> ART: Reorder entrypoint argument order

Shuffle the ArtMethod* referrer backwards for easier removal.

Clean up ARM & MIPS assembly code.

Change some macros to make future changes easier.

Change-Id: Ie2862b68bd6e519438e83eecd9e1611df51d7945
4808846b2a8647a448aaa05d561a4f60b190196b 12-Dec-2014 Nicolas Geoffray <ngeoffray@google.com> Save all registers in native to Java stubs.

This will make things more friendly when experimenting with the
number of callee saves in optimizing.

Change-Id: Iefd9a2da329a420eb69fc2fa9e91c06bbda30cdb
d0a0b3e189e6f46d410d61dab4d0cce113be41d5 31-Oct-2014 Christopher Ferris <cferris@google.com> Fix arm unwind data for art code.

Bug: 17392751
Change-Id: Ic85d4468b0f931aa9e38dee12d466a1e04ebf944
2d7210188805292e463be4bcf7a133b654d7e0ea 10-Nov-2014 Mathieu Chartier <mathieuc@google.com> Change 64 bit ArtMethod fields to be pointer sized

Changed the 64 bit entrypoint and gc map fields in ArtMethod to be
pointer sized. This saves a large amount of memory on 32 bit systems.
Reduces ArtMethod size by 16 bytes on 32 bit.

Total number of ArtMethod on low memory mako: 169957
Image size: 49203 methods -> 787248 image size reduction.
Zygote space size: 1070 methods -> 17120 size reduction.
App methods: ~120k -> 2 MB savings.

Savings per app on low memory mako: 125K+ per app
(less active apps -> more image methods per app).

Savings depend on how often the shared methods are on dirty pages vs
shared.

TODO in another CL, delete gc map field from ArtMethod since we
should be able to get it from the Oat method header.

Bug: 17643507

Change-Id: Ie9508f05907a9f693882d4d32a564460bf273ee8

(cherry picked from commit e832e64a7e82d7f72aedbd7d798fb929d458ee8f)
e832e64a7e82d7f72aedbd7d798fb929d458ee8f 10-Nov-2014 Mathieu Chartier <mathieuc@google.com> Change 64 bit ArtMethod fields to be pointer sized

Changed the 64 bit entrypoint and gc map fields in ArtMethod to be
pointer sized. This saves a large amount of memory on 32 bit systems.
Reduces ArtMethod size by 16 bytes on 32 bit.

Total number of ArtMethod on low memory mako: 169957
Image size: 49203 methods -> 787248 image size reduction.
Zygote space size: 1070 methods -> 17120 size reduction.
App methods: ~120k -> 2 MB savings.

Savings per app on low memory mako: 125K+ per app
(less active apps -> more image methods per app).

Savings depend on how often the shared methods are on dirty pages vs
shared.

TODO in another CL, delete gc map field from ArtMethod since we
should be able to get it from the Oat method header.

Bug: 17643507

Change-Id: Ie9508f05907a9f693882d4d32a564460bf273ee8
5667fdbb6e441dee7534ade18b628ed396daf593 23-Oct-2014 Zheng Xu <zheng.xu@arm.com> ARM: Use hardfp calling convention between java to java call.

This patch default to use hardfp calling convention. Softfp can be enabled
by setting kArm32QuickCodeUseSoftFloat to true.

We get about -1 ~ +5% performance improvement with different benchmark
tests. Hopefully, we should be able to get more performance by address the left
TODOs, as some part of the code takes the original assumption which is not
optimal.

DONE:
1. Interpreter to quick code
2. Quick code to interpreter
3. Transition assembly and callee-saves
4. Trampoline(generic jni, resolution, invoke with access check and etc.)
5. Pass fp arg reg following aapcs(gpr and stack do not follow aapcs)
6. Quick helper assembly routines to handle ABI differences
7. Quick code method entry
8. Quick code method invocation
9. JNI compiler

TODO:
10. Rework ArgMap, FlushIn, GenDalvikArgs and affected common code.
11. Rework CallRuntimeHelperXXX().

Change-Id: I9965d8a007f4829f2560b63bcbbde271bdcf6ec2
1d8cdbc5202378a5f1a4b3a1fba610675ed4dcd5 23-Sep-2014 Ian Rogers <irogers@google.com> Refactor quick entrypoints

Remove FinishCalleeSaveFrameSetup.
Assembly routines write down anchor into TLS as well as placing runtime
method in callee save frame.
Simplify artSet64InstanceFromCode by not computing the referrer from the
stack in the C++ code.
Move assembly offset tests next to constant declaration and tidy arch_test.

Change-Id: Iededeebc05e54a1e2bb7bb3572b8ba012cffa1c8
677cd61ad05d993c4d3b22656675874f06d6aabc 15-Oct-2014 Ian Rogers <irogers@google.com> Make ART compile with GCC -O0 again.

Tidy up InstructionSetFeatures so that it has a type hierarchy dependent on
architecture.
Add to instruction_set_test to warn when InstructionSetFeatures don't agree
with ones from system properties, AT_HWCAP and /proc/cpuinfo.
Clean-up class linker entry point logic to not return entry points but to
test whether the passed code is the particular entrypoint. This works around
image trampolines that replicate entrypoints.
Bug: 17993736

(cherry picked from commit 6f3dbbadf4ce66982eb3d400e0a74cb73eb034f3)

Change-Id: I3e7595f437db4828072589d475a5453b7f31003e
6f3dbbadf4ce66982eb3d400e0a74cb73eb034f3 15-Oct-2014 Ian Rogers <irogers@google.com> Make ART compile with GCC -O0 again.

Tidy up InstructionSetFeatures so that it has a type hierarchy dependent on
architecture.
Add to instruction_set_test to warn when InstructionSetFeatures don't agree
with ones from system properties, AT_HWCAP and /proc/cpuinfo.
Clean-up class linker entry point logic to not return entry points but to
test whether the passed code is the particular entrypoint. This works around
image trampolines that replicate entrypoints.
Bug: 17993736

Change-Id: I5f4b49e88c3b02a79f9bee04f83395146ed7be23
832336b3c9eb892045a8de1bb12c9361112ca3c5 09-Oct-2014 Ian Rogers <irogers@google.com> Don't copy fill array data to quick literal pool.

Currently quick copies the fill array data from the dex file to the literal
pool. It then has to go through hoops to pass this PC relative address down
to out-of-line code. Instead, pass the offset of the table to the out-of-line
code and use the CodeItem data associated with the ArtMethod. This reduces
the size of oat code while greatly simplifying it.
Unify the FillArrayData implementation in quick, portable and the interpreters.

Change-Id: I9c6971cf46285fbf197856627368c0185fdc98ca
37f05ef45e0393de812d51261dc293240c17294d 17-Jul-2014 Fred Shih <ffred@google.com> Reduced memory usage of primitive fields smaller than 4-bytes

Reduced memory used by byte and boolean fields from 4 bytes down to a
single byte and shorts and chars down to two bytes. Fields are now
arranged as Reference followed by decreasing component sizes, with
fields shuffled forward as needed.

Bug: 8135266
Change-Id: I65eaf31ed27e5bd5ba0c7d4606454b720b074752
38bd1e1b8aa39bdc6e67c5dc205cc8d294d985c5 19-Aug-2014 Andreas Gampe <agampe@google.com> ART: Fix ARM invoke stub, run Generic JNI in jni_compiler_test

On devices which support it, run all jni compiler tests also with
the Generic JNI infrastructure.

Fix art_quick_invoke_stub for ARM32 to enforce 16B stack alignment.
As the native convention does not require as much, the previous
code would keep it unaligned.

Bug: 17107929

(cherry picked from commit 6e498695b60f1532d2264ec6badb1cd6e10ecaa9)

Change-Id: I1481500ff7c627ab4e5bfbfd7245099a639aa049
6e498695b60f1532d2264ec6badb1cd6e10ecaa9 19-Aug-2014 Andreas Gampe <agampe@google.com> ART: Fix ARM invoke stub, run Generic JNI in jni_compiler_test

On devices which support it, run all jni compiler tests also with
the Generic JNI infrastructure.

Fix art_quick_invoke_stub for ARM32 to enforce 16B stack alignment.
As the native convention does not require as much, the previous
code would keep it unaligned.

Bug: 17107929
Change-Id: Ibce423949846e447d2b0246d07973b6b717691ac
29b3841ad8c1c18ee7ddd2d8cab85806b3d62eaa 13-Aug-2014 Andreas Gampe <agampe@google.com> ART: Set default visibility to protected

Set default visibility of symbols to protected. This allows the
linker to optimize internal calls and helps avoid plt calls.

Make almost all assembly stubs hidden, as -fvisibility does not
seem to apply to them. Change the assembly tests accordingly. Also
allows to clean up previous hacks to avoid plt calls.

Bug: 16974467

(cherry picked from commit 235e77bd9f19e4faefda109be40f8744f3a66f40)

Change-Id: I9030dcf6116251f434f94a2b08e56e12085af652
ebee8de725d5fa83483642786b19ea453d865762 13-Aug-2014 Nicolas Geoffray <ngeoffray@google.com> Fix bugs in the x86 and arm versions of generic JNI.

Also fix the run script of 116-nodex2oat to use the non-prebuild
script for target.

Bug: 17000769

(cherry-picked from commit 54accbca0b549b1b1ad3ef09655dad438bc1e104)

Change-Id: I439fcd710fb8bb408f3288ff8fb34fef23890adb
b038ba66a166fb264ca121632f447712e0973b5b 14-Aug-2014 Dave Allison <dallison@google.com> Revert "Revert "Reduce stack usage for overflow checks""

Fixes stack protection issue.
Fixes mac build issue.

This reverts commit 83b1940e6482b9d8feba5c492507735686650ea5.

Change-Id: I7ba17252882b23a740bcda2ea94aacf398255406
4cf00ba324f5f6884059796a6ba41937f32e1844 14-Aug-2014 Dave Allison <dallison@google.com> Revert "Reduce stack usage for overflow checks"

This reverts commit 63c051a540e6dfc806f656b88ac3a63e99395429.

Change-Id: I282a048994fcd130fe73842b16c21680053c592f
03c9785a8a6d712775cf406c4371d0227c44148f 14-Aug-2014 Dave Allison <dallison@google.com> Revert "Revert "Reduce stack usage for overflow checks""

Fixes stack protection issue.
Fixes mac build issue.

This reverts commit 83b1940e6482b9d8feba5c492507735686650ea5.

Change-Id: I7ba17252882b23a740bcda2ea94aacf398255406
83b1940e6482b9d8feba5c492507735686650ea5 14-Aug-2014 Dave Allison <dallison@google.com> Revert "Reduce stack usage for overflow checks"

This reverts commit 63c051a540e6dfc806f656b88ac3a63e99395429.

Change-Id: I282a048994fcd130fe73842b16c21680053c592f
235e77bd9f19e4faefda109be40f8744f3a66f40 13-Aug-2014 Andreas Gampe <agampe@google.com> ART: Set default visibility to protected

Set default visibility of symbols to protected. This allows the
linker to optimize internal calls and helps avoid plt calls.

Make almost all assembly stubs hidden, as -fvisibility does not
seem to apply to them. Change the assembly tests accordingly. Also
allows to clean up previous hacks to avoid plt calls.

Bug: 16974467
Change-Id: I9030dcf6116251f434f94a2b08e56e12085af652
63c051a540e6dfc806f656b88ac3a63e99395429 26-Jul-2014 Dave Allison <dallison@google.com> Reduce stack usage for overflow checks

This reduces the stack space reserved for overflow checks to 12K, split
into an 8K gap and a 4K protected region. GC needs over 8K when running
in a stack overflow situation.

Also prevents signal runaway by detecting a signal inside code that
resulted from a signal handler invokation. And adds a max signal count to
the SignalTest to prevent it running forever.

Also reduces the number of iterations for the InterfaceTest as this was
taking (almost) forever with the --trace option on run-test.

Bug: 15435566

Change-Id: Id4fd46f22d52d42a9eb431ca07948673e8fda694

Conflicts:
compiler/optimizing/code_generator_x86_64.cc
runtime/arch/x86/fault_handler_x86.cc
runtime/arch/x86_64/quick_entrypoints_x86_64.S
648d7112609dd19c38131b3e71c37bcbbd19d11e 26-Jul-2014 Dave Allison <dallison@google.com> Reduce stack usage for overflow checks

This reduces the stack space reserved for overflow checks to 12K, split
into an 8K gap and a 4K protected region. GC needs over 8K when running
in a stack overflow situation.

Also prevents signal runaway by detecting a signal inside code that
resulted from a signal handler invokation. And adds a max signal count to
the SignalTest to prevent it running forever.

Also reduces the number of iterations for the InterfaceTest as this was
taking (almost) forever with the --trace option on run-test.

Bug: 15435566

Change-Id: Id4fd46f22d52d42a9eb431ca07948673e8fda694
54accbca0b549b1b1ad3ef09655dad438bc1e104 13-Aug-2014 Nicolas Geoffray <ngeoffray@google.com> Fix bugs in the x86 and arm versions of generic JNI.

Also fix the run script of 116-nodex2oat to use the non-prebuild
script for target.

Bug: 17000769

Change-Id: I439fcd710fb8bb408f3288ff8fb34fef23890adb
6a763f149f0c6f705cab8fb1984aa6f9198b2841 10-Aug-2014 Dan Albert <danalbert@google.com> Proper fix after -Bsymbolic change.

Marking the offending symbols as hidden allows the linker to resolve
them at build time.

Bug: 16853291
Change-Id: I1480c1520c23f81e42831a66737bba7bdf3433c2
58bea4a6114b9ea4b00e36186357e5b431430123 10-Aug-2014 Dan Albert <danalbert@google.com> Proper fix after -Bsymbolic change.

Marking the offending symbols as hidden allows the linker to resolve
them at build time.

Bug: 16853291
Change-Id: I1480c1520c23f81e42831a66737bba7bdf3433c2
d842648ee0ae8df1a899c53e96a98ccc6cca9d4c 08-Aug-2014 Dan Albert <danalbert@google.com> Revert "Fix build without -Bsymbolic."

This reverts commit bae21bb7f6ca917e0954c970f0bfd2bfa3dcc0a9.
bae21bb7f6ca917e0954c970f0bfd2bfa3dcc0a9 07-Aug-2014 Dan Albert <danalbert@google.com> Fix build without -Bsymbolic.

For ARM: Gold is unable to create PLT based relocations for conditional
branches.
For x86: Some uses of SYMBOL() should have been PLT_SYMBOL().

Bug: 16853291
Change-Id: Id70488b077256a70137c4417f21be2c2d1d4341c
76a0723959c2185ace249e705774af9a679a0e0d 06-Aug-2014 Jeff Hao <jeffhao@google.com> When performing a long jump, update SP last.

Bug: 16571371
Change-Id: I719d9880a64e277330a2da698d5f6f7d320014d0
467f816c3c4483fb7766db3fc50e2fff10a92554 06-Aug-2014 Jeff Hao <jeffhao@google.com> When performing a long jump, update SP last.

Bug: 16571371

(cherry picked from commit 76a0723959c2185ace249e705774af9a679a0e0d)

Change-Id: Ib3a7bcda8aecdf7e92ea40a76de32aed83a42ee0
c200a4abeca91e19969f5b35543f17f812ba32b9 17-Jun-2014 Andreas Gampe <agampe@google.com> ART: Rework Generic JNI, add ARM version

Refactors and optimizes Generic JNI. This version uses TwoWordReturn
to avoid writing to / loading from the bottom of the alloca.

Change-Id: I3287007c976f79c9fd32d3b3a43f2d1371bf4cd3
04f4d8abe45d6e79eca983e057de76aea24b7df9 30-May-2014 Wei Jin <wejin@google.com> Add an optimization for removing redundant suspend tests in ART

This CL:
(1) eliminates redundant suspend checks (dominated by another check),

(2) removes the special treatment of the R4 register, which got
reset on every native call, possibly yielding long execution
sequences without any suspend checks, and

(3) fixes the absence of suspend checks in leaf methods.

(2) and (3) increase the frequency of suspend checks, which improves
the performance of GC and the accuracy of profile data. To
compensate for the increased number of checks, we implemented an
optimization that leverages dominance information to remove
redundant suspend checks on back edges. Based on the results of
running the Caffeine benchmark on Nexus 7, the patch performs
roughly 30% more useful suspend checks, spreading them much more
evenly along the execution trace, while incurring less than 1%
overhead. For flexibility consideration, this CL defines two flags
to control the enabling of optimizations. The original
implementation is the default.

Change-Id: I31e81a5b3c53030444dbe0434157274c9ab8640f
Signed-off-by: Wei Jin <wejin@google.com>
675967d981a3d17aaedf4ca6e07cc3a76e066921 15-May-2014 Andreas Gampe <agampe@google.com> ART: Fix comments for dmb

Update the comments to mention correct barrier type.

Bug: 14680557
Change-Id: I26df43078c189cf16cc65e99b851981cbd063017
4fc046e78efbc98541388cdda986b5d8a2b951ad 07-May-2014 Andreas Gampe <agampe@google.com> ART: Add lock and unlock stubs for ARM64, fix for X86-64

Basic translation of ARM stubs using dmb memory barrier.

Fix placement of dmb in unlock_object of ARM and ARM64.

Update lock and unlock tests in stub_test to force fat locks.

Fix X86-64 unlock stub.

Change-Id: Ie2e4328d9631e06843115888644e75fde8b319ee
5cd33753b96d92c03e3cb10cb802e68fb6ef2f21 16-Apr-2014 Dave Allison <dallison@google.com> Handle implicit stack overflow without affecting stack walks

This changes the way in which implicit stack overflows are handled
to satisfy concerns about changes to the stack walk code.

Instead of creating a gap in the stack and checking for it in
the stack walker, use the ManagedStack infrastructure to concoct
an invisible gap that will never be seen by a stack walk.

Also, this uses madvise to tell the kernel that the main stack's
protected region will probably never be accessed, and instead
of using memset to map the pages in, use memcpy to read from
them. This will save 32K on the main stack.

Also adds a 'signals' verbosity level as per a review request.

Bug: 14066862
Change-Id: I5257305feeaea241d11e6aa6f021d2a81da20b81
5c1e4352614d61fed6868567e58b96682828cb4d 22-Apr-2014 Andreas Gampe <agampe@google.com> Add "arch_test" gtest for assembly stub constants, add some ARM64 assembly code

Add a test that (1) checks all callee-save method frame sizes for
all architectures, (2) checks thread offsets for the runtime
architecture and (3) checks callee-save method offsets for the
runtime architecture.

The "asm_support_XXX.h" files now only contain definitions that are
common between all architectures. Architecture-specific definitions
(i.e., special registers names) have been pushed into the corresponding
.S file. This change was required to be able to undefine definitions
in the test, so that multiple tests can be written in one file.

Test (1) above is in a sense two-stage. The arch_test gtest compares
constants (if it finds them) against the frame size as reported by
the ArtMethods created by the Runtime. This works for all architectures
as we can provide the instruction-set to CreateCalleeSaveMethod. The
second stage of the "test" are preprocessor tests with "#error" in the
case that the constants are not the expected value.

Optimally I'd like to change that to an actual runtime test exercising
the assembly code, which would also allow to check whether the right
registers are stored.

Also added missing assembly code for ARM64 for the callee-save macros.

Also fix X86_64 compilation for Clang 3.5.

Change-Id: I018e6433dffd3d31ba3bfcd75661653f4c7b6552
525cde2dd7cc7ad4212765ad3975cf260a934d3e 23-Apr-2014 Andreas Gampe <agampe@google.com> Add a GTest for Assembly Stubs, Add some ARM64 and X86-64 Stubs

This GTest adds some runtime testing for the stubs that does not
rely on the compiler. This should allow to add or update the stubs
and do testing, especially on architectures without working compiler.

This test is a bit dangerous: if it doesn't know how to handle an
architecture, it will only log a warning. This is so that testing
does not break at the moment. The warning is forced to stdout, too,
so that it is always visible.

Add art_quick_check_cast to ARM64 and X86-64. Add art_quick_memcpy
to X86-64. The latter should be removed in a good compiler, as it is
practically only overhead. Add minor CFI information in ARM.

Change-Id: Ia9c6d0f4035eb1527c12b5f6067dece59e25528d
8325296769a77ecf3ab647b5ab516f439f5b3206 04-Apr-2014 Dave Allison <dallison@google.com> Disable use of R4 as a promotable register

When we are using implicit suspend checks we can potentially
use r4 as a register into which variables can be promoted. However
the runtime doesn't save this and thus will corrupt it. Not good.

This disables the promotion of r4 until we can figure out how
to make the runtime save it properly.

Change-Id: Ib95ce93579e1c364de5ecc8e728f2cb7990da77a
2da882315a61072664f7ce3c212307342e907207 27-Feb-2014 Andreas Gampe <agampe@google.com> Initial changes towards Generic JNI option

Some initial changes that lead to an UNIMPLEMENTED. Works
by not compiling for JNI right now and tracking native methods
which have neither quick nor portable code. Uses new trampoline.

Change-Id: I5448654044eb2717752fd7359f4ef8bd5c17be6e
5d885c82522f9f3f0775a6255b64bcd08c2a4c9e 22-Feb-2014 Ian Rogers <irogers@google.com> Make ARM assembly labels local.

Avoids the symbols being part of the symbol file and confusing tools like gdb.

Change-Id: I90f9ce4a058cd4b69757e32df58fc88ab8d81b68
0177e53ea521ad58b70c305700dab32f1ac773b7 12-Feb-2014 Ian Rogers <irogers@google.com> Work in the direction of hard float quick ABIs.

Pass a shorty to ArtMethod::Invoke so that register setup can use it.
Document x86-64 ABI.
Add extra debug output for one JNI native method registration fails, namely a
dump of the Class and its dex file's location.
Add hack to get testing of OatMethod's without GC maps working in 64bit.

Change-Id: Ic06b68e18eac33637df2caf5e7e775ff95ae70f3
ef7d42fca18c16fbaf103822ad16f23246e2905d 06-Jan-2014 Ian Rogers <irogers@google.com> Object model changes to support 64bit.

Modify mirror objects so that references between them use an ObjectReference
value type rather than an Object* so that functionality to compress larger
references can be captured in the ObjectRefererence implementation.
ObjectReferences are 32bit and all other aspects of object layout remain as
they are currently.

Expand fields in objects holding pointers so they can hold 64bit pointers. Its
expected the size of these will come down by improving where we hold compiler
meta-data.
Stub out x86_64 architecture specific runtime implementation.
Modify OutputStream so that reads and writes are of unsigned quantities.
Make the use of portable or quick code more explicit.
Templatize AtomicInteger to support more than just int32_t as a type.
Add missing, and fix issues relating to, missing annotalysis information on the
mutator lock.
Refactor and share implementations for array copy between System and uses
elsewhere in the runtime.
Fix numerous 64bit build issues.

Change-Id: I1a5694c251a42c9eff71084dfdd4b51fff716822
b122a4bbed34ab22b4c1541ee25e5cf22f12a926 20-Nov-2013 Ian Rogers <irogers@google.com> Tidy up memory barriers.

Change-Id: I937ea93e6df1835ecfe2d4bb7d84c24fe7fc097b
7410f29b4dae223befac036ea567d7f33351dad1 24-Nov-2013 Mathieu Chartier <mathieuc@google.com> Fix dumpsys meminfo <pid>.

Added a case for BumpPointerSpaces. Confirmed working non-debug.
Should also work in debug builds.

Bug: 11830794
Change-Id: I12053ff16eec403dcd4a780e13095e3212a77132
cbb2d20bea2861f244da2e2318d8c088300a3710 15-Nov-2013 Mathieu Chartier <mathieuc@google.com> Refactor allocation entrypoints.

Adds support for switching entrypoints during runtime. Enables
addition of new allocators with out requiring significant copy
paste. Slight speedup on ritzperf probably due to more inlining.

TODO: Ensuring that the entire allocation path is inlined so
that the switch statement in the allocation code is optimized
out.

Rosalloc measurements:
4583
4453
4439
4434
4751

After change:
4184
4287
4131
4335
4097

Change-Id: I1352a3cbcdf6dae93921582726324d91312df5c9
590fee9e8972f872301c2d16a575d579ee564bee 13-Sep-2013 Mathieu Chartier <mathieuc@google.com> Compacting collector.

The compacting collector is currently similar to semispace. It works by
copying objects back and forth between two bump pointer spaces. There
are types of objects which are "non-movable" due to current runtime
limitations. These are Classes, Methods, and Fields.

Bump pointer spaces are a new type of continuous alloc space which have
no lock in the allocation code path. When you allocate from these it uses
atomic operations to increase an index. Traversing the objects in the bump
pointer space relies on Object::SizeOf matching the allocated size exactly.

Runtime changes:
JNI::GetArrayElements returns copies objects if you attempt to get the
backing data of a movable array. For GetArrayElementsCritical, we return
direct backing storage for any types of arrays, but temporarily disable
the GC until the critical region is completed.

Added a new runtime call called VisitObjects, this is used in place of
the old pattern which was flushing the allocation stack and walking
the bitmaps.

Changed image writer to be compaction safe and use object monitor word
for forwarding addresses.

Added a bunch of added SIRTs to ClassLinker, MethodLinker, etc..

TODO: Enable switching allocators, compacting on background, etc..

Bug: 8981901

Change-Id: I3c886fd322a6eef2b99388d19a765042ec26ab99
bbb32c277b800a8ee378c16a3645ab6d4d19aef1 06-Nov-2013 Dave Allison <dallison@google.com> Add .cfi_restore for assembly functions

Bug: 11256318

This adds .cfi_restore directives to the assembly language functions
for ARM, MIPS and x86.

Change-Id: Ic5a80e190aa6cf2d2fcfaecec14de03221ff386b
4e6a31eb97f22f4480827474b30b9e64f396eace 31-Oct-2013 Mathieu Chartier <mathieuc@google.com> Lazily compute object identity hash codes.

Before, we computed identity hashcodes whenever we inflated a monitor.
This caused issues since it meant that we would have all of these
hash codes in the image, causing locks to excessively inflate during
application run time.

This change makes it so that we lazily compute hash codes. When a
thin lock gets inflated, we assign a hash code of 0 assigned to it.
This value signifies no hash code. When we try to get the identity
hash code of an object with an inflated monitor, it gets computed if
it is 0.

Change-Id: Iae6acd1960515a36e74644e5b1323ff336731806
ad2541a59c00c2c69e8973088891a2b5257c9780 25-Oct-2013 Mathieu Chartier <mathieuc@google.com> Fix object identity hash.

The object identity hash is now stored in the monitor word after
being computed. Hashes are computed by a pseudo random number
generator.

When we write the image, we eagerly compute object hashes to
prevent pages getting dirtied.

Bug: 8981901

Change-Id: Ic8edacbacb0afc7055fd740a52444929f88ed564
88474b416eb257078e590bf9bc7957cee604a186 24-Oct-2013 Jeff Hao <jeffhao@google.com> Implement Interface Method Tables (IMT).

Change-Id: Idf7fe85e1293453a8ad862ff2380dcd5db4e3a39
1984152ac92aad244ae15184d12f9ceade686b7b 22-Oct-2013 Mathieu Chartier <mathieuc@google.com> Add missing callee save restore to quick entrypoints.

Added callee save restoration to art_quick_proxy_invoke_handler,
art_quick_resolution_trampoline, art_quick_to_interpreter_bridge.

Bug: 8981901

Change-Id: Iaa5bf862834b49cc48bce4f4ffa34a6797024e6d
2a6c7b7c21adcd4493542604305585b852ccf554 16-Oct-2013 Mathieu Chartier <mathieuc@google.com> Restore callee save registers.

The callee saves weren't all being restored as an optimiation, but
this breaks compaction if register promotion is enabled. The reason
for this is that these registers may contain references which the
GC will update.

Change-Id: I810f56b4ed1f92c632155e30c0838269cb95f3c5
a9a8254c920ce8e22210abfc16c9842ce0aea28f 04-Oct-2013 Ian Rogers <irogers@google.com> Improve quick codegen for aput-object.

1) don't type check known null.
2) if we know types in verify don't check at runtime.
3) if we're runtime checking then move all the code out-of-line.

Also, don't set up a callee-save frame for check-cast, do an instance-of test
then throw an exception if that fails.
Tidy quick entry point of Ldivmod to Lmod which it is on x86 and mips.
Fix monitor-enter/exit NPE for MIPS.
Fix benign bug in mirror::Class::CannotBeAssignedFromOtherTypes, a byte[]
cannot be assigned to from other types.

Change-Id: I9cb3859ec70cca71ed79331ec8df5bec969d6745
d9c4fc94fa618617f94e1de9af5f034549100753 02-Oct-2013 Ian Rogers <irogers@google.com> Inflate contended lock word by suspending owner.

Bug 6961405.
Don't inflate monitors for Notify and NotifyAll.
Tidy lock word, handle recursive lock case alongside unlocked case and move
assembly out of line (except for ARM quick). Also handle null in out-of-line
assembly as the test is quick and the enter/exit code is already a safepoint.
To gain ownership of a monitor on behalf of another thread, monitor contenders
must not hold the monitor_lock_, so they wait on a condition variable.
Reduce size of per mutex contention log.
Be consistent in calling thin lock thread ids just thread ids.
Fix potential thread death races caused by the use of FindThreadByThreadId,
make it invariant that returned threads are either self or suspended now.

Code size reduction on ARM boot.oat 0.2%.
Old nexus 7 speedup 0.25%, new nexus 7 speedup 1.4%, nexus 10 speedup 2.24%,
nexus 4 speedup 2.09% on DeltaBlue.

Change-Id: Id52558b914f160d9c8578fdd7fc8199a9598576a
3b4c18933c24b8a33f38573c2ebcdb9aa16efeb5 13-Sep-2013 Hiroshi Yamauchi <yamauchi@google.com> Split the allocation path into 'instrumented' and 'uninstrumented'
ones.

The instrumented path is equivalent to the existing allocation path
that checks for three instrumentation mechanisms (the debugger
allocation tracking, the runtime allocation stats collection, and
valgrind) for every allocation. The uinstrumented path does not
perform these checks. We use the uninstrumented path by default and
enable the instrumented path only when any of the three mechanisms is
enabled. The uninstrumented version of Heap::AllocObject() is inlined.

This change improves the Ritz MemAllocTest by ~4% on Nexus 4 and ~3%
on Host/x86.

Bug: 9986565
Change-Id: I3e68dfff6789d77bbdcea98457b694e1b5fcef5f
637859cef76e7d41f7fdfd1f1aea7d60b4a315dc 27-Aug-2013 Ian Rogers <irogers@google.com> Make entrypoints Thumb2.

Save the 64bit shifts that are more efficient as ARM code.
Move the standard .S set up code to asm_support_arm.S.

Change-Id: I38b95a88a3658e311020b59abfbe16f843b509ff
d8cf66be7fa0803b26508005cefb27e1498d2963 03-Aug-2013 Ian Rogers <irogers@google.com> Place CFA in the regular .debug_frame section.

Change-Id: Id161fe9dbad3244e102337c80b0ac2d7da0c3aa9
(cherry picked from commit 1a2f1bc64974254ab3246ca5c0682c5bb4317bad)
468532ea115657709bc32ee498e701a4c71762d4 05-Aug-2013 Ian Rogers <irogers@google.com> Entry point clean up.

Create set of entry points needed for image methods to avoid fix-up at load time:
- interpreter - bridge to interpreter, bridge to compiled code
- jni - dlsym lookup
- quick - resolution and bridge to interpreter
- portable - resolution and bridge to interpreter

Fix JNI work around to use JNI work around argument rewriting code that'd been
accidentally disabled.
Remove abstact method error stub, use interpreter bridge instead.
Consolidate trampoline (previously stub) generation in generic helper.
Simplify trampolines to jump directly into assembly code, keeps stack crawlable.
Dex: replace use of int with ThreadOffset for values that are thread offsets.
Tidy entry point routines between interpreter, jni, quick and portable.

Change-Id: I52a7c2bbb1b7e0ff8a3c3100b774212309d0828e
(cherry picked from commit 848871b4d8481229c32e0d048a9856e5a9a17ef9)
848871b4d8481229c32e0d048a9856e5a9a17ef9 05-Aug-2013 Ian Rogers <irogers@google.com> Entry point clean up.

Create set of entry points needed for image methods to avoid fix-up at load time:
- interpreter - bridge to interpreter, bridge to compiled code
- jni - dlsym lookup
- quick - resolution and bridge to interpreter
- portable - resolution and bridge to interpreter

Fix JNI work around to use JNI work around argument rewriting code that'd been
accidentally disabled.
Remove abstact method error stub, use interpreter bridge instead.
Consolidate trampoline (previously stub) generation in generic helper.
Simplify trampolines to jump directly into assembly code, keeps stack crawlable.
Dex: replace use of int with ThreadOffset for values that are thread offsets.
Tidy entry point routines between interpreter, jni, quick and portable.

Change-Id: I52a7c2bbb1b7e0ff8a3c3100b774212309d0828e
1a2f1bc64974254ab3246ca5c0682c5bb4317bad 03-Aug-2013 Ian Rogers <irogers@google.com> Place CFA in the regular .debug_frame section.

Change-Id: Id161fe9dbad3244e102337c80b0ac2d7da0c3aa9
834b394ee759ed31c5371d8093d7cd8cd90014a8 31-Jul-2013 Brian Carlstrom <bdc@google.com> Merge remote-tracking branch 'goog/dalvik-dev' into merge-art-to-dalvik-dev

Change-Id: I323e9e8c29c3e39d50d9aba93121b26266c52a46
7655f29fabc0a12765de828914a18314382e5a35 29-Jul-2013 Ian Rogers <irogers@google.com> Portable refactorings.

Separate quick from portable entrypoints.
Move architectural dependencies into arch.

Change-Id: I9adbc0a9782e2959fdc3308215f01e3107632b7c
166db04e259ca51838c311891598664deeed85ad 26-Jul-2013 Ian Rogers <irogers@google.com> Move assembler out of runtime into compiler/utils.

Other directory layout bits of clean up. There is still work to separate quick
and portable in some files (e.g. argument visitor, proxy..).

Change-Id: If8fecffda8ba5c4c47a035f0c622c538c6b58351