|
From: <sv...@va...> - 2014-08-09 12:58:26
|
Author: bart
Date: Sat Aug 9 12:58:17 2014
New Revision: 14249
Log:
drd: Move VG_(getenv)("DRD_VERIFY_CONFLICT_SET")
Modified:
trunk/drd/drd_main.c
trunk/drd/drd_thread.c
trunk/drd/drd_thread.h
Modified: trunk/drd/drd_main.c
==============================================================================
--- trunk/drd/drd_main.c (original)
+++ trunk/drd/drd_main.c Sat Aug 9 12:58:17 2014
@@ -44,7 +44,7 @@
#include "pub_tool_libcassert.h" // tl_assert()
#include "pub_tool_libcbase.h" // VG_(strcmp)
#include "pub_tool_libcprint.h" // VG_(printf)
-#include "pub_tool_libcproc.h"
+#include "pub_tool_libcproc.h" // VG_(getenv)()
#include "pub_tool_machine.h"
#include "pub_tool_mallocfree.h" // VG_(malloc)(), VG_(free)()
#include "pub_tool_options.h" // command line options
@@ -883,6 +883,10 @@
if (smi)
DRD_(thread_set_segment_merge_interval)(VG_(strtoll10)(smi, NULL));
}
+
+ if (VG_(getenv)("DRD_VERIFY_CONFLICT_SET"))
+ DRD_(verify_conflict_set) = True;
+
}
Modified: trunk/drd/drd_thread.c
==============================================================================
--- trunk/drd/drd_thread.c (original)
+++ trunk/drd/drd_thread.c Sat Aug 9 12:58:17 2014
@@ -36,7 +36,6 @@
#include "pub_tool_libcassert.h" // tl_assert()
#include "pub_tool_libcbase.h" // VG_(strlen)()
#include "pub_tool_libcprint.h" // VG_(printf)()
-#include "pub_tool_libcproc.h" // VG_(getenv)()
#include "pub_tool_machine.h"
#include "pub_tool_mallocfree.h" // VG_(malloc)(), VG_(free)()
#include "pub_tool_options.h" // VG_(clo_backtrace_size)
@@ -68,7 +67,7 @@
DrdThreadId DRD_(g_drd_running_tid) = DRD_INVALID_THREADID;
ThreadInfo DRD_(g_threadinfo)[DRD_N_THREADS];
struct bitmap* DRD_(g_conflict_set);
-int DRD_(verify_conflict_set) = -1;
+Bool DRD_(verify_conflict_set);
static Bool s_trace_context_switches = False;
static Bool s_trace_conflict_set = False;
static Bool s_trace_conflict_set_bm = False;
@@ -1354,10 +1353,7 @@
Bool result;
struct bitmap* computed_conflict_set = 0;
- if (DRD_(verify_conflict_set) < 0)
- DRD_(verify_conflict_set) = VG_(getenv)("DRD_VERIFY_CONFLICT_SET") != 0;
-
- if (DRD_(verify_conflict_set) == 0)
+ if (!DRD_(verify_conflict_set))
return True;
thread_compute_conflict_set(&computed_conflict_set, tid);
Modified: trunk/drd/drd_thread.h
==============================================================================
--- trunk/drd/drd_thread.h (original)
+++ trunk/drd/drd_thread.h Sat Aug 9 12:58:17 2014
@@ -116,7 +116,7 @@
extern ThreadInfo DRD_(g_threadinfo)[DRD_N_THREADS];
/** Conflict set for the currently running thread. */
extern struct bitmap* DRD_(g_conflict_set);
-extern int DRD_(verify_conflict_set);
+extern Bool DRD_(verify_conflict_set);
/* Function declarations. */
|