int jdwpPort;
bool jdwpSuspend;
+ /*
+ * Lock profiling threshold value in milliseconds. Acquires that
+ * exceed threshold are logged. Acquires within the threshold are
+ * logged with a probability of $\frac{time}{threshold}$ . If the
+ * threshold is unset no additional logging occurs.
+ */
u4 lockProfThreshold;
- u4 lockProfSample;
int (*vfprintfHook)(FILE*, const char*, va_list);
void (*exitHook)(int);
} else if (strncmp(argv[i], "-Xlockprofthreshold:", 20) == 0) {
gDvm.lockProfThreshold = atoi(argv[i] + 20);
- } else if (strncmp(argv[i], "-Xlockprofsample:", 17) == 0) {
- gDvm.lockProfSample = atoi(argv[i] + 17);
#ifdef WITH_JIT
} else if (strncmp(argv[i], "-Xjitop", 7) == 0) {
/* Emit the sample percentage, 5 bytes. */
cp = logWriteInt(cp, samplePercent);
- /* Emit a trailing newline, apparently the EVENT_TYPE_LIST convention. */
- *cp = '\n';
-
assert((size_t)(cp - eventBuffer) <= sizeof(eventBuffer));
android_btWriteLog(EVENT_LOG_TAG_dvm_lock_sample,
EVENT_TYPE_LIST,
} else {
samplePercent = 100 * waitMs / waitThreshold;
}
- if (samplePercent != 0 && ((u4)rand() % 100 < samplePercent)) {
+ if (samplePercent != 0 && ((u4)rand() % 100 < samplePercent)) {
logContentionEvent(self, waitMs, samplePercent);
}
}
*/
dvmThrowExceptionFmt("Ljava/lang/IllegalMonitorStateException;",
"unlock of unowned monitor, self=%d owner=%d",
- self->threadId,
+ self->threadId,
mon->owner ? mon->owner->threadId : 0);
return false;
}