|
From: <sv...@va...> - 2008-03-15 08:34:22
|
Author: bart
Date: 2008-03-15 08:34:23 +0000 (Sat, 15 Mar 2008)
New Revision: 7685
Log:
Moved drd_is_suppressed() call inside drd_report_race().
Modified:
trunk/exp-drd/drd_main.c
Modified: trunk/exp-drd/drd_main.c
===================================================================
--- trunk/exp-drd/drd_main.c 2008-03-15 08:11:03 UTC (rev 7684)
+++ trunk/exp-drd/drd_main.c 2008-03-15 08:34:23 UTC (rev 7685)
@@ -171,6 +171,9 @@
static void drd_report_race(const Addr addr, const SizeT size,
const BmAccessTypeT access_type)
{
+ if (drd_is_suppressed(addr, addr + size))
+ return;
+
DataRaceErrInfo drei;
drei.tid = VG_(get_running_tid)();
drei.addr = addr;
@@ -202,8 +205,7 @@
}
sg = running_thread_get_segment();
bm_access_range_load(sg->bm, addr, addr + size);
- if (bm_load_has_conflict_with(thread_get_danger_set(), addr, addr + size)
- && ! drd_is_suppressed(addr, addr + size))
+ if (bm_load_has_conflict_with(thread_get_danger_set(), addr, addr + size))
{
drd_report_race(addr, size, eLoad);
}
@@ -222,8 +224,7 @@
}
sg = running_thread_get_segment();
bm_access_load_1(sg->bm, addr);
- if (bm_load_1_has_conflict_with(thread_get_danger_set(), addr)
- && ! drd_is_suppressed(addr, addr + 1))
+ if (bm_load_1_has_conflict_with(thread_get_danger_set(), addr))
{
drd_report_race(addr, 1, eLoad);
}
@@ -242,8 +243,7 @@
}
sg = running_thread_get_segment();
bm_access_load_2(sg->bm, addr);
- if (bm_load_2_has_conflict_with(thread_get_danger_set(), addr)
- && ! drd_is_suppressed(addr, addr + 2))
+ if (bm_load_2_has_conflict_with(thread_get_danger_set(), addr))
{
drd_report_race(addr, 2, eLoad);
}
@@ -262,8 +262,7 @@
}
sg = running_thread_get_segment();
bm_access_load_4(sg->bm, addr);
- if (bm_load_4_has_conflict_with(thread_get_danger_set(), addr)
- && ! drd_is_suppressed(addr, addr + 4))
+ if (bm_load_4_has_conflict_with(thread_get_danger_set(), addr))
{
drd_report_race(addr, 4, eLoad);
}
@@ -282,8 +281,7 @@
}
sg = running_thread_get_segment();
bm_access_load_8(sg->bm, addr);
- if (bm_load_8_has_conflict_with(thread_get_danger_set(), addr)
- && ! drd_is_suppressed(addr, addr + 8))
+ if (bm_load_8_has_conflict_with(thread_get_danger_set(), addr))
{
drd_report_race(addr, 8, eLoad);
}
@@ -309,8 +307,7 @@
}
sg = running_thread_get_segment();
bm_access_range_store(sg->bm, addr, addr + size);
- if (bm_store_has_conflict_with(thread_get_danger_set(), addr, addr + size)
- && ! drd_is_suppressed(addr, addr + size))
+ if (bm_store_has_conflict_with(thread_get_danger_set(), addr, addr + size))
{
drd_report_race(addr, size, eStore);
}
@@ -329,8 +326,7 @@
}
sg = running_thread_get_segment();
bm_access_store_1(sg->bm, addr);
- if (bm_store_1_has_conflict_with(thread_get_danger_set(), addr)
- && ! drd_is_suppressed(addr, addr + 1))
+ if (bm_store_1_has_conflict_with(thread_get_danger_set(), addr))
{
drd_report_race(addr, 1, eStore);
}
@@ -349,8 +345,7 @@
}
sg = running_thread_get_segment();
bm_access_store_2(sg->bm, addr);
- if (bm_store_2_has_conflict_with(thread_get_danger_set(), addr)
- && ! drd_is_suppressed(addr, addr + 2))
+ if (bm_store_2_has_conflict_with(thread_get_danger_set(), addr))
{
drd_report_race(addr, 2, eStore);
}
@@ -369,8 +364,7 @@
}
sg = running_thread_get_segment();
bm_access_store_4(sg->bm, addr);
- if (bm_store_4_has_conflict_with(thread_get_danger_set(), addr)
- && ! drd_is_suppressed(addr, addr + 4))
+ if (bm_store_4_has_conflict_with(thread_get_danger_set(), addr))
{
drd_report_race(addr, 4, eStore);
}
@@ -389,8 +383,7 @@
}
sg = running_thread_get_segment();
bm_access_store_8(sg->bm, addr);
- if (bm_store_8_has_conflict_with(thread_get_danger_set(), addr)
- && ! drd_is_suppressed(addr, addr + 8))
+ if (bm_store_8_has_conflict_with(thread_get_danger_set(), addr))
{
drd_report_race(addr, 8, eStore);
}
|