| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Previously we read from componentClass after allocating the array.
Bug: 21783443
(cherry picked from commit 52ea33b10370d60d4ce877aec529626537b7813b)
Change-Id: I5283982edab479434e27416509e1436b4176fe01
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Fixes return type of StackedShadowFrameRecord::GetType
- Makes StackedShadowFrameType an enum class (scoped enum)
- Moves DeoptimizationReturnValueRecord and StackedShadowFrameRecord
to thread.cc file and use forward declaration in thread.h header
- Fixes tools/generate-operator-out.py for scoped enum classes.
Bug: 20845490
(cherry picked from commit f795869da0a1fa006fdcdacd8afb6149a63fc1a7)
Change-Id: I6b67e288b1db563699161e58ec2e2330d42dd8f5
|
|
|
|
|
|
|
|
|
|
|
|
| |
Handle nested deoptimization cases. Create a stacked shadow frame
records to keep track of deoptimization shadow frames. Shadow frames
under construction can be tracked in the same stack.
Bug: 20845490
(cherry picked from commit 1f2d3ba6af52cf6f566deb38b7e07735c9a08fb6)
Change-Id: I768285792c29e7c3cfcd21e7a2600802506024d8
|
|
|
|
|
|
|
|
|
|
|
|
| |
Optimizing and the interpreter wrongly assumed that a PackedSwitch
always has at least one target. This patch removes the corresponding
DCHECKs and adds a regression test case.
This is a resubmission of CL I32b7033ed38de6f1d1a6ee5d5bf12f3a47c9b37e
Bug: 21863783
Change-Id: I04e6e124bdd16591ba27c79490e6ce183c36b691
(cherry picked from commit 2ef645ba50544b879a82ea30e606f18c9af98917)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Bug: 21173514
Change-Id: I369806644879fffc01bdc123d81a551e6eedf465
|
|
|
|
|
|
|
|
|
|
|
|
| |
Expose the UnstartedRuntime implementation functions as private static
methods of a class. Add a gtest that can invoke these functions. Add
sample tests for String and Memory.
Bug: 21173514
(cherry picked from commit 799681b176ad25437ce2849639f54f610dcbf684)
Change-Id: Ib5bde6347fafaf7607c642542ea7d5938ff4b1df
|
|
|
|
|
|
|
|
|
|
|
| |
This allows some class initializers that deal with Strings to run during
compilation. However, java.lang.Character.toUpperCase() is blocking
initialization for some parts.
(cherry picked from commit 57f91e8956f4496391bff028a1b990540cc91c22)
Bug: 21036900
Change-Id: Ia969c6a643f510bc798f94fb10bca1a68fe2ae67
|
|
|
|
|
|
|
|
|
| |
This allows some class initializers that deal with Strings to run during
compilation. This includes the current implementation of
java.security.Security because it reads the "java.security" resource.
Bug: 21036900
Change-Id: I2ea008b774d4ed359e155318e0d06c1566186c34
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the String constructor was called via invoke-direct, it is changed
to the new StringFactory which is static. That means that the args need
to be shifted by one to deal with the change from non-static to static.
However, the non-range version of the invoke-direct was not shifted
correctly causing unstarted runtime initialization to get the wrong
first_dest_reg argument.
Bug: 21036900
Change-Id: Ibd7a643d877514ea396d7e4ab0dea327207cb78f
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This CL properly groups JDWP events at the same location: Breakpoint,
Single-step, Method Entry and Method Exit. This is necessary if the
debugger is not the only instrumentation listener. This matches the
behavior of Dalvik, especially for methods with a single return
instruction.
The interpreter was tuned so the instrumentation callbacks were
called to satisfy the debugger with the idea the debugger was the
only instrumentation listener. This is not true when method tracing
is enabled at the same time.
When tracing is enabled, there is always a listener for MethodEntry
and MethodExit events (art::Trace class). However, if the debugger
is only listening to DexPcMoved event (to manage JDWP Breakpoint
event), it will not be notified of this event.
We now properly call all the instrumentation callbacks in the
interpreter and move the logic specific to debugging into the class
DebugInstrumentationListener. This allows to properly group JDWP
location events together depending on the sequence of instrumentation
callbacks.
We add Thread::tls_32bit_sized_values::debug_method_entry_ flag to
remember we just entered a method. It replaces the local variable
notified_method_entry_event in the interpreter and simplifies the
code.
Bump oat version to force recompilation because the layout of the
Thread class is modified.
Bug: 19829329
Change-Id: I204af9112e37d2eebc86661fb7c961a41c74e598
|
| |
| |
| |
| |
| |
| |
| | |
Another two cases where a new[] is used but only a delete occurs.
Bug: 18202869
Change-Id: If68264807150f3a9783e44ef8823cc366bff8df2
|
|/
|
|
|
|
| |
Also reorder test in verifier to check for string_init first.
Change-Id: I585ef3f5890819a3e233236ea85b51a03918f5dc
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Also fixed some lines that were too long, and a few other minor
details.
Change-Id: I6efba5fb6e03eb5d0a300fddb2a75bf8e2f175cb
|
|
|
|
|
|
| |
More checks necessary for the compiler-driver test.
Change-Id: I29bc20d1f571df5407f9b5fca212e3e79ef9cdc7
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This allows limited I/O in the compiler to read security.properties,
which in turn allows to compile-time initialize Security, and thus
Services and most of the providers.
Bug: 19498458
Bug: 19542228
Change-Id: I853952b83ca99006907c070734f767259c975517
|
|/
|
|
|
|
|
| |
Check the string parameter to Class.forName before using it.
Bug: 19542228
Change-Id: I0d5c44122055c46e251451b1c0f687bbaf64d13e
|
|
|
|
|
|
|
| |
Necessary for compile-time initialization of android.text.Layout.
Bug: 19542228
Change-Id: I4220c65fcc3a8aaa2765b6f07f1f81c330484244
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add linear alloc. Moved ArtField to be native object. Changed image
writer to put ArtFields after the mirror section.
Savings:
2MB on low ram devices
4MB on normal devices
Total PSS measurements before (normal N5, 95s after shell start):
Image size: 7729152 bytes
23112 kB: .NonMoving
23212 kB: .NonMoving
22868 kB: .NonMoving
23072 kB: .NonMoving
22836 kB: .NonMoving
19618 kB: .Zygote
19850 kB: .Zygote
19623 kB: .Zygote
19924 kB: .Zygote
19612 kB: .Zygote
Avg: 42745.4 kB
After:
Image size: 7462912 bytes
17440 kB: .NonMoving
16776 kB: .NonMoving
16804 kB: .NonMoving
17812 kB: .NonMoving
16820 kB: .NonMoving
18788 kB: .Zygote
18856 kB: .Zygote
19064 kB: .Zygote
18841 kB: .Zygote
18629 kB: .Zygote
3499 kB: .LinearAlloc
3408 kB: .LinearAlloc
3424 kB: .LinearAlloc
3600 kB: .LinearAlloc
3436 kB: .LinearAlloc
Avg: 39439.4 kB
No reflection performance changes.
Bug: 19264997
Bug: 17643507
Change-Id: I10c73a37913332080aeb978c7c94713bdfe4fe1c
|
|
|
|
|
|
| |
Add detection of wrong unused annotations. Fix our codebase.
Change-Id: I85cc20f2eac71c1ec6c5c7cd6efb08454a629634
|
|
|
|
|
|
|
|
|
| |
Creates AbortTransactionV taking a va_list argument and renames
AbortTransaction to AbortTransactionF which calls AbortTransactionV.
This fixes the compiler_driver_test under valgrind.
Change-Id: Ia1c57330091c055ae9e46585a944ce0b78864920
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We used to throw a java.lang.InternalError when aborting a
transaction (when preinitializing image classes at compilation time).
We now use dedicated class dalvik.system.TransactionAbortError that
is only thrown by the compiler to abort a transaction. This class has
constructors taking a java.lang.Throwable "cause" so we can wrap
exceptions causing the transaction to abort (for instance class
java.lang.ClassNotFoundException) and give more information about the
cause of the transaction abort.
Bug: 20019689
Change-Id: I019a72a1c754d8bba6a7ad6bb0f02e4fd6668622
|
|\ |
|
| |
| |
| |
| |
| |
| | |
This reverts commit 0ba627337274ccfb8c9cb9bf23fffb1e1b9d1430.
Change-Id: I1ca10d15bbb49897a0cf541ab160431ec180a006
|
|/
|
|
|
|
| |
Correctly delete local refs for dex/direct-byte-buffer.
Change-Id: Ia74dfafb959d69aa281af7316f393997e053a3b3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Main motivation is to remove all the functionality / field access on
java side to ArtField. Also comes with some reflection speedups /
slowdowns.
Summary results:
getDeclaredField/getField are slower mostly due to JNI overhead.
However, there is a large speedup in getInt, setInt,
GetInstanceField, and GetStaticField.
Before timings (N5 --compiler-filter=everything):
benchmark ns linear runtime
Class_getDeclaredField 782.86 ===
Class_getField 832.77 ===
Field_getInt 160.17 =
Field_setInt 195.88 =
GetInstanceField 3214.38 ==============
GetStaticField 6809.49 ==============================
After:
Class_getDeclaredField 1068.15 ============
Class_getField 1180.00 ==============
Field_getInt 121.85 =
Field_setInt 139.98 =
GetInstanceField 1986.15 =======================
GetStaticField 2523.63 ==============================
Bug: 19264997
Change-Id: Ic0d0fc1b56b95cd6d60f8e76f19caeaa23045c77
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ART had several implementations of art::bit_cast:
1. one in runtime/base/casts.h, declared as:
template <class Dest, class Source>
inline Dest bit_cast(const Source& source);
2. another one in runtime/utils.h, declared as:
template<typename U, typename V>
static inline V bit_cast(U in);
3. and a third local version, in runtime/memory_region.h,
similar to the previous one:
template<typename Source, typename Destination>
static Destination MemoryRegion::local_bit_cast(Source in);
This CL removes versions 2. and 3. and changes their callers
to use 1. instead. That version was chosen over the others
as:
- it was the oldest one in the code base; and
- its syntax was closer to the standard C++ cast operators,
as it supports the following use:
bit_cast<Destination>(source)
since `Source' can be deduced from `source'.
Change-Id: I7334fd5d55bf0b8a0c52cb33cfbae6894ff83633
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For single stepping full deoptimization and undeoptimizations were
performed with significant overhead, because every code will be
executed in interpreted mode during a single step, even if it is not
strictly required.
For example, if we have a computation heavy method call and we would
like to step over it, that method (and all the methods called from it)
will run in interpreter mode. This can take so long in some cases
(e.g. multiple minutes) that it makes debugging process unusable.
The solution for this limitation is not using full deoptimizations for
single steps and force interpreter only for those methods that we are
about to step into, and require stack deoptimization before step outs.
Bug: 17750566
Bug: 18094282
Bug: https://code.google.com/p/android/issues/detail?id=77984
Change-Id: I683c52465883146c4c84ec47bf96f8efd920527f
Signed-off-by: Daniel Mihalyi <daniel.mihalyi@mattakis.com>
|
|
|
|
|
|
|
|
|
|
| |
This breaks compiling the core image:
Error after BCE: art::SSAChecker: Instruction 219 in block 1 does not dominate use 221 in block 1.
This reverts commit e295e6ec5beaea31be5d7d3c996cd8cfa2053129.
Change-Id: Ieeb48797d451836ed506ccb940872f1443942e4e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A mechanism is introduced that a runtime method can be called
from code compiled with optimizing compiler to deoptimize into
interpreter. This can be used to establish invariants in the managed code
If the invariant does not hold at runtime, we will deoptimize and continue
execution in the interpreter. This allows to optimize the managed code as
if the invariant was proven during compile time. However, the exception
will be thrown according to the semantics demanded by the spec.
The invariant and optimization included in this patch are based on the
length of an array. Given a set of array accesses with constant indices
{c1, ..., cn}, we can optimize away all bounds checks iff all 0 <= min(ci) and
max(ci) < array-length. The first can be proven statically. The second can be
established with a deoptimization-based invariant. This replaces n bounds
checks with one invariant check (plus slow-path code).
Change-Id: I8c6e34b56c85d25b91074832d13dba1db0a81569
|
|
|
|
|
| |
Bug: 19827056
Change-Id: I12eaf717f1a4b9bd5e0c8e2a508df9da4e61c4ec
|
|
|
|
|
|
|
|
| |
We want to default to having a barrier for the case where we don't
dex to dex.
Bug: 19762303
Change-Id: I60348d89eaf0b9e1e480298afcecbb5f52e8661b
|
|
|
|
|
|
|
|
|
|
| |
The complexity in Android.mk to deal with GCC-only source files is
unnecessary, use #if !defined(__clang__) around the contents of
interpreter/interpreter_goto_table_impl.cc, the same way
interpreter/interpreter.cc does around references to it.
Bug: 17716550
Change-Id: I775c23b6790d38b0d73a92529c696a31e6a4ae83
|
|
|
|
|
|
|
|
|
|
| |
Add null and bounds checks. Add type checks. Implement correct
copy in case of overlap.
The emulation is not complete. Object arrays with different types
are not supported to simplify the implementation.
Change-Id: I107bed1ce884ca632de3fa648fa7a1c5f592e2a4
|
|
|
|
|
|
|
|
|
|
|
| |
Dex objects keep byte buffers to mapped dex files. For annotation
access we create them when compiling, but they must be cleared before
writing an image.
Add some Memory functions.
Bug: 19542228
Change-Id: I995791b43f2b09192d88645821d9e55b45f1b606
|
|
|
|
|
|
|
| |
Add a finalizable check for emulation of Class.newInstance, as this
is not allowed in transactional mode.
Change-Id: I9633929bf484ac8807b97209ab4b422c320b04da
|
|
|
|
|
|
|
| |
Can only call AbortTransaction if in a transaction. Should log
something else otherwise and fail.
Change-Id: I31ea3558c38fb6284ee6cacd1eafe01910e0965e
|
|
|
|
|
|
|
| |
Refactor and clean up unstarted runtime.
Bug: 19542228
Change-Id: Ib3e4b3517e06e8242d4fed32ca59419fef553a47
|
|
|
|
|
|
|
| |
Note that this is a cleanup change, and has no functionality change.
The ThrowLocation had no use anymore.
Change-Id: I3d2126af1dc673cec3a0453ff3d56a172663a5f6
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Also remove tls ThrowLocation, it is not needed anymore.
Change-Id: I78fddf09ce968ca475e39c17fa76d699c589c8d9
|
| |
| |
| |
| |
| |
| |
| | |
Overlooked in the condition, the actual code was already there.
Bug: 19542228
Change-Id: I30caf77b345cb9bdb1f54c28bf4d42852c9a3298
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| | |
Follow-up to https://android-review.googlesource.com/137010.
Change-Id: Ie97bd01f3cd6eeef9ae38fd189b933b905832d52
|
|/
|
|
|
|
|
| |
This is only a refactoring/cleanup. Bug fixes with respect
to catch location, and more cleanups will follow.
Change-Id: I30d3c6260b0c8f8115a811621397225b88f2063a
|
|
|
|
|
|
|
|
|
| |
To compile-time initialize more classes, have more dedicated code
for special methods.
Bug: 19542228
Bug: 19548084
Change-Id: Iad37c1c58302b04fa3a5a904a923da388a079cd7
|
|
|
|
|
|
|
|
| |
Added missing EntryPointToCodePointer.
This reverts commit a5ca888d715cd0c6c421313211caa1928be3e399.
Change-Id: Ia74df0ef3a7babbdcb0466fd24da28e304e3f5af
|