summaryrefslogtreecommitdiffstats
path: root/runtime/instrumentation.cc
Commit message (Collapse)AuthorAgeFilesLines
* Fix nested deoptimization.Mingyao Yang2015-06-181-1/+1
| | | | | | | | | | | | 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
* Move mirror::ArtMethod to nativeMathieu Chartier2015-06-021-74/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add a flag to StackVisitor for inlining.Nicolas Geoffray2015-05-111-4/+10
| | | | | | | | | The flag tells whether the stack walk needs to include inlined Java frames. This does not do anything just yet, as we're not inlining anyways. Change-Id: I716e25094fe56fa335ca1f9a398c1bcdba478e73
* Support multiple instrumentation clientsSebastien Hertz2015-05-071-124/+129
| | | | | | | | | | | Changes Instrumentation::ConfigureStubs to support multiple clients that need different levels of instrumenation. A client is identified by a string key used to save the desired instrumentation level. Also adds regression gtest instrumentation_test and some cleanup. Bug: 19829329 Change-Id: I1fc24a86fcb7cb46d4be806895376c25cc0a0b3c
* Replace NULL with nullptrMathieu Chartier2015-04-221-6/+6
| | | | | | | Also fixed some lines that were too long, and a few other minor details. Change-Id: I6efba5fb6e03eb5d0a300fddb2a75bf8e2f175cb
* ART: Streaming trace modeAndreas Gampe2015-04-151-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a streaming mode for tracing. Streaming uses a buffer of 16KB and writes to the output when that buffer gets full. Streaming mode can be enabled with -Xmethod-trace-stream and is currently not exposed otherwise. Add a python script that can parse the streaming format, which simply contains strings for newly encountered threads and methods inline, and create output that can be used with traceview. Add Trace::Pause and Trace::Abort, which can pause and abort tracing. Abort is different from Stop in that it does not write the data. Add code to the zygote hooks JNI implementation that pauses tracing before the fork, making sure that a child cannot clobber the parent's data. Add code to the zygote hooks JNI implementation that aborts old tracing and starts new tracing in the child after the fork. Currently base the output on the pid. This will not work on an unmodified device, as the profiles directory is not generally writable, but we do not have enough information at that point. Consider a scheme that restarts tracing later. Change-Id: I93c7bf87e35af582bdfdd3ecc7c52454514220dd
* Move ArtField to nativeMathieu Chartier2015-04-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix CC root visiting bugMathieu Chartier2015-04-071-1/+1
| | | | | | Also some cleanup. Change-Id: Ia3de8f2d409770be3619ec116e8b06ecd82338fe
* Refactor and improve GC root handlingMathieu Chartier2015-04-061-2/+3
| | | | | | | | | | | | | | | | | | | | | | Changed GcRoot to use compressed references. Changed root visiting to use virtual functions instead of function pointers. Changed root visting interface to be an array of roots instead of a single root at a time. Added buffered root marking helper to avoid dispatch overhead. Root marking seems a bit faster on EvaluateAndApplyChanges due to batch marking. Pause times unaffected. Mips64 is untested but might work, maybe. Before: MarkConcurrentRoots: Sum: 67.678ms 99% C.I. 2us-664.999us Avg: 161.138us Max: 671us After: MarkConcurrentRoots: Sum: 54.806ms 99% C.I. 2us-499.986us Avg: 136.333us Max: 602us Bug: 19264997 Change-Id: I0a71ebb5928f205b9b3f7945b25db6489d5657ca
* JDWP: Optimized single step during debuggingDaniel Mihalyi2015-03-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | 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>
* Add more info to who called SuspendAllMathieu Chartier2015-03-131-1/+1
| | | | | | Helps diagnose related jank. Change-Id: I38191cdda723c6f0355d0197c494a3dff2b6653c
* Compute the right catch location for the debugger.Nicolas Geoffray2015-03-091-7/+4
| | | | | | Also remove tls ThrowLocation, it is not needed anymore. Change-Id: I78fddf09ce968ca475e39c17fa76d699c589c8d9
* Change how we report exceptions to the debugger.Nicolas Geoffray2015-03-031-2/+0
| | | | | | | This is only a refactoring/cleanup. Bug fixes with respect to catch location, and more cleanups will follow. Change-Id: I30d3c6260b0c8f8115a811621397225b88f2063a
* Revert "Revert "Add JIT""Mathieu Chartier2015-02-241-2/+25
| | | | | | | | Added missing EntryPointToCodePointer. This reverts commit a5ca888d715cd0c6c421313211caa1928be3e399. Change-Id: Ia74df0ef3a7babbdcb0466fd24da28e304e3f5af
* Revert "Add JIT"Nicolas Geoffray2015-02-241-25/+2
| | | | | | | | | | | | | | | Sorry, run-test crashes on target: 0-05 12:15:51.633 I/DEBUG (27995): Abort message: 'art/runtime/mirror/art_method.cc:349] Check failed: PcIsWithinQuickCode(reinterpret_cast<uintptr_t>(code), pc) java.lang.Throwable java.lang.Throwable.fillInStackTrace() pc=71e3366b code=0x71e3362d size=ad000000' 10-05 12:15:51.633 I/DEBUG (27995): r0 00000000 r1 0000542b r2 00000006 r3 00000000 10-05 12:15:51.633 I/DEBUG (27995): r4 00000006 r5 b6f9addc r6 00000002 r7 0000010c 10-05 12:15:51.633 I/DEBUG (27995): r8 b63fe1e8 r9 be8e1418 sl b6427400 fp b63fcce0 10-05 12:15:51.633 I/DEBUG (27995): ip 0000542b sp be8e1358 lr b6e9a27b pc b6e9c280 cpsr 40070010 10-05 12:15:51.633 I/DEBUG (27995): Bug: 17950037 This reverts commit 2535abe7d1fcdd0e6aca782b1f1932a703ed50a4. Change-Id: I6f88849bc6f2befed0c0aaa0b7b2a08c967a83c3
* Add JITMathieu Chartier2015-02-231-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently disabled by default unless -Xjit is passed in. The proposed JIT is a method JIT which works by utilizing interpreter instrumentation to request compilation of hot methods async during runtime. JIT options: -Xjit / -Xnojit -Xjitcodecachesize:N -Xjitthreshold:integervalue The JIT has a shared copy of a compiler driver which is accessed by worker threads to compile individual methods. Added JIT code cache and data cache, currently sized at 2 MB capacity by default. Most apps will only fill a small fraction of this cache however. Added support to the compiler for compiling interpreter quickened byte codes. Added test target ART_TEST_JIT=TRUE and --jit for run-test. TODO: Clean up code cache. Delete compiled methods after they are added to code cache. Add more optimizations related to runtime checks e.g. direct pointers for invokes. Add method recompilation. Move instrumentation to DexFile to improve performance and reduce memory usage. Bug: 17950037 Change-Id: Ifa5b2684a2d5059ec5a5210733900aafa3c51bca
* Fix compaction bugs related to IdentityHashCodeMathieu Chartier2015-01-231-0/+3
| | | | | | IdentityHashCode is a suspend point if monitor inflation occurs. Change-Id: I114021aed8b3f3437109ef622298de05e13b4e34
* Merge "Fix exception handling during deoptimization"Sebastien Hertz2015-01-231-6/+5
|\
| * Fix exception handling during deoptimizationSebastien Hertz2015-01-231-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When interpreting a deoptimized shadow frame, we may start with a pending exception thrown by a previous deoptimized shadow frame (from a previous invoke). Therefore, we need to handle it before executing any instruction, otherwise we execute incorrect code. Because we need the DEX pc of the throwing instruction to find a matching catch handler, we initialize deoptimized shadow frames with the current DEX pc at the time the stack is deoptimized. When we are about to interpret a deoptimized shadow frame, we need to update the shadow frame with the DEX pc of the next instruction to interpret. There are three cases: - if there is no pending exception, this is the instruction following the current one. - if there is a pending exception and we found a matching catch handler, this is the first instruction of this handler. - if there is a pending exception but there is no matching catch handler, we do not execute the deoptimized shadow frame and continue to its caller. The verifier now fails when a method starts with a move-exception instruction. Indeed we cannot start executing a method with a pending exception. Bug: 19057915 Bug: 19041195 Bug: 18607595 Change-Id: I355ac81e6ac098edc7e3cc8c13dbfa24a2969ab2
* | Follow up on CL 123650Sebastien Hertz2015-01-211-3/+3
| | | | | | | | Change-Id: If575fdb9cc73e312e222e6853890e8dacd83b284
* | Update instrumentation stubs on resolved classesSebastien Hertz2015-01-191-6/+15
|/ | | | | | | | | | | | | | | | | | | | | | | We cannot update methods of a class in the process of being loaded. We need it to be fully resolved (kStatusResolved) so we can access its complete structure (including method index) and the compiled code from the oat file. We ensure that by skipping classes that are not resolved yet when we update instrumentation (with all threads suspended). The entrypoints will be updated when the class gets resolved by the ClassLinker. We also do not update method entrypoints of erroneous classes (kStatusError) because we cannot execute code for these methods. This situation can happen when the debugger requests an event that will cause a full deoptimization (like a METHOD_ENTRY event) while we are loading a new class. Because we suspend all threads to update instrumentation, we may visit a class that is being loaded but not yet resolved. Bug: 19012386 Bug: 18766029 Change-Id: I5a645dfaf5c25dcf4282c1aaeb24f1b6333baa37
* Print more info in MarkSweep::VerifyRootMathieu Chartier2015-01-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Refactored old root callback to use a new class called RootInfo. RootInfo contains all the relevant info related to the root associated with the callback. The MarkSweep::VerifyRoot function now uses this info to print the StackVisitor's described location if the GC root is of the type kRootJavaFrame. Some other cleanup. Example output: E/art (12167): Tried to mark 0x123 not contained by any spaces E/art (12167): Attempting see if it's a bad root E/art (12167): Found invalid root: 0x123 with type RootJavaFrame E/art (12167): Location=Visiting method 'void java.lang.Runtime.gc()' at dex PC 0xffffffff (native PC 0x0) vreg=0 (cherry picked from commit 12f7423a2bb4bfab76700d84eb6d4338d211983a) Bug: 18588862 Change-Id: Ic5a2781f704e931265ffb3621c2eab4b2e25f60f
* Remove portable.Elliott Hughes2014-12-121-50/+8
| | | | Change-Id: I3bf3250fa866fd2265f1b115d52fa5dedc48a7fc
* Fix oatdump to use OatHeader pointer sizeMathieu Chartier2014-11-211-2/+2
| | | | | | | Bug: 18473190 Change-Id: If505b4f62105899f4f1257d3bccda3e6eb0dcd7c (cherry picked from commit c934e483ceabbd589422beea1fa35f5182ecfa99)
* ART: More warningsAndreas Gampe2014-11-041-5/+6
| | | | | | | Enable -Wno-conversion-null, -Wredundant-decls and -Wshadow in general, and -Wunused-but-set-parameter for GCC builds. Change-Id: I81bbdd762213444673c65d85edae594a523836e5
* Remove -Wno-unused-parameter and -Wno-sign-promo from base cflags.Ian Rogers2014-11-031-0/+1
| | | | | | | | | | | Fix associated errors about unused paramenters and implict sign conversions. For sign conversion this was largely in the area of enums, so add ostream operators for the effected enums and fix tools/generate-operator-out.py. Tidy arena allocation code and arena allocated data types, rather than fixing new and delete operators. Remove dead code. Change-Id: I5b433e722d2f75baacfacae4d32aef4a828bfe1b
* ART: Remove old LOG(INFO)Andreas Gampe2014-10-231-2/+0
| | | | | | Clean up output, it's annoying. Change-Id: Ifc1972dd3e988f36f781dc989d23cdb93e6f828e
* Tidy up logging.Ian Rogers2014-10-221-3/+3
| | | | | | | | | | | | | | | | | Move gVerboseMethods to CompilerOptions. Now "--verbose-methods=" option to dex2oat rather than runtime argument "-verbose-methods:". Move ToStr and Dumpable out of logging.h, move LogMessageData into logging.cc except for a forward declaration. Remove ConstDumpable as Dump methods are all const (and make this so if not currently true). Make LogSeverity an enum and improve compile time assertions and type checking. Remove log_severity.h that's only used in logging.h. With system headers gone from logging.h, go add to .cc files missing system header includes. Also, make operator new in ValueObject private for compile time instantiation checking. Change-Id: I3228f614500ccc9b14b49c72b9821c8b0db3d641
* Refactor quick entrypointsIan Rogers2014-10-201-0/+1
| | | | | | | | | | | 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
* Make ART compile with GCC -O0 again.Ian Rogers2014-10-161-26/+25
| | | | | | | | | | | | | 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
* Fix broken runtime SetStatsEnabled logicMathieu Chartier2014-09-261-23/+30
| | | | | | | | | | | | | | | Previously, Runtime::SetStatsEnabled wouldn't take stats_enabled_ into account when deciding whether or not to increment / decrement teh stats enabled counter. This resulted in counter underflows and other errors which caused some CTS tests to fail. Also added some locking to prevent race conditions. Bug: 17360878 (cherry picked from commit a98ffd745bbecb2e84a492194950c0b94966546b) Change-Id: I21d241a58d35bd6a607aa2305c6da81720bd0886
* Avoid suspending for alloc trace enabling when already suspended.Jeff Hao2014-09-171-7/+10
| | | | | | | | Bug: 17499772 (cherry picked from commit 1d6ee090fddd4bfd35c304d6ceb929d5c529dfcc) Change-Id: Id09809c476c685f0a197ee75bb08638931364efd
* Fixed wrong field usage in Instrumentation::RemoveListenerDaniel Mihalyi2014-08-211-1/+1
| | | | | Change-Id: I574fcacf754c1da1dc03459d5859b04bcebeac11 Signed-off-by: Daniel Mihalyi <daniel.mihalyi@mattakis.com>
* Check for constructor first when installing tracing stubs.Jeff Hao2014-08-191-5/+3
| | | | | | | | | | | Addresses comments in https://android-review.googlesource.com/#/c/104383/ made after the commit. Bug: 16386215 (cherry picked from commit 5afe466c027c6ac821bf7c9a88cd7de5260a639b) Change-Id: Ic81161d0b96a0633c4c534a93172cff59312fa61
* Optimized instrumentation listener handlingDaniel Mihalyi2014-08-181-54/+112
| | | | | | | | | | | | | Some instrumentation listener lists may be modified while iterating over the list to deliver an instrumentation event. Therefore the previous implementation copied the list of listeners before starting the iteration. This new implementation only copies the list of instrumentation listeners when the list is changed. Instances of the list are reference counted using std::shared_ptr<>. Change-Id: I1b84db1f2042836dc1110925243f49e5790156d6
* Prevent stubs from being installed in java.lang.reflect.Proxy.<init>.Jeff Hao2014-08-151-0/+7
| | | | | | | This CL is a better fix for proxy tracing and undoes the changes in https://android-review.googlesource.com/#/c/103025/ Change-Id: Ie82bb49f07774bd08a6720ddbe5b1f8ee9363acf
* Make method tracing deoptimize on startup.Jeff Hao2014-08-111-1/+1
| | | | | Bug: 16848366 Change-Id: I929c48622987c090c5233490d4e7836a21e1b57e
* Add GcRoot to clean up and enforce read barriers.Hiroshi Yamauchi2014-07-291-9/+6
| | | | | | | | | | | | | Introduce a value-type wrapper around Object* for GC roots so that 1) we won't have to directly add the read barrier code in many places and 2) we can avoid accidentally bypassing/missing read barriers on GC roots (the GcRoot interface ensures that the read barrier is executed on a read). The jdwp test passed. Bug: 12687968 Change-Id: Ib167c7c325b3c7e3900133578815f04d219972a1
* Add read barriers for the GC roots in Instrumentation.Hiroshi Yamauchi2014-07-211-24/+78
| | | | | Bug: 12687968 Change-Id: I324e2f950ce4500b0e00722044af3a9c82487b23
* Remove object_utils.h.Ian Rogers2014-07-161-1/+0
| | | | | | | | | Break into object_lock, field_helper and method_helper. Clean up header files following this. Also tidy some of the Handle code in response to compiler errors when resolving the changes in this CL. Change-Id: I73e63015a0f02a754d0866bfaf58208aebcaa295
* Break apart header files.Ian Rogers2014-07-151-0/+1
| | | | | | | | Create libart-gtest for common runtime and compiler gtest routines. Rename CompilerCallbacksImpl that is quick compiler specific. Rename trace clock source constants to not use the overloaded profiler term. Change-Id: I4aac4bdc7e7850c68335f81e59a390133b54e933
* Improve performance of invokevirtual/invokeinterface with embedded imt/vtableMingyao Yang2014-07-111-28/+34
| | | | | | | | | Add an embedded version of imt/vtable into class object. Both tables start at fixed offset within class object so method/entry point can be loaded directly from class object for invokeinterface/invokevirtual. Bug: 8142917 Change-Id: I4240d58cfbe9250107c95c0708c036854c455968
* Fix missing single-step eventSebastien Hertz2014-07-101-27/+53
| | | | | | | | | | | | | | | | | | | | | | During debugging, we used to suspend too lately after a step. It occurred when we were stepping out of an interpreted method into a compiled "caller" method. The issue is we did not deoptimize when returning from the interpreted method but only did it when returning from the compiled method. Therefore we were not executing the rest of the compiled method's code with interpreter which prevents from debugging it. This CL fixes this issue by using instrumentation entry/exit stubs when calling interpreted method from compiled code. Therefore, we execute instrumentation exit stub when returning from interpreter and are able to deoptimize from this point. This allows to execute compiled method's code with interpreter and to debug it. We now also prevent from reporting method entry/exit twice while instrumenting interpreted methods. We report method entry/exit events only from interpreter. Bug: 14422182 Bug: 11705760 Change-Id: Ia1175d36202239273083c4e9733c7e9290244090
* Fix method tracing from command-lineSebastien Hertz2014-07-091-2/+5
| | | | | | | | | | | | | | | | | | Transitions current thread to the new kWaitingForMethodTracingStart thread state when starting method tracing. Ensures there is a current thread when method tracing is stopped due to runtime shutdown. If the current thread has been detached, we now re-attach it. Note: we only do this if method tracing has been activated from command-line. Fixes instrumentation when forcing interpreter mode (-Xint) with method tracing enabled. Removes unused parameter from UnsafeLogFatalForThreadSuspendAllTimeout. Bug: https://code.google.com/p/android/issues/detail?id=72094 Bug: 11683397 Change-Id: I70f000fb46ddd95d6ad51ea0a8eee77697a045e9
* Fix exception reporting from interpreterSebastien Hertz2014-06-111-14/+12
| | | | | | | | | | | | | | | | | | | | To comply with JDWP exception report rules, we must report an exception at the location of the throw (or the first instruction encountered after a native call). To do this, we use the CatchLocationFinder visitor to look for a catch handler until we reach a native frame or the top frame. Because interpreter handles pending exception on a method-by-method basis, we need a flag to remember we already reported the exception and avoid reporting it multiple times when unwinding methods. The drawback is we need to maintain the state of this flag. We clear it when the exception is cleared. In the case we temporarily clear the exception (when finding a catch handler for instance), we restore the flag to its previous value at the same time we restore the pending exception. Bump oat version to force recompilation because we modify Thread offsets. Bug: 14402770 Change-Id: Ic059c58f80b2023b118038301f8f0a24f1e18241
* Merge "Change MethodHelper to use a Handle."Mathieu Chartier2014-06-101-1/+2
|\
| * Change MethodHelper to use a Handle.Mathieu Chartier2014-06-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | Added ConstHandle to help prevent errors where you modify the value stored in the handle of the caller. Also fixed compaction bugs related to not knowing MethodHelper::GetReturnType can resolve types. This bug was present in interpreter RETURN_OBJECT. Bug: 13077697 Change-Id: I71f964d4d810ab4debda1a09bc968af8f3c874a3
* | ART: Add instrumentation stubs for ARM64 and X86-64Andreas Gampe2014-06-091-5/+6
|/ | | | | | | | | | | | Adds instrumentation stubs necessary for debugger support. Refactors MethodAndCode to a top-level TwoWordReturn. A function having a return type of TwoWordReturn will return its two-word content, either 2x32b or 2x64b, in two registers according to the architecture's ABI. Bug: 15443938 Change-Id: Id7e1fbd4ad8eb6f29e23d48903c76f77b28d981a
* Fix method tracing's handling of shadow frames on startup.Jeff Hao2014-05-271-13/+17
| | | | | Bug: 15142926 Change-Id: I7d7896ec3f62f46a43578f536292db6e219d83f0
* Begin migration of art::Atomic to std::atomic.Ian Rogers2014-05-201-4/+4
| | | | Change-Id: I4858d9cbed95e5ca560956b9dabd976cebe68333