-/*
- * lock-tracer.c: Runtime simple lock tracer
+/**
+ * \file
+ * Runtime simple lock tracer
*
* Authors:
* Rodrigo Kumpera (rkumpera@novell.com)
#include <execinfo.h>
#endif
-#include <mono/io-layer/io-layer.h>
+#include <mono/utils/mono-compiler.h>
#include "lock-tracer.h"
-
/*
* This is a very simple lock trace implementation. It can be used to verify that the runtime is
* correctly following all locking rules.
int res;
char *name;
mono_os_mutex_init_recursive (&tracer_lock);
- if (!g_getenv ("MONO_ENABLE_LOCK_TRACER"))
+
+ if (!g_hasenv ("MONO_ENABLE_LOCK_TRACER"))
return;
+
name = g_strdup_printf ("locks.%d", getpid ());
trace_file = fopen (name, "w+");
g_free (name);
{
add_record (RECORD_LOCK_RELEASED, kind, lock);
}
+#else
-#endif
+MONO_EMPTY_SOURCE_FILE (lock_tracer);
+#endif /* LOCK_TRACER */