mirror of
https://github.com/corda/corda.git
synced 2024-12-29 09:18:58 +00:00
replace Debug constant in machine.h with DebugMonitors
This commit is contained in:
parent
950e1eb5cb
commit
eba6a42700
@ -991,9 +991,11 @@ objectMonitor(Thread* t, object o)
|
|||||||
object p = hashMapFind(t, t->vm->monitorMap, o, objectHash, referenceEqual);
|
object p = hashMapFind(t, t->vm->monitorMap, o, objectHash, referenceEqual);
|
||||||
|
|
||||||
if (p) {
|
if (p) {
|
||||||
|
if (DebugMonitors) {
|
||||||
fprintf(stderr, "found monitor %p for object 0x%x\n",
|
fprintf(stderr, "found monitor %p for object 0x%x\n",
|
||||||
static_cast<System::Monitor*>(pointerValue(t, p)),
|
static_cast<System::Monitor*>(pointerValue(t, p)),
|
||||||
objectHash(t, o));
|
objectHash(t, o));
|
||||||
|
}
|
||||||
|
|
||||||
return static_cast<System::Monitor*>(pointerValue(t, p));
|
return static_cast<System::Monitor*>(pointerValue(t, p));
|
||||||
} else {
|
} else {
|
||||||
@ -1011,10 +1013,11 @@ objectMonitor(Thread* t, object o)
|
|||||||
object wr = makeWeakReference(t, o, t->vm->weakReferences);
|
object wr = makeWeakReference(t, o, t->vm->weakReferences);
|
||||||
t->vm->weakReferences = wr;
|
t->vm->weakReferences = wr;
|
||||||
|
|
||||||
|
if (DebugMonitors) {
|
||||||
fprintf(stderr, "made monitor %p for object 0x%x\n",
|
fprintf(stderr, "made monitor %p for object 0x%x\n",
|
||||||
m,
|
m,
|
||||||
objectHash(t, o));
|
objectHash(t, o));
|
||||||
fprintf(stderr, "new wr: %p\n", wr);
|
}
|
||||||
|
|
||||||
hashMapInsert(t, t->vm->monitorMap, wr, p, referenceHash);
|
hashMapInsert(t, t->vm->monitorMap, wr, p, referenceHash);
|
||||||
|
|
||||||
|
@ -22,9 +22,9 @@
|
|||||||
namespace vm {
|
namespace vm {
|
||||||
|
|
||||||
const bool Verbose = false;
|
const bool Verbose = false;
|
||||||
const bool Debug = false;
|
|
||||||
const bool DebugRun = false;
|
const bool DebugRun = false;
|
||||||
const bool DebugStack = false;
|
const bool DebugStack = false;
|
||||||
|
const bool DebugMonitors = false;
|
||||||
|
|
||||||
const uintptr_t HashTakenMark = 1;
|
const uintptr_t HashTakenMark = 1;
|
||||||
const uintptr_t ExtendedMark = 2;
|
const uintptr_t ExtendedMark = 2;
|
||||||
|
Loading…
Reference in New Issue
Block a user