From eba6a4270004f61543e085205b37e46fac6e2221 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 10 Jul 2007 17:34:53 -0600 Subject: [PATCH] replace Debug constant in machine.h with DebugMonitors --- src/machine.cpp | 17 ++++++++++------- src/machine.h | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/machine.cpp b/src/machine.cpp index ddfb75617e..1ffca8b4ac 100644 --- a/src/machine.cpp +++ b/src/machine.cpp @@ -991,9 +991,11 @@ objectMonitor(Thread* t, object o) object p = hashMapFind(t, t->vm->monitorMap, o, objectHash, referenceEqual); if (p) { - fprintf(stderr, "found monitor %p for object 0x%x\n", - static_cast(pointerValue(t, p)), - objectHash(t, o)); + if (DebugMonitors) { + fprintf(stderr, "found monitor %p for object 0x%x\n", + static_cast(pointerValue(t, p)), + objectHash(t, o)); + } return static_cast(pointerValue(t, p)); } else { @@ -1011,10 +1013,11 @@ objectMonitor(Thread* t, object o) object wr = makeWeakReference(t, o, t->vm->weakReferences); t->vm->weakReferences = wr; - fprintf(stderr, "made monitor %p for object 0x%x\n", - m, - objectHash(t, o)); - fprintf(stderr, "new wr: %p\n", wr); + if (DebugMonitors) { + fprintf(stderr, "made monitor %p for object 0x%x\n", + m, + objectHash(t, o)); + } hashMapInsert(t, t->vm->monitorMap, wr, p, referenceHash); diff --git a/src/machine.h b/src/machine.h index ad680c71ad..46d6042578 100644 --- a/src/machine.h +++ b/src/machine.h @@ -22,9 +22,9 @@ namespace vm { const bool Verbose = false; -const bool Debug = false; const bool DebugRun = false; const bool DebugStack = false; +const bool DebugMonitors = false; const uintptr_t HashTakenMark = 1; const uintptr_t ExtendedMark = 2;