summaryrefslogtreecommitdiffstats
path: root/runtime/mirror
Commit message (Collapse)AuthorAgeFilesLines
* Move quick frame info to OatQuickMethodHeader.Vladimir Marko2014-05-133-45/+42
| | | | | | | | | | | | | | | Rename OatMethodHeader to OatQuickMethodHeader, move frame info from OatMethodOffsets to OatQuickMethodHeader. Retrieve the info from other places for non-quick methods (portable compiled bytecode or jni stub, generic jni, runtime, abstract and proxy). This change has a libcore/ companion CL "Remove ArtMethod's quick fields for frame size and spills." https://android-review.googlesource.com/94164 Bug: 11767815 Change-Id: I0e31a7875d76732e1ec479c86b9b5ca01203507f
* Reference::GetReferent() calls by GC should not trigger read barriers.Hiroshi Yamauchi2014-05-091-1/+3
| | | | | | | | Otherwise, GC's reference processing would turn all referents alive via read barriers, which is incorrect. Bug: 12687968 Change-Id: I1463365981d55fa74a7bb207dd4a16aeec007f8b
* Make it possible to disable read barriers in Class::GetObjectSize()Hiroshi Yamauchi2014-05-094-8/+24
| | | | | | | | | This is a leftover from cl/91831 (commit 9103c86a98524e9ddfd14f8cee56e919f68eee9b) that attempted to make it possible to disable read barriers in Object::SizeOf(). Bug: 12687968 Change-Id: I2b05076832936881ec61bc21b6eb6b7c04e0a1f0
* Create stack traces in unstarted runtimes.Ian Rogers2014-05-033-15/+53
| | | | | | | | Use to diagnose failed initialization in dex2oat of boot (-verbose:compiler). Fix identity hashCode, ArtMethod.getMethodName, IntegralToString.convertInt and use of Void when called from a unstarted runtime. Change-Id: I2d536174b59e2e5f19519f93fc6b5916652fb6cd
* Allow ArtMethod::Invoke in unstarted runtimes.Ian Rogers2014-05-021-3/+5
| | | | Change-Id: I0141f4daef4751589d03d27484eb65c811b14f27
* Update the GetFieldObject calls behind the read barrier macros.Hiroshi Yamauchi2014-05-021-2/+3
| | | | | | | This is a leftover from changes 92535 and 93191. Bug: 12687968 Change-Id: I4f09d258d037546c716b78d6f1ae6abe5af1137d
* Merge "Add finalizer references from the entrypoints."Mathieu Chartier2014-05-023-7/+14
|\
| * Add finalizer references from the entrypoints.Mathieu Chartier2014-05-013-7/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now have an invariant where we never allocate finalizable objects with the Initialized or Resolved entrypoints. This speeds up allocation by only doing the check in the slow path. Before: MemAllocTest: 3625, 3707, 3641 EvaluateAndApplyChanges: 3448, 3421, 3413 After: MemAllocTest: 3164, 3109, 3135 EvaluateAndApplyChanges: 3272, 3299, 3353 Bug: 14078487 Change-Id: I2b0534af3e7c75ea5e5257cf3647744f7abfb74e
* | Merge "Replace the bool kDoReadBarrier template parameter with an enum."Hiroshi Yamauchi2014-05-027-59/+76
|\ \
| * | Replace the bool kDoReadBarrier template parameter with an enum.Hiroshi Yamauchi2014-05-017-59/+76
| |/ | | | | | | | | | | | | | | | | Fix one kDoReadBarrier/kIsVolatile mixup in an Object::GetFieldObject call. Bug: 12687968 Change-Id: I896b1137b21a20c0504abd2bf3fe6f83805f3300
* / Replace CountOneBits and __builtin_popcount with POPCOUNT.Vladimir Marko2014-05-021-2/+2
|/ | | | | | Clean up utils.h, make some functions constexpr. Change-Id: I2399100280cbce81c3c4f5765f0680c1ddcb5883
* Force inlining on trivial accessors.Ian Rogers2014-04-2932-452/+602
| | | | | | | | | Make volatility for GetFieldObject a template parameter. Move some trivial mirror::String routines to a -inl.h. Bug: 14285442 Change-Id: Ie23b11d4f18cb15a62c3bbb42837a8aaf6b68f92
* Merge "Move mapping table and vmap table offsets to OatMethodHeader."Vladimir Marko2014-04-283-68/+54
|\
| * Move mapping table and vmap table offsets to OatMethodHeader.Vladimir Marko2014-04-253-68/+54
| | | | | | | | | | | | | | | | | | 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
* | Merge "Revert "Revert "ART: Extracts an utility function of the duplicated ↵Andreas Gampe2014-04-251-1/+1
|\ \ | | | | | | | | | code"""
| * | Revert "Revert "ART: Extracts an utility function of the duplicated code""Andreas Gampe2014-04-241-1/+1
| | | | | | | | | | | | | | | | | | This reverts commit b5a14d2a6c18c1ea3c019c53b10af2e8f5dea234. Change-Id: Id09a4cc27ac22db940badf3a277848b38b173eae
* | | Merge "Refactor exception handling for deoptimization"Sebastien Hertz2014-04-251-3/+3
|\ \ \
| * | | Refactor exception handling for deoptimizationSebastien Hertz2014-04-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge "Support field watchpoint in interpreter"Sebastien Hertz2014-04-252-0/+25
|\ \ \ \
| * | | | Support field watchpoint in interpreterSebastien Hertz2014-04-252-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We report field read/write events to instrumentation from the interpreter. This allows it to send JDWP field access and field modification events to debugger. This completes CL https://android-review.googlesource.com/90390. We also fix the JDWP FieldOnly modifier by introducing ModBasket.fieldTypeID. We incorrectly used ModBasket.classId which is actually dedicated to ClassOnly modifier based on thread's location's class id. Finally, we now enable canWatchFieldModification and canWatchFieldAccess JDWP capabilities so a debugger can request these events to be reported. Bug: 8267708 Change-Id: I987852ad47abb27b2f7e78544a8189c7a4e2f462
* | | | | Merge "More code for the read barrier support."Hiroshi Yamauchi2014-04-248-54/+97
|\ \ \ \ \ | |_|_|/ / |/| | | |
| * | | | More code for the read barrier support.Hiroshi Yamauchi2014-04-228-54/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it possible to disable the RB in Object::SizeOf() (and the functions it calls transitively) which the collector will need to call to get the size of an object when copying. Add Object::AtomicSetReadBarrierPointer() for atomic write of a RB pointer. Bug: 12687968 Change-Id: Ibedd252860ac7ccd17e4e7d71b377a8892b48ff0
* | | | | Revert "ART: Extracts an utility function of the duplicated code"Andreas Gampe2014-04-241-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 973cc95da6fb617bab133bd7a693c1cb7eafd393. Change-Id: I3883c74ba06116e89d89d9cf085f20cff5d15f77
* | | | | ART: Extracts an utility function of the duplicated codeDmitry Petrochenko2014-04-241-0/+6
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces an utility function 'DataOffsetOfType' in 'mirror::Array' class that calculates the data offset at given index in an array of given type. Change-Id: Idb19558653c70a129245f220f0fbb553f898865b Signed-off-by: Dmitry Petrochenko <dmitry.petrochenko@intel.com>
* | | | Merge "Separate maps from code in oat file."Vladimir Marko2014-04-232-3/+6
|\ \ \ \ | |_|/ / |/| | / | | |/ | |/|
| * | Separate maps from code in oat file.Vladimir Marko2014-04-222-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Write all GC maps first, then all mapping tables and then all vmap tables and only then align the offset to page size and write all method code chunks with headers. Bug: 11767815 Change-Id: Ic83555c8303c5be119afc43e95e58c0a32ff2a4f
* | | Merge "Fix FindCatchBlock to work in -Xverify:none mode."Jeff Hao2014-04-232-7/+17
|\ \ \
| * | | Fix FindCatchBlock to work in -Xverify:none mode.Jeff Hao2014-04-222-7/+17
| |/ / | | | | | | | | | | | | | | | | | | | | | FindCatchBlock now uses ResolveType to get the exception type, since it might not be able to find it in the dex cache. Bug: 13948502 Change-Id: Ia6f1c7dc743206ae1c8551bf6239f48ee4d3a784
* | | Merge "Remove support for app JNI workarounds."Ian Rogers2014-04-221-18/+3
|\ \ \ | |/ / |/| |
| * | Remove support for app JNI workarounds.Ian Rogers2014-04-221-18/+3
| | | | | | | | | | | | Change-Id: I4396df7e93fcace4b5b19c2c387e5c30089182a6
* | | Replace ObjectSet with LargeObjectBitmap.Mathieu Chartier2014-04-171-4/+4
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Speeds up large object marking since large objects no longer required a lock. Changed the GCs to use the heap bitmap for marking objects which aren't in the fast path. This eliminates the need for a MarkLargeObject function. Maps before (10 GC iterations): Mean partial time: 180ms Mean sticky time: 151ms Maps after: Mean partial time: 161ms Mean sticky time: 101ms Note: the GC durations are long due to recent ergonomic changes and because the fast bulk free hasn't yet been enabled. Over 50% of the GC time is spent in RosAllocSpace::FreeList. Bug: 13571028 Change-Id: Id8f94718aeaa13052672ccbae1e8edf77d653f62
* / Use non volatile lock words in semispace collector.Mathieu Chartier2014-04-173-7/+10
|/ | | | | | | | | | GSS FormulaEvaluationActions.EvaluateAndApplyChanges: Before GC time: 9.1s After GC time: 7.98s Fixed timing logger errors. Change-Id: I4193c6ccbbbe7a7220dfaabbf3472a5dcebae616
* Insert read barriers in more places.Hiroshi Yamauchi2014-04-102-2/+65
| | | | | Bug: 12687968 Change-Id: If3ffca4741e039f314ac848551c481d44cbcd3ca
* Merge "Insert an empty read barrier call."Hiroshi Yamauchi2014-04-042-21/+18
|\
| * Insert an empty read barrier call.Hiroshi Yamauchi2014-04-032-21/+18
| | | | | | | | | | Bug: 12687968 Change-Id: Ie1d28658e16e09f6a983cb5c1f0d5b375b7ae069
* | Fix Object::Clone()'s pre-fence barrier.Hiroshi Yamauchi2014-04-032-7/+32
|/ | | | | | | | | | | | | | Pass in a pre-fence barrier object that sets in the array length instead of setting it after returning from AllocObject(). Fix another potential bug due to the wrong default pre-fence barrier parameter value. Since this appears error-prone, removed the default parameter value and make it an explicit parameter. Fix another potential moving GC bug due to a lack of a SirtRef. Bug: 13097759 Change-Id: I466aa0e50f9e1a5dbf20be5a195edee619c7514e
* Merge "Cleanup transaction support"Sebastien Hertz2014-04-024-21/+14
|\
| * Cleanup transaction supportSebastien Hertz2014-04-024-21/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updates Thread::CreateInternalStackTrace to support both transactional and non-transactional modes using template. Generalizes non-transactional mode for invariant fields (which are set only once). Removes ArrayLog::VisitRoots as we never create Array logs of ObjectArray. As ObjectArray elements are set using Object::SetFieldObject, they are already recorded in the object logs: the object is the array itself and the offset corresponds to the element index in this array. And also checks we never log ObjectArray in array logs. Fixes location of thrown exception when calling native method during class initialization. Change-Id: Idbc368d3b8292b85ff40bc8a7c559e085477bf89
* | Make the support code for read barriers a bit more general.Hiroshi Yamauchi2014-03-312-19/+27
| | | | | | | | | | | | | | Add an option for Baker in addition to Brooks. Bug: 12687968 Change-Id: I8a31db817ff6686c72951b6534f588228e270b11
* | Handle Array::Memmove within the same array properly.Ian Rogers2014-03-271-36/+49
|/ | | | | | | | | Motivated by discussions in: https://android-review.googlesource.com/#/c/88940/ memcpy can't be relied upon to be a forward copy for overlapping regions of memory. Change-Id: I409f75e97204250546bf0b8082e2b62026bddedc
* Less redundant verification.Mathieu Chartier2014-03-261-4/+4
| | | | | | | ~3 less objects verified per object scanned in the GC. Helps the irogers dogfood experience. Change-Id: I6efeab7842a6c702adecef73fb573c19291fecf2
* Refactor object reference visiting logic.Mathieu Chartier2014-03-246-0/+116
| | | | | | | Refactored the reference visiting logic to be in mirror::Object instead of MarkSweep. Change-Id: I773249478dc463d83b465e85c2402320488577c0
* Merge "Deduplicate the code that hardcodes the array header layout."Hiroshi Yamauchi2014-03-211-7/+3
|\
| * Deduplicate the code that hardcodes the array header layout.Hiroshi Yamauchi2014-03-211-7/+3
| | | | | | | | | | | | | | Get rid of HeaderSize() in array-inl.h and use DataOffset() instead. Bug: 12687968 Change-Id: Ic81cf3fa6bb9b2440d351a73f5fd6a2d6908d15b
* | Don't return null for null utf in AllocFromModifiedUtf8.Mathieu Chartier2014-03-211-3/+1
|/ | | | | | | | | | If you pass in a null utf string it should not be the same behavior as out of memory. This previously caused serious problems in: https://android-review.googlesource.com/#/c/80768/ Change-Id: I9dfb710b57f6cc91064812f52a3db64254769461
* Improvements to Field.get/set.Ian Rogers2014-03-214-0/+29
| | | | | | | | | | | | Avoid unnecessary repeated computation in Field.get/set. Refactor FromReflectedField and FromReflectedMethod into common helpers in mirror::ArtField and mirror::ArtMethod, and make use of thereby avoiding transitions through JNI. Avoid JNI use from within FromReflectedField and FromReflectedMethod. Tidy up Field.get/set wrt moving collector support. Bug: 12189533 Change-Id: I643ab3474bade4abac3a3ae2b6e373b2bb0891c8
* AArch64: Add arm64 runtime support.Stuart Monteith2014-03-191-2/+2
| | | | | | | | | 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
* Refactor reference code into mirror namespace.Mathieu Chartier2014-03-144-0/+169
| | | | | | Added two new files: mirror/reference.h and mirror/reference-inl.h. Change-Id: Ibe3ff6379aef7096ff130594535b7f7c0b7dabce
* Merge "Fixes for Generic JNI"Andreas Gampe2014-03-131-1/+4
|\
| * Fixes for Generic JNIAndreas Gampe2014-03-131-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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