| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
|
|
| |
1) Initialize the register and out sizes for callee methods through
constant moves.
2) Eliminate an unnecessary load of Dalvik PC for chained and
native callees.
Improved method invocation performance by ~3%.
Change-Id: Iead1276eed0ba527e82eb876f08d169ab9b496b2
|
| |\
| |
| |
| |
| |
| |
| | |
Merge commit '7c1f9b34d49aa7cea9b830226e33e95d7608cf76' into dalvik-dev
* commit '7c1f9b34d49aa7cea9b830226e33e95d7608cf76':
GC Card marking fix for SPUT_OBJECT - use correct object head
|
| | |\
| | |
| | |
| | | |
Change-Id: I21e35d4cdf2636ae3cd7facd45ad4f5c4ab82e7b
|
| | | |
| | |
| | |
| | | |
Change-Id: I8b84a4f1e1690f5b62de7404ea6ede00317848bb
|
| | |\|
| | |
| | |
| | | |
Change-Id: I644b3cd50e3c63b209741c8b818b4c1435ee8218
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This CL changes the way we mark GC card to consistently use the object
head (previously, we marked somewhere in the object - often the head, but
not always). Also, previously a coding error caused us to skip the card
mark for OP_APUT_OBJECT_VOLATILES. Fixed here.
Change-Id: I133ef6395c51a0466c9708209b08e79c3083aff2
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The portable interpreter and fast interpreter use 32-bit accesses
for all sub-word scalars. The JIT generated code to tailor the access
to the data size. It doesn't matter which approach is taken, but all
interpreters & JIT must be consistent. Changing the JIT to use 32-bit
accesses for all sub-word instance scalars.
Fix for Issue 2973137
Change-Id: I8b1e9e6be075012c7c174728b77c7a76884975b7
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This CL changes the way we mark GC card to consistently use the object
head (previously, we marked somewhere in the object - often the head, but
not always). Also, previously a coding error caused us to skip the card
mark for OP_APUT_OBJECT_VOLATILES. Fixed here.
Change-Id: I53eb333b9bd0b770201af0dc617d9a8f38afa699
|
| |/ /
| |
| |
| | |
Change-Id: I5319418678b5390b75267af9cc2c9fa6f35f3bdb
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This introduces the return-void-barrier instruction, which is identical
to return-void on UP systems, but provides an additional store/store
barrier on SMP. This is intended for use in constructors of objects
with final fields.
The assembler doesn't like "dmb st", and we don't have an
ANDROID_MEMBAR_STORE barrier defined, so this currently uses full
fences.
This just defines the new instruction. It's not actually used yet.
Also, removed some stale "unused" files from the x86 and x86-atom
directories.
Bug 2965743.
Change-Id: I072e372fd2d57f2617a8d4fff5fd4b38bdda75d1
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The portable interpreter and fast interpreter use 32-bit accesses
for all sub-word scalars. The JIT generated code to tailor the access
to the data size. It doesn't matter which approach is taken, but all
interpreters & JIT must be consistent. Changing the JIT to use 32-bit
accesses for all sub-word instance scalars.
Fix for Issue 2973137
Change-Id: I6108ccc98c1b43974373764913d5f8d0d8723cd4
|
| |\|
| |
| |
| |
| |
| |
| |
| |
| | |
tag, add missing cases for JIT
Merge commit '8ef4d4f3d050b0130dbf723285990b045f04d5f3' into dalvik-dev
* commit '8ef4d4f3d050b0130dbf723285990b045f04d5f3':
Correct Volatile SGET/SPUT format tag, add missing cases for JIT
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix for http://b/issue?id=2971877, which was identified via
debug tracing on http://b/issue?id=2971569. There were a couple
of problems: first, the volatile sget/sput byte codes had the
wrong format tag (22c instead of 21c). Second, the JIT was missing
a couple of case statments to handle these. As far as the JIT goes,
this would not have caused correctness problems, but would have
been slower than necessary.
Change-Id: I57a41c4e063642b0c19acba5bb0855dd8ce2d4ba
|
| | |
| |
| |
| |
| |
| |
| | |
[cherry-picked e22bd84c8c8a57ddd86c21a1f65137d549b07935 from dalvik-dev to gingerbread]
Bug: 2935622
Change-Id: Ib4de19033dc4a08f41bf0eb0f7a21dcde216aae3
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Bug: 2936661
(cherry-picked from dalvik-dev)
Change-Id: I35a012bd4dba2a2f9541b96a2e787687bbc7cd19
|
| | |
| |
| |
| |
| |
| |
| | |
This allows better use of cbz/cbnz on Thumb2 targets. Also, removed
the clrex from the inline monitor enter code (not necessary).
Change-Id: I3bfa90bcdf34f6ef3e2447c9c6f1b49a98a89e58
|
| | |
| |
| |
| |
| | |
Bug: 2936661
Change-Id: Id85530db5281e0ea28ffb31e8769f3bfec8be54a
|
| |/
|
|
|
| |
Bug: 2935622
Change-Id: I0f9e564f1f94ccf6596a37a6f1c10253481d5062
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the JIT wasn't generating short-form compare and branch on
zero/not zero instructions for Thumb2. The reason was that these only
allow a 1-byte displacement, and when they didn't reach the assembler would
abort the trace, split it in half and try again. This change re-enables
cbz, cbnz generation and introduces a relatively lightweight retry
mechanism.
Also includes changes for Thumb2 to always generate large displacement
literal loads and conditional branches to minimize the number of retry
attempts.
Change-Id: Icf066836fad203f5c0fcbbb2ae8e1aa73d1cf816
|
| |
|
|
|
|
|
|
|
|
|
| |
Specifically:
- Don't apply loop optimization if the basic induction variable is
manipulated (ie excluding cases like "i+=0")
- Fix a case where variables reloaded with constants in the body are
not considered as loop invariants
Bug: 2804188
Change-Id: Ia5ebb29bc6814b1be069e23794585f8313900b7d
|
| |\
| |
| |
| |
| |
| |
| | |
Merge commit 'baf196a7b259704137cccf4058b78da15d4c3998' into dalvik-dev
* commit 'baf196a7b259704137cccf4058b78da15d4c3998':
Fix for 2892472 jit spew: No free temp registers
|
| | |
| |
| |
| |
| |
| |
| | |
Neglected some register allocation hygene, which caused a
problem on armv5te builds.
Change-Id: I666b39b88822c4d3d3d7f0e84386aca2920bb9f1
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes include:
1) Force the trace that ends with an invoke instruction to include
the next instruction if it is a move-result (because both need
to be turned into no-ops if callee is inlined).
2) Interpreter entry point/trace builder changes so that return
target won't automatically be considered as trace starting points
(to avoid duplicate traces that include the move result
instructions).
3) Codegen changes to handle getters/setters invoked from both
monomorphic and polymorphic callsites.
4) Extend/fix self-verification to form identical trace regions and
handle traces with inlined callees.
5) Apply touchups to the method based parsing - still not in use.
Change-Id: I116b934df01bf9ada6d5a25187510e352bccd13c
|
| |
|
|
| |
Change-Id: I2ccb4b46d92b729d5504ea9c1b771a5147096858
|
| |
|
|
|
|
| |
Also, on SMP systems generate memory barriers.
Change-Id: If64f7c98a8de426930b8f36ac77913e53b7b2d7a
|
| |
|
|
|
|
|
|
|
| |
In this iteration, cards are marked on either the store address or
the object head (whichever leads to faster code). In all cases,
though, card marks are deferred until after the associated store
has completed.
Change-Id: I633d6e8c3bebdb80bde92efb4fa6fc7cc84f60fc
|
| |
|
|
|
|
|
|
|
|
|
| |
In an attempt to avoid unnecessary register copies, the JIT allows
data items to live in either floating point or core registers until
an instruction is used which requires one or the other. The bug here
was that sub-word data was allowed to live in floating point registers
at the point of a load or store. This cl forces the use of core registers
in those cases.
Change-Id: I60c2a0d1df9a299f6c5130371f44f2be9c348ded
|
| |
|
|
|
|
|
| |
The JIT was pulling it out of the dexdump directory, which is Just
Plain Wrong[tm]. Now it's part of libdex, for all to enjoy.
Change-Id: Ic1e4c981eb2d70ccc3c841ceb5a54f4f77af2008
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds instructions for {i,s}{get,put}{,-object}-volatile, for a
total of eight new instructions.
On SMP systems, these instructions will be substituted in for existing
field access instructions, either by dexopt or during just-in-time
verification. Unlike the wide-volatile instructions, these will not be
used at all when the VM is not built for SMP.
(Ideally we'd omit the volatile instruction implementations entirely on
non-SMP builds, but that requires a little work in gen-mterp.py.)
The change defines and implements the opcodes and support methods, but
does not cause them to be used.
Also, changed dvmQuasiAtomicRead64's argument to be const.
Change-Id: I9e44fe881e87f27aa41f6c6e898ec4402cb5493e
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In preparation for method inlining implementation. Example trace:
D/dalvikvm( 708): Compiler: Building trace for fibonacci, offset 0x10
D/dalvikvm( 708): 0x426b6fa8: 0x0016 const-wide/16 v0, (#2), (#0)
D/dalvikvm( 708): 0x426b6fac: 0x009c sub-long v0, v7, v0
D/dalvikvm( 708): 0x426b6fb0: 0x0070 invoke-direct v6, v0, v1
D/dalvikvm( 708): 0x426b6fb6: 0x000b move-result-wide v0, (#0), (#0)
D/dalvikvm( 708): TRACEINFO (3): 0x426b6f88 Lcom/android/unit_tests/PerformanceTests$FibonacciSlow;fibonacci 0x10 8 of 32, 7 blocks
D/dalvikvm( 708): 7 blocks in total
D/dalvikvm( 708): Block 0 (insn 0010 - 0010 empty)
D/dalvikvm( 708): Fallthrough : block 1 (0010)
D/dalvikvm( 708): Block 1 (insn 0010 - 0014)
D/dalvikvm( 708): Taken branch: block 3 (0000)
D/dalvikvm( 708): Fallthrough : block 2 (0017)
D/dalvikvm( 708): Block 2 (insn 0017 - 0017)
D/dalvikvm( 708): Fallthrough : block 4 (0018)
D/dalvikvm( 708): Block 3 (insn 0000 - 0000 empty)
D/dalvikvm( 708): Block 4 (insn 0018 - 0018 empty)
D/dalvikvm( 708): Block 5 (insn 0000 - 0000 empty)
D/dalvikvm( 708): Block 6 (insn 0000 - 0000 empty)
Once implemented the inliner will consume the invoke-direct and
move-result-wide instructions altogether.
Change-Id: I4e0e6283989a468d9edf01cf26f644d2d8d7ec64
|
| |
|
|
|
|
| |
Also re-enabled the JIT for the ARMv5te target.
Change-Id: I89fd229205e30e6ee92a4933290a7d8dca001232
|
| |
|
|
|
|
|
|
| |
To support the feature, redesigned the predicted chaining mechanism so that the
profile count is shared globally in InterpState.
Bug: 2690371
Change-Id: Ifed427e8b1fa4f6c670f19e0761e45e2d4afdbb6
|
| |
|
|
| |
Change-Id: Icbe24eaf1ad499f28b68b6a5f05368271a0a7e86
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The JIT's chaining mechanism suffered from a narrow window that
could result in i-cache inconsistency. One of the forms of chaining
cell consisted of a two 16-bit thumb instruction sequence. If a thread were
interrupted between the execution of those two instructions *and*
another thread picked that moment to convert that cell's
chained/unchained state, then bad things happen.
This CL alters the chain/unchain model somewhat to avoid this case.
Chainable chaining cells grow by 4 bytes each, and instead of rewriting
a 32-bit cell to chain/unchain, we switch between chained and unchained
state by [re]writing the first 16-bits of the cell as either a 16-bit
Thumb unconditional branch (unchained mode) or the first half of a
32-bit Thumb branch. The 2nd 16-bits of the cell will never change once
the cell moves from its inital state - thus avoiding the possibility of it
becoming inconsistent.
This adds a trivial execution penalty on the slow path, but will add
about a kByte of memory usage to a typical process.
Change-Id: Id8b99802e11386cfbab23da6abae10e2d9fc4065
|
| |
|
|
|
|
| |
Also did some WITH_JIT_TUNING cleanup.
Change-Id: I8bb2d681a06b0f2af1f976a007326825a88cea38
|
| |
|
|
|
|
|
|
| |
Also turn some asserts into aborts to capture future contract changes between
the VM and the JIT.
Bug: 2655384
Change-Id: I8bb0226c7ae26fedf6b4ad25a1cd1aa7013b60d4
|
| |\
| |
| |
| |
| |
| |
| |
| |
| | |
"Throw an exception in JIT\'ed code if dvmFindInterfaceMethodInCache returns NULL" into froyo
Merge commit 'd1bf0ff180ba3a6fbd9c668301be68de5c97f443' into dalvik-dev
* commit 'd1bf0ff180ba3a6fbd9c668301be68de5c97f443':
Throw an exception in JIT'ed code if dvmFindInterfaceMethodInCache returns NULL
|
| | |
| |
| |
| |
| | |
Bug: 2642019
Change-Id: Iec2be8f61388d99b1500bb144e56b86febe76c0b
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bryan hitting the bug in my div-int/lit optimization (that caused it to
try to rewrite rem-int/lit too) shows that I was wrong in assuming % wasn't
worth doing because it wouldn't be hot enough.
Before:
benchmark ns logarithmic runtime
RemainderIntByConstant2 44 XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
RemainderIntByConstant2048 34 XXXXXXXXXXXXXXXXXXXXXX|||||
RemainderIntByConstant8 44 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
RemainderIntByVariable2 40 XXXXXXXXXXXXXXXXXXXXXXXXXXX||
After:
benchmark ns logarithmic runtime
RemainderIntByConstant2 13 XXXXXXXXX|||||||||||
RemainderIntByConstant2048 16 XXXXXXXXXXXX||||||||||
RemainderIntByConstant8 16 XXXXXXXXXXXX||||||||||
RemainderIntByVariable2 40 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Bug: 2614702
Change-Id: I719fc8765feececd5b73c3cb2e44dd3cf20c45ce
|
| | |
| |
| |
| |
| |
| |
| | |
Fix a JIT bug I introduced the other day by not paying attention to the exact
dalvik opcode being optimized.
Change-Id: Ic0518645a5436e2903c2a34ef46d0205f23d571b
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
before:
DivideIntByConstant10 32 XXXXXXXXXXXXXXXXXXXXXXXXXXXX|
DivideIntByConstant100 32 XXXXXXXXXXXXXXXXXXXXXXXXXXXX|
DivideIntByConstant100_HandOptimized 34 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
DivideIntByConstant2 32 XXXXXXXXXXXXXXXXXXXXXXXXXXXX|
DivideIntByConstant2048 22 XXXXXXXXXXXXXXXXXXX|||||||
DivideIntByConstant8 20 XXXXXXXXXXXXXXXXX||||||||
DivideIntByVariable10 21 XXXXXXXXXXXXXXXXXX|||||||
DivideIntByVariable2 21 XXXXXXXXXXXXXXXXXX|||||||
after:
benchmark ns logarithmic runtime
DivideIntByConstant10 32 XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
DivideIntByConstant100 32 XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
DivideIntByConstant100_HandOptimized 33 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
DivideIntByConstant2 11 XXXXXXXXX|||||||||||
DivideIntByConstant2048 13 XXXXXXXXXXX|||||||||||
DivideIntByConstant8 13 XXXXXXXXXXX|||||||||||
DivideIntByVariable10 21 XXXXXXXXXXXXXXXXXXX|||||||
DivideIntByVariable2 22 XXXXXXXXXXXXXXXXXXXX||||||
Bug: 2614702
Change-Id: I9dde73d80580446a362cdcc9b82959a4b6bfb384
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes all known bugs in our handling of supplementary characters. This change
introduces a performance regression on the assumption that it won't be released
without a corresponding JIT change to enable the code to be inlined back to
pretty much what it used to be.
Bug: 2587122
Change-Id: I3449c9718bbe32ebe53b6c10454ae1dc82105b59
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Before:
benchmark ns logarithmic runtime
IsEmpty 115 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
LengthEqualsZero 21 XXXXX||||||||||||||
With C intrinsic:
IsEmpty 30 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
LengthEqualsZero 20 XXXXXXXXXXXXXXXXXXXX||||||
With assembler intrinsic:
IsEmpty 15 XXXXXXXXXXXXXXXXXXXX||||||
LengthEqualsZero 21 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
(All times on passion.)
Change-Id: Ifcc37fe7b8efdd377675a448e0085e490d6767bc
|
| |\|
| |
| |
| |
| |
| |
| |
| |
| | |
functions.
Merge commit '67050d11e5afa7c2396bb0fc4f8d455ea2616f95' into dalvik-dev
* commit '67050d11e5afa7c2396bb0fc4f8d455ea2616f95':
Clean up the codegen for invoking helper callout functions.
|
| | |
| |
| |
| |
| |
| |
| | |
All invoked functions are documented in compiler/codegen/arm/CalloutHelper.h
Bug: 2567981
Change-Id: Ia7cd4107272df1b0b5588fbcc0aafcc6d0723d60
|
| |\|
| |
| |
| |
| |
| |
| |
| |
| | |
debugging / misc code cleanup.
Merge commit '1071056dace973442293b718bf12e328935126f1' into dalvik-dev
* commit '1071056dace973442293b718bf12e328935126f1':
Fix a race condition in JIT state refresh under debugging / misc code cleanup.
|
| | |
| |
| |
| |
| | |
Bug: 2561283
Change-Id: I9fd94928f3e661de97098808340ea92b28cafa07
|
| |\|
| |
| |
| |
| |
| |
| |
| |
| | |
instructions.
Merge commit 'd5adae17d71e86a1a5f3ae7825054e3249fb7879' into dalvik-dev
* commit 'd5adae17d71e86a1a5f3ae7825054e3249fb7879':
Improve JIT self verifier test coverage to follow single-step instructions.
|
| | |
| |
| |
| |
| | |
Bug: 2549326
Change-Id: I01412d4aac1379b61c90fe6e59c534b33be93f66
|
| |\|
| |
| |
| |
| |
| |
| |
| |
| | |
wide operands"
Merge commit 'd630700a9fbc6d317e0b4df73cbbc74a2c8fadaa' into dalvik-dev
* commit 'd630700a9fbc6d317e0b4df73cbbc74a2c8fadaa':
Jit: Fix for 2542488 JIT codegen bug with overlapping wide operands
|