| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: I8d737ced8b553ed80a1fd72560e62abd78ff8b12
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This change has a libcore/ companion CL
"Remove ArtMethod's quick fields mapping table and vmap table."
https://android-review.googlesource.com/91254
Bug: 11767815
Change-Id: I46ce2067e1ecd915da3890606498e31ffc332813
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL refactors the exception handling (on the quick side) by isolating the
search of catch handler and the preparation of deoptimization.
We rename the CatchFinder class to QuickExceptionHandler so it's less specific
to catch handler search.
Finding catch handler happens in QuickExceptionHandler::FindCatch. Since the
CatchBlockStackVisitor resolves exception types, it may cause thread suspension
and breaks the assertion current thread can't be suspended. Therefore, we place
the exception in a SirtRef (while it is detached from the current thread) and
remove the thread suspension assertion.
Deoptimization now happens in QuickExceptionHandler::DeoptimizeStack. It uses
the new DeoptimizeStackVisitor class to create shadow frames.
We also add the Thread::GetDeoptimizationException method to get the definition
of the fake exception in only one place.
Change-Id: I01b19fa72af64329b5c3b6c7f0c3339d2d724978
|
|
|
|
|
|
| |
This reverts commit 5cb328362a633302ca0fcdbaa0da7d94069df051.
Change-Id: Icc0ec1a9f15c2e4e9103e732d7ba75a4feb853b1
|
|
|
|
|
|
|
| |
- Spill registers have different sizes.
- The ArtMethod at the bottom of the stack is always of kWordSize.
Change-Id: I92f67ff928477970c393c7146980255d08e8e6af
|
|
|
|
|
|
|
|
|
|
|
|
| |
The quick-trampoline treats caller's frame in a different way
then it was formed by quck-invoke stub for hard float ABI targets
such as x86_64 and aarch64. The patch workarounds the issue of
wrongly-read stack arguments due to no contract between quick-invoke
stub and quick-trampoline/shadow-frame-builder regarding the reg-
spill area.
Change-Id: I302f212b4ea5e38632527a5ace03f136b21ef806
Signed-off-by: Vladimir Kostyukov <vladimir.kostyukov@intel.com>
|
|
|
|
|
|
|
|
|
| |
Code did not properly call JNIMethodEnd, such that locks etc
where not correctly handled.
Add a test case to jni_compiler_test.
Change-Id: If2d5c628517d65a56dd6bb5c4cabdff77c7664a1
|
|
|
|
| |
Change-Id: I4112bf62c69b4f28ca369c4bf3c626be43692afd
|
|
|
|
| |
Change-Id: I5c078a197c5026e9bd886d0ba1e188054b5ffa75
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, there were errors caused by not restoring the args for
the slow path in artInvokeInterfaceTrampoline and artInvokeCommon. The
slow path in artInvokeInterfaceTrampoline occurs when you attempt
to do an interface dispatch of a method in another dex file. The slow
path in artInvokeCommon occurs when the method in dex cache is not
already resolved.
Since FindMethodFromCode may resolve a method, it can occasionally
cause thread suspension/GC. If a moving GC occurred at this point it
resulted in this_object being invalid after the trampoline returned
the code pointer. This caused a native crash in one of the money runs
since there was an unbundeled app which did a List.iterator call.
Bug: 12934910
Change-Id: Ib454faad14bef0d7732a6d7f1ca5803472d502a6
|
|
|
|
|
|
|
| |
Begin a more full implementation x86-64 REX prefixes.
Doesn't implement 64bit thread offset support for the JNI compiler.
Change-Id: If9af2f08a1833c21ddb4b4077f9b03add1a05147
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This also fixes some failing run tests due to missing
null pointer markers.
The implementation of the implicit stack overflow checks introduces
the ability to have a gap in the stack that is skipped during
stack walk backs. This gap is protected against read/write and
is used to trigger a SIGSEGV at function entry if the stack
will overflow.
Change-Id: I0c3e214c8b87dc250cf886472c6d327b5d58653e
|
|
|
|
|
|
|
|
| |
Move out arguments to the right and make pointer not reference types.
Remove unused unbox for argument routine.
Simplify convert primitive routine for the case of identical types.
Change-Id: I6456331b0f3f3e5f0b2c361a9f50b4ed1c9462a3
|
|
|
|
|
|
|
|
|
| |
Adds support for arm64 to ART. Assembler stubs are sufficient for
down calls into interpreter. JNI compiler and generics are not finished.
Basic Generic JNI functionality.
Change-Id: I4a07c79d1e037b9f5746673480e32cf456867b82
|
|
|
|
|
|
|
|
|
|
| |
Move invocation code out of JNI internal into reflection, including ArgArray
code. Make reflective invocation use the ArgArray to build arguments rather
than allocating a jvalue[] and unboxing arguments into that.
Move reflection part of jni_internal_test into reflection_test.
Make greater use of fast JNI.
Change-Id: Ib381372df5f9a83679e30e7275de24fa0e6b1057
|
|
|
|
| |
Change-Id: Ib276fa63b6a00480eaaff6c352d37917c61e966c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes some linking issues and native code retrieval errors.
All host tests are functional with this change.
Make ArtMethod::GetFrameSizeInBytes() templated to bypass the
embedded sanity check. Necessary for fix-up decision.
Add ArtMethod metadata fix-up code to ClassLinker::LinkCode.
Necessitates new parameters to access the shorty and compute
the frame size.
Fix handling the JNI dlsym lookup stub in the generic JNI code.
Change-Id: I4173b0fbb1ba5b1bcbee1bb340cfdd08a54767e5
|
|
|
|
|
|
|
|
|
|
| |
Separate declaration from definition in certain places to work-around issues
with clang.
Remove bogus lock annotation at definition in compilers.cc that is already
present at the declaration.
Remove duplicate definition of ClassReference.
Change-Id: I5368057bb36319a259110b2198610d9d2b2e5041
|
|
|
|
|
|
|
|
|
| |
This changes the layout of the callee-save frame used in generic
JNI to be consistent with the JNI compiler, that is, the SIRT is
inline (above the method reference). Now the location of the
"this" object is consistent.
Change-Id: Ibad0882680712cb640b4c70ada0229ef7cf4e62c
|
|
|
|
|
|
|
| |
LL and ULL prefixes are word size dependent, use the INT64_C and UINT64_C
macros instead.
Change-Id: I5b70027651898814fc0b3e9e22a18a1047e76cb9
|
|
|
|
|
|
|
| |
Add checks for alignment, floats, and maximum number of parameters
Fixed x86_64 ABI wrong interpretation (floats not widened in registers)
Change-Id: I6c09af4914b7675ac0275ce21003e317ca44a403
|
|
|
|
|
|
|
| |
Ensure SIRT isn't accessed via quick callee save frame.
Some tidying of code.
Change-Id: I8fec3e89aa6d2e86789c60a07550db2e92478ca7
|
|
|
|
|
|
|
| |
Two-pass process for setting up the JNI frame so we can put Sirt
and native call stack as close together as possible.
Change-Id: I827167a55fafc4eba7d4eaf14a35fc69fd5f85ce
|
|
|
|
|
|
|
|
|
|
|
| |
Added verify object calls to SirtRef, IndirectReferenceTable,
ReferenceTable.
Removed un-needed verify object in ScopedObjectAccess / DecodeJObject
since object sources are handled.
Bug: 12934910
Change-Id: I55a46a8ea61fed2a77526eda27fd2cce97a9b125
|
|
|
|
|
|
|
|
|
|
|
| |
Fix clang build errors aswell as restructure locking/mutex code for correct
thread safety analysis support.
Reorder make dependencies so that host builds build first as they should
provide better compilation errors than target.
Remove host's use of -fno-omit-frame-pointer as it has no value with correct
use of CFI, which we should have.
Change-Id: I72cea8da9a3757b1a0b3acb4081feccb7c6cef90
|
|
|
|
|
|
|
|
| |
Starting implementation for generic JNI on x86_64. Frames are of
large static size (>4K) right now, should be compacted later. Passes
the whole of jni_compiler_test.
Change-Id: I88ac3e13a534afe7568d62a1ef97cb766e8260e4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
image_writer.cc
Remove assumption that all methods in the boot classpath are compiled
oat_writer.cc
Don't skip writing ArtMethod::quick_code_offset_ for methods that need resolution, leave that to ImageWriter
dex2oat.cc
Allow dex2dex compilation of image dex files by making the in memory pages writable in all cases, not just app case.
oatdump.cc
dump new OatHeader fields
use ImageSpace.GetImageFilename, not command line image filename, since location may be in dalvik-cache
remove inaccurate check about non-null GC map
quick_trampoline_entrypoints.cc
add and improve some DCHECKS that were useful while debugging
class_linker.cc
image_space.cc
fix double facepalm
parsed_options.cc
fix zygote logging to not skip values to two part options like -classpath <foo>
runtime.cc
wireup parsed compiler options to runtime
Change-Id: Iad314df0b80623c0663d61713d5098297ab9ac87
|
|
|
|
|
|
|
|
|
|
|
|
| |
There was a race when we changed the allocation entrypoints where a
new thread would be starting (Thread::Init) and initialize to the
wrong entrypoints. Guarding allocation entrypoint changing
with the runtime shutdown lock fixes this race condition since
Thread::Init is only called with the runtime shutdown lock held.
Bug: 13250963
Change-Id: I8eb209c124b6bf17020de874e1b0083f158b8200
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Bug: 12934910
Change-Id: I9d0926100c5e08dfbaea8926e8ac7cdd4e7dfe1c
|
|
|
|
|
|
|
| |
Also fix possible compaction bug around ResolveMethod.
Bug: 13221223
Change-Id: I0495eaee8d5f9ae5da0a87c4800a66cd04dc4aa7
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Work-in-progress to allow arrays to fill usable size. Bug: 13028925.
Use C++11's override keyword on GCC >= 2.7 to ensure that we override GC and
allocator methods.
Move initial mirror::Class set up into a Functor so that all allocated objects
have non-zero sizes. Use this property to assert that all objects are never
larger than their usable size.
Other bits of GC related clean-up, missing initialization, missing use of
const, hot methods in .cc files, "unimplemented" functions that fail at
runtime in header files, reducing header file includes, move valgrind's space
into its own files, reduce number of array allocation routines.
Change-Id: Id5760041a2d7f94dcaf17ec760f6095ec75dadaa
|
|
|
|
| |
Change-Id: I8dcf6b29a5aecd445f1a3ddb06386cf81dbc9c70
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce ClassLinker::FindArrayClass which performs an array class lookup
given the element/component class. This has a 16 element cache of recently
looked up arrays.
Pass the current thread to ClassLinker Find .. Class routines to avoid calls
to Thread::Current().
Avoid some uses of FindClass in the debugger where WellKnownClasses is a
faster and more compacting GC friendly alternative.
Change-Id: I60e231820b349543a7edb3ceb9cf1ce92db3c843
|
|
|
|
|
|
|
|
|
|
| |
Fixes a compaction related bug which could be caused by moving args
in artQuickProxyInvokeHandler and not updating them before returning
back into compiled code.
Also changed some Object** to StackReferences.
Change-Id: I0779c8fd5f10f142d3c6149ddc531c99ff8ee4c2
|
|
|
|
|
|
| |
Sufficient to pass jni_internal_test.
Change-Id: Ia0d9b8241ab8450e04765b9c32eb6dc8fc1a8733
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Removes the class initialization blacklist and use transaction to detect and
revert class initialization attempting to invoke native method. This only
concerns class initialization happening at compilation time when generating an
image (like boot.art for the system).
In transactional mode, we log every object's field assignment and array update.
Therefore we're able to abort a transaction to restore values of fields and
array as they were before the transaction starts. We also log changes to the
intern string table so we can restore its state prior to transaction start.
Since transactional mode only happens at compilation time, we don't need to log
all these changes at runtime. In order to reduce the overhead of testing if
transactional mode is on/off, we templatize interfaces of mirror::Object and
mirror::Array, respectively responsible for setting a field and setting an
array element.
For various reasons, we skip some specific fields from transaction:
- Object's class and array's length must remain unchanged so garbage collector
can compute object's size.
- Immutable fields only set during class loading: list of fields, method,
dex caches, vtables, ... as all classes have been loaded and verified before a
transaction occurs.
- Object's monitor for performance reason.
Before generating the image, we browse the heap to collect objects that need to
be written into it. Since the heap may still holds references to unreachable
objects due to aborted transactions, we trigger one collection at the end of
the class preinitialization phase.
Since the transaction is held by the runtime and all compilation threads share
the same runtime, we need to ensure only one compilation thread has exclusive
access to the runtime. To workaround this issue, we force class initialization
phase to run with only one thread. Note this is only done when generating image
so application compilation is not impacted. This issue will be addressed in a
separate CL.
Bug: 9676614
Change-Id: I221910a9183a5ba6c2b99a277f5a5a68bc69b5f9
|
|
|
|
|
|
|
|
|
| |
I believe this_object is sometimes is garbage for static invokes.
This may lead to bad roots being marked if ResolveMethod causes
suspension for GC.
Bug: 13051126
Change-Id: I6775b3db63ac5ce37ad423796f16c92645bd7891
|
|
|
|
|
|
|
|
|
| |
Cleans up the code since it helps make it easier to spot moving GC
related bugs.
Also fixed moving GC bugs in MonitorEnter, and FindFieldID.
Change-Id: I794e4fbcc2010875fc6b299c6d4c9fb0f071b71a
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Use already known name and proto.
Change-Id: I4505b81724bd6a0f3cf21ee6fed44774d38c4e15
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
|
|
|
| |
When we ReleasePrimitiveArray, we now check that the elements pointer
is not a heap address if it is not equal to the java array's data.
Bug: 12845603
Change-Id: I458862f4dc586ba1c414647c7eb81b978c4ccb7e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
Needed since ResolveMethod can cause allocations -> GC.
This change will hopefully fix the trampoline native crash in the
dalvik-dev monkeys.
Change-Id: I73aa84a8198142ffb344773372ac80828c225c5c
|
|
|
|
|
|
|
|
|
| |
When we resolve a type with a certain DexCache that type's
GetDexCache() doesn't necessarily return the same DexCache.
This could have led to the wrong DexFile being used in
access checks by the CompilerDriver.
Change-Id: I2c836477f69f142bcbff902207dc0ad83854a398
|
|
|
|
|
|
|
| |
Following https://android-review.googlesource.com/#/c/79302, embed
array class pointers at array allocation sites in the compiled code.
Change-Id: I67a1292466dfbb7f48e746e5060e992dd93525c5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Rather than looking up a class from its type ID (and checking if
it's resolved/initialized, resolving/initializing if not), use
direct class pointers, if possible (boot-code-to-boot-class pointers
and app-code-to-boot-class pointers.)
- This results in a 1-2% speedup in Ritz MemAllocTest on Nexus 4.
- Embedding the object size (along with class pointers) caused a 1-2%
slowdown in MemAllocTest and isn't implemented in this change.
- TODO: do the same for array allocations.
- TODO: when/if an application gets its own image, implement
app-code-to-app-class pointers.
- Fix a -XX:gc bug.
cf. https://android-review.googlesource.com/79460/
- Add /tmp/android-data/dalvik-cache to the list of locations to
remove oat files in clean-oat-host.
cf. https://android-review.googlesource.com/79550
- Add back a dropped UNLIKELY in FindMethodFromCode().
cf. https://android-review.googlesource.com/74205
Bug: 9986565
Change-Id: I590b96bd21f7a7472f88e36752e675547559a5b1
|