|
From: <sv...@va...> - 2010-08-29 16:22:14
|
Author: bart
Date: 2010-08-29 17:22:04 +0100 (Sun, 29 Aug 2010)
New Revision: 11307
Log:
Removed ANNOTATE_HAPPENS_BEFORE/AFTER() usage restrictions.
Modified:
trunk/drd/drd_clientobj.h
trunk/drd/drd_hb.c
trunk/drd/tests/annotate_hb_err.stderr.exp
Modified: trunk/drd/drd_clientobj.h
===================================================================
--- trunk/drd/drd_clientobj.h 2010-08-29 16:20:54 UTC (rev 11306)
+++ trunk/drd/drd_clientobj.h 2010-08-29 16:22:04 UTC (rev 11307)
@@ -95,7 +95,6 @@
void (*delete_thread)(union drd_clientobj*, DrdThreadId);
ExeContext* first_observed_at;
OSet* oset; // Per-thread order annotation information.
- Bool done; // Whether happens-done has already been invoked.
};
struct semaphore_info
Modified: trunk/drd/drd_hb.c
===================================================================
--- trunk/drd/drd_hb.c 2010-08-29 16:20:54 UTC (rev 11306)
+++ trunk/drd/drd_hb.c 2010-08-29 16:22:04 UTC (rev 11307)
@@ -94,7 +94,6 @@
p->delete_thread = 0;
p->oset = VG_(OSetGen_Create)(0, 0, VG_(malloc), "drd.hb",
VG_(free));
- p->done = False;
}
/**
@@ -176,20 +175,6 @@
if (!p)
return;
- if (p->done)
- {
- GenericErrInfo gei = {
- .tid = DRD_(thread_get_running_tid)(),
- .addr = hb,
- };
- VG_(maybe_record_error)(VG_(get_running_tid)(),
- GenericErr,
- VG_(get_IP)(VG_(get_running_tid)()),
- "happens-before after happens-after",
- &gei);
- return;
- }
-
/* Allocate the per-thread data structure if necessary. */
q = VG_(OSetGen_Lookup)(p->oset, &word_tid);
if (!q)
@@ -215,7 +200,7 @@
struct hb_thread_info* q;
VectorClock old_vc;
- p = DRD_(hb_get)(hb);
+ p = DRD_(hb_get_or_allocate)(hb);
if (DRD_(s_trace_hb))
{
@@ -224,21 +209,8 @@
}
if (!p)
- {
- GenericErrInfo gei = {
- .tid = DRD_(thread_get_running_tid)(),
- .addr = hb,
- };
- VG_(maybe_record_error)(VG_(get_running_tid)(),
- GenericErr,
- VG_(get_IP)(VG_(get_running_tid)()),
- "missing happens-before annotation",
- &gei);
return;
- }
- p->done = True;
-
DRD_(thread_new_segment)(tid);
/*
Modified: trunk/drd/tests/annotate_hb_err.stderr.exp
===================================================================
--- trunk/drd/tests/annotate_hb_err.stderr.exp 2010-08-29 16:20:54 UTC (rev 11306)
+++ trunk/drd/tests/annotate_hb_err.stderr.exp 2010-08-29 16:22:04 UTC (rev 11307)
@@ -1,8 +1,4 @@
-missing happens-before annotation
- at 0x........: vgDrdCl_annotate_happens_after (drd.h:?)
- by 0x........: main (annotate_hb_err.c:?)
-
wrong type of synchronization object
at 0x........: vgDrdCl_annotate_happens_before (drd.h:?)
by 0x........: main (annotate_hb_err.c:?)
@@ -21,16 +17,9 @@
at 0x........: pthread_cond_init (drd_pthread_intercepts.c:?)
by 0x........: main (annotate_hb_err.c:?)
order annotation 0x........ was first observed at:
- at 0x........: vgDrdCl_annotate_happens_before (drd.h:?)
+ at 0x........: vgDrdCl_annotate_happens_after (drd.h:?)
by 0x........: main (annotate_hb_err.c:?)
-happens-before after happens-after
- at 0x........: vgDrdCl_annotate_happens_before (drd.h:?)
- by 0x........: main (annotate_hb_err.c:?)
-order annotation 0x........ was first observed at:
- at 0x........: vgDrdCl_annotate_happens_before (drd.h:?)
- by 0x........: main (annotate_hb_err.c:?)
-
Done.
-ERROR SUMMARY: 5 errors from 5 contexts (suppressed: 0 from 0)
+ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
|