diff options
author | buzbee <buzbee@google.com> | 2011-04-13 14:10:04 -0700 |
---|---|---|
committer | buzbee <buzbee@google.com> | 2011-04-13 14:10:04 -0700 |
commit | e71474621b968a9bc649d067155d31213f5764a9 (patch) | |
tree | cbdf58d8c365ce826cc75a005a03a0554bc574cc /vm/interp | |
parent | 0161e1582b13173cc5a125cf504fd7714c9c82b2 (diff) | |
download | android_dalvik-e71474621b968a9bc649d067155d31213f5764a9.tar.gz android_dalvik-e71474621b968a9bc649d067155d31213f5764a9.tar.bz2 android_dalvik-e71474621b968a9bc649d067155d31213f5764a9.zip |
Fix debugger performance regression
http://b/issue?id=4282910
The interpreter was reporting every instruction as a method entry point,
causing significant performance degradation in the debugger.
Change-Id: If6fb092d6ade7fc3d74be3c7f806bf2d6923a063
Diffstat (limited to 'vm/interp')
-rw-r--r-- | vm/interp/Interp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/vm/interp/Interp.c b/vm/interp/Interp.c index e670d49e8..092df3207 100644 --- a/vm/interp/Interp.c +++ b/vm/interp/Interp.c @@ -714,7 +714,7 @@ void dvmReportReturn(Thread* self) * the event list unless we know there's at least one lurking within. */ static void updateDebugger(const Method* method, const u2* pc, const u4* fp, - bool methodEntry, Thread* self) + Thread* self) { int eventFlags = 0; @@ -727,8 +727,10 @@ static void updateDebugger(const Method* method, const u2* pc, const u4* fp, */ dvmExportPC(pc, fp); - if (methodEntry) + if (self->debugIsMethodEntry) { eventFlags |= DBG_METHOD_ENTRY; + self->debugIsMethodEntry = false; + } /* * See if we have a breakpoint here. @@ -1775,8 +1777,7 @@ void dvmCheckBefore(const u2 *pc, u4 *fp, Thread* self) } if (self->interpBreak.ctl.subMode & kSubModeDebuggerActive) { - updateDebugger(method, pc, fp, - self->debugIsMethodEntry, self); + updateDebugger(method, pc, fp, self); } if (gDvm.instructionCountEnableCount != 0) { /* |