Minor tweaks.
Leftovers from https://android-git.corp.google.com/g/49613 .
Change-Id: Ife57a36e93a9d7f4d953a88b79ed1d58d6d490cb
diff --git a/vm/interp/Interp.c b/vm/interp/Interp.c
index 807afad..e8b0b00 100644
--- a/vm/interp/Interp.c
+++ b/vm/interp/Interp.c
@@ -238,28 +238,25 @@
* but since we don't execute unverified code we don't need to
* alter the bytecode yet.
*
- * The class init code will "flush" all relevant breakpoints when
- * verification completes.
+ * The class init code will "flush" all pending opcode writes
+ * before verification completes.
*/
- MEM_BARRIER();
assert(*(u1*)addr != OP_BREAKPOINT);
if (dvmIsClassVerified(method->clazz)) {
LOGV("Class %s verified, adding breakpoint at %p\n",
method->clazz->descriptor, addr);
+ MEM_BARRIER();
dvmDexChangeDex1(method->clazz->pDvmDex, (u1*)addr, OP_BREAKPOINT);
} else {
LOGV("Class %s NOT verified, deferring breakpoint at %p\n",
method->clazz->descriptor, addr);
}
} else {
+ /*
+ * Breakpoint already exists, just increase the count.
+ */
pBreak = &pSet->breakpoints[idx];
pBreak->setCount++;
-
- /*
- * Instruction stream may not have breakpoint opcode yet -- flush
- * may be pending during verification of class.
- */
- //assert(*(u1*)addr == OP_BREAKPOINT);
}
return true;