From: Bart Van Assche Date: Sun, 24 Feb 2008 18:25:43 +0000 (+0000) Subject: Cleanup: removed old data race detection algorithm implementation. X-Git-Tag: svn/VALGRIND_3_4_0~1050 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=59dc2d89a12747ed6ae1539e68648b502f4d5cc6;p=thirdparty%2Fvalgrind.git Cleanup: removed old data race detection algorithm implementation. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7442 --- diff --git a/exp-drd/drd_error.c b/exp-drd/drd_error.c index 23008d1faf..71b8a2e2bc 100644 --- a/exp-drd/drd_error.c +++ b/exp-drd/drd_error.c @@ -217,36 +217,6 @@ Char* describe_addr_text(Addr const a, SizeT const len, AddrInfo* const ai, return buf; } -#ifdef OLD_RACE_DETECTION_ALGORITHM -void drd_report_data_race(const DataRaceInfo* const dri) -{ - AddrInfo ai; - Char descr[256]; - - tl_assert(dri); - tl_assert(dri->range_begin < dri->range_end); - describe_addr_text(dri->range_begin, dri->range_end - dri->range_begin, - &ai, descr, sizeof(descr)); - VG_(message)(Vg_UserMsg, - "0x%08lx sz %ld %c %c (%s)", - dri->range_begin, - dri->range_end - dri->range_begin, - dri->range_access & LHS_W ? 'W' : 'R', - dri->range_access & RHS_W ? 'W' : 'R', - descr); - if (ai.akind == eMallocd && ai.lastchange) - { - VG_(message)(Vg_UserMsg, "Allocation context:"); - VG_(pp_ExeContext)(ai.lastchange); - } - // Note: for stack and heap variables suppression should be - // stopped automatically as soon as the specified memory - // range has been freed. - tl_assert(dri->range_begin < dri->range_end); - drd_start_suppression(dri->range_begin, dri->range_end, "detected race"); -} -#endif - static void drd_report_data_race2(Error* const err, const DataRaceErrInfo* const dri) { diff --git a/exp-drd/drd_error.h b/exp-drd/drd_error.h index c298df8219..81e7932dd4 100644 --- a/exp-drd/drd_error.h +++ b/exp-drd/drd_error.h @@ -72,17 +72,6 @@ struct { // Used by: } AddrInfo; -#ifdef OLD_RACE_DETECTION_ALGORITHM -/* Records info about a data race. */ -typedef struct { - ThreadId tid1; // Thread ID of first thread involved in the data race. - ThreadId tid2; // Thread ID of second thread involved in the data race. - Addr range_begin; // Start address of range involved. - Addr range_end; // Last address (exclusive) of range involved. - UInt range_access; // How the range was accessed (LHS_[RW] | RHS_[RW]). -} DataRaceInfo; -#endif - typedef struct { ThreadId tid; // Thread ID of the running thread. Addr addr; // Conflicting address in current thread. @@ -108,10 +97,6 @@ typedef struct { void describe_addr(Addr const a, SizeT const len, AddrInfo* const ai); Char* describe_addr_text(Addr const a, SizeT const len, AddrInfo* const ai, Char* const buf, UInt const n_buf); -#ifdef OLD_RACE_DETECTION_ALGORITHM -void drd_report_data_race(const DataRaceInfo* const dri); -#endif -//void drd_report_data_race2(const DataRaceErrInfo* const dri); void drd_register_error_handlers(void);