aboutsummaryrefslogtreecommitdiff
path: root/vm/interp/Interp.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Change IsMethodTracingActive to GetMethodTracingMode.Jeff Hao2013-08-301-2/+3
| | | | | | | | | | This allows traceview to tell whether tracing is active, and whether it is sampling or method tracing. Bug: 9968521 Change-Id: I72100d1536ea3168998110ec1cfa5a183b55a67c (cherry picked from commit 9d3a0a2e253aecd07c4a053c19cf9b0ccaa2db49)
* Add support for sample profiling in traceview.Jeff Hao2013-08-281-1/+5
| | | | | | | | | | Instead of method instrumentation, allow traceview to periodically sample stack traces of threads. Disabled by default until we add gui support for this new mode. (cherry picked from commit 676f8a527fb62abd39663d55c7d9208f5ca03093) Change-Id: Ia5d0d57012305a5830d042bcb903a429432b035b
* Fix JIT initialization racebuzbee2013-05-011-0/+3
| | | | | | | | | | See b/8767735 Slow thread in thread spin test A race exists in thread creation/JIT initialization that can leave the JIT permanantly disabled for a thread (typically the first interpreter thread). Change-Id: If6fcac93a229edf068eb02ceceb374e3dc284b78
* remove duplicated call to dvmJitCalleeSave()Rocky Zhang2012-11-291-1/+0
| | | | | Change-Id: Ib7b5f637a22fd5ba60bdb45cd34ac8c1781c7bd3 Signed-off-by: Rocky Zhang <zhangyan.hit@gmail.com>
* Handle MAX_INT case in packed-switchChris Dearman2012-10-151-11/+9
| | | | | | | Allows regression 095-switch-MAX_INT to pass Change-Id: Iec97fb456d43dbb14ee096fe708c74aff5ba1f5a Signed-off-by: Chris Dearman <chris@mips.com>
* RETURN_VOID_BARRIER is also a return.Elliott Hughes2012-08-061-2/+2
| | | | | Bug: http://code.google.com/p/android/issues/detail?id=36003 Change-Id: I7fb53b0898158a3ad7b0eb4f8385674ddaeffd60
* [X86] X86 trace JIT compiler supportDong-Yuan Chen2012-07-201-19/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch provides a fully functional x86 trace JIT compiler for Dalvik VM. It is built on top of the existing x86 fast interpreter with bug fixes and needed extension to support trace JIT interface. The x86 trace JIT code generator was developed independent of the existing template-based code generator and thus does not share exactly the same infrastructure. Included in this patch are: * Deprecated and removed the x86-atom fast interpreter that is no longer functional since ICS. * Augmented x86 fast interpreter to provide interfaces for x86 trace JIT compiler. * Added x86 trace JIT code generator with full JDWP debugging support. * Method JIT and self-verification mode are not supported. The x86 code generator uses the x86 instruction encoder/decoder library from the Apache Harmony project. Additional wrapper extension and bug fixes were added to support the x86 trace JIT code generator. The x86 instruction encoder/decoder is embedded inside the x86 code generator under the libenc subdirectory. Change-Id: I241113681963a16c13a3562390813cbaaa6eedf0 Signed-off-by: Dong-Yuan Chen <dong-yuan.chen@intel.com> Signed-off-by: Yixin Shou <yixin.shou@intel.com> Signed-off-by: Johnnie Birch <johnnie.l.birch.jr@intel.com> Signed-off-by: Udayan <udayan.banerji@intel.com> Signed-off-by: Sushma Kyasaralli Thimmappa <sushma.kyasaralli.thimmappa@intel.com> Signed-off-by: Bijoy Jose <bijoy.a.jose@intel.com> Signed-off-by: Razvan A Lupusoru <razvan.a.lupusoru@intel.com> Signed-off-by: Tim Hartley <timothy.d.hartley@intel.com>
* Fix a small and unlikely memory leak.Elliott Hughes2012-07-171-1/+1
| | | | Change-Id: I131b9f2f8ae4a4b2bb3bb00bc2cd1e607d979bb5
* resolved conflicts for merge of 4c5f9711 to jb-dev-plus-aospElliott Hughes2012-04-301-0/+8
|\ | | | | | | Change-Id: I4c724c3df990a5abf42cec748bbbba25ee5bc112
| * Fix the portable interpreter buildChris Dearman2012-02-151-0/+8
| | | | | | | | | | Change-Id: Ibf08d50c7a01a4c30559dd2ee9511c28fb1365a5 Signed-off-by: Chris Dearman <chris@mips.com>
* | Remove stale assertbuzbee2012-01-181-1/+0
| | | | | | | | | | | | | | Delete a stale assert that can cause problems when running with the portable interpreter when debugging or profiling. Change-Id: I354a1fbe280e1baeb885cb51fed1f3e2c8eef159
* | Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-081-9/+9
| | | | | | | | | | | | | | | | | | See https://android-git.corp.google.com/g/#/c/157220 Also fix an occurrence of LOGW missed in an earlier change. Bug: 5449033 Change-Id: I2e3b23839e6dcd09015d6402280e9300c75e3406
* | Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGESteve Block2012-01-061-7/+7
| | | | | | | | | | | | | | See https://android-git.corp.google.com/g/157065 Bug: 5449033 Change-Id: Ia5d301248024df26c2a29dabdfe738e39ec87c82
* | Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGESteve Block2012-01-051-1/+1
| | | | | | | | | | | | | | See https://android-git.corp.google.com/g/156801 Bug: 5449033 Change-Id: Ic558031c75b3702d90eb78bd730501ae5d3c077b
* | Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGESteve Block2012-01-031-8/+8
| | | | | | | | | | | | | | See https://android-git.corp.google.com/g/156016 Bug: 5449033 Change-Id: Ic663376d1ad6a6cb14bf81405ad9afd247cf2f60
* | am f51d43f0: am e3d9cde4: Disable JIT single-stepping resume mode.Ben Cheng2011-11-021-0/+5
|\| | | | | | | | | * commit 'f51d43f0ebfa5739d1ee691d661097dbbad98041': Disable JIT single-stepping resume mode.
| * Disable JIT single-stepping resume mode.Ben Cheng2011-11-011-0/+5
| | | | | | | | | | BUG: 5551114 Change-Id: Id8ee75be5e71ee258994235952871ad181024e56
| * Fix single-stepping resume mode in the interpreter.Ben Cheng2011-10-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry-picked from master) When a resume attempt is cancelled due to other pending request make sure the old native resume PC is cleared. Otherwise the JIT code cache may be re-entered with mismatching Dalvik PC. Also fix a code bloat problem where single-step count is not set properly after executing a return instruction. BUG: 5208786 Change-Id: I54775215b11eae29ccdb6111dc0fdfa99e41e08d
* | Merge "Fix single-stepping resume mode in the interpreter."Ben Cheng2011-10-271-0/+3
|\ \
| * | Fix single-stepping resume mode in the interpreter.Ben Cheng2011-10-271-0/+3
| |/ | | | | | | | | | | | | | | | | | | | | When a resume attempt is cancelled due to other pending request make sure the old native resume PC is cleared. Otherwise the JIT code cache may be re-entered with mismatching Dalvik PC. Also fix a code bloat problem where single-step count is not set properly after executing a return instruction. Change-Id: Ia926bc3a87cae1296719a1069838060b181ce54d
* | Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGESteve Block2011-10-261-11/+11
| | | | | | | | | | | | | | See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I8bd96961e369a08e86ff78b82d90f20f42787eb1
* | Rename (IF_)LOG() to (IF_)ALOG() DO NOT MERGESteve Block2011-10-251-4/+4
|/ | | | | | | See https://android-git.corp.google.com/g/#/c/141576 Bug: 5449033 Change-Id: Ie3bc0d5436218ea05f98cb0373ecf5924f78db05
* Attempt to fix dalvik heap corruption.Jesse Wilson2011-09-061-1/+1
| | | | | | | | This is bccheng's find, as reported here: http://b/5208786#ISSUE_HistoryHeader49 Bug: http://b/5208786 Change-Id: I1616bac1ef6c197f723656187a784fc6838975d4
* Don't use dvmIsValidObject outside the GC.Elliott Hughes2011-07-191-3/+3
| | | | | | | | Use dvmIsHeapPointer outside the GC. (This still isn't safe because there's no synchronization when dealing with the HeapSource.) Bug: 5049447 Change-Id: Ie0b325ef0a92687ea1eaf1491a4bb832298893c5
* Switch dvmHumanReadableDescriptor over to std::string.Elliott Hughes2011-06-071-62/+34
| | | | | | (Prep work before making a change to stack dumps.) Change-Id: I0af49b920f450fd2611e4b96e717a637483122d6
* Prefer printf format "%#x" over "0x%x".Dan Bornstein2011-05-261-12/+12
| | | | | | I exist to serve. Change-Id: I8e2880b20eefd466da8515d5b6b0c5cb75d56169
* Further conservation of newlines.Dan Bornstein2011-05-261-36/+36
| | | | | | Friends don't let friends end LOG() strings with newlines. Change-Id: I5a18c766c90c4ab5f03caa6acd601d34d91beb00
* Interpreter/Debugger fix #4479968buzbee2011-05-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | This one was tricky to track down. The underlying problem arose with the consolidation of InterpState with Thread. Rather than having a state structure for each instance of the interpreter, we moved to a model that had a single thread-local struct shared by all interpreter instances running on that thread. A portion of interpreter state can't be shared - and thus was saved and restored on nested invocations of the interpreter. The bug here was that the storage for method return values was not included in the state that needed save/retore. In normal operation, it doesn't need to be saved - that storage isn't live across an invoke that could trigger a nested interpreter activation. However, when debugging, the debugger itself may hijack threads and create new interpreter instances for its own purposed - and there is a small window in which live retval can be trashed. The fix is simply to move retval into the InterpSave struct. Change-Id: Ib621824b799c5caa16fdfa8f5689a181159059df
* Another single-stepping fix in JIT self-verification mode.Ben Cheng2011-05-111-2/+2
| | | | | | | | | | The counted single stepping check should be based on the kSubModeCountedStep submode instead. Also since the NPC value is cleared when exceptions are thrown, we can single-step instructions that can throw as well. Change-Id: Idbc1307ae0956016ef76186aebc6e3b89b119d9d
* x86 interpreter fixbuzbee2011-05-021-0/+5
| | | | | | | | Correct the ordering of FP save prior to special subMode handling. Also added a stress test mode to help catch this sort of problem in the future. Change-Id: I5bcd325858fa63023498bfd47e910aaf1530d6bb
* Get rid of uneeded extern, enum, typedef and struct qualifiers.Carl Shapiro2011-04-271-2/+2
| | | | Change-Id: I236c5a1553a51f82c9bc3eaaab042046c854d3b4
* Refine & simplify the interBreak mechanismbuzbee2011-04-251-53/+68
| | | | | | | | | | | | Replace dvmUpdateInterpBreak() and friends with more direct enable/disable subMode calls. Hide breakFlags manipulation from higher-level callers and infer what is needed from the active subMode. Add documentation to the interpreter control section of mterp/README.txt Change-Id: If7ebee5d8e4db8154c4caed72cf89ec088045998
* InterpBreak cleanup (part 1)buzbee2011-04-221-24/+7
| | | | | | | | | Moved the suspend count variables from the interpBreak structure. These are already protected by a mutex, and we need the space in interpBreak for additional subMode flags. This CL just does the move and expands the width of subMode to 16-bits. Change-Id: I4a6070b1ba4fb08a0f6e0aba6f150b30f9159eed
* Consolidate curFrame fields in thread storagebuzbee2011-04-221-18/+18
| | | | | | | We ended up with two locations in the Thread structure for saved Dalvik frame pointer. This change consolidates them. Change-Id: I78f288e4e57e232f29663be930101e775bfe370f
* Remove unneeded void argument list declarations.Carl Shapiro2011-04-201-5/+5
| | | | Change-Id: Ica749f6defa890363ec531b29e25bc415dc2cbb9
* Move the verifier and parts of the interpreter into C++.Carl Shapiro2011-04-151-0/+1994
Change-Id: I8ce5fb558871d9709b251512dd01206be5ca8497