Author: bart Date: 2008-02-24 18:25:43 +0000 (Sun, 24 Feb 2008) New Revision: 7442
Log: Cleanup: removed old data race detection algorithm implementation. Modified: trunk/exp-drd/drd_error.c trunk/exp-drd/drd_error.h Modified: trunk/exp-drd/drd_error.c =================================================================== --- trunk/exp-drd/drd_error.c 2008-02-24 18:22:37 UTC (rev 7441) +++ trunk/exp-drd/drd_error.c 2008-02-24 18:25:43 UTC (rev 7442) @@ -217,36 +217,6 @@ 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) { Modified: trunk/exp-drd/drd_error.h =================================================================== --- trunk/exp-drd/drd_error.h 2008-02-24 18:22:37 UTC (rev 7441) +++ trunk/exp-drd/drd_error.h 2008-02-24 18:25:43 UTC (rev 7442) @@ -72,18 +72,7 @@ } 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. SizeT size; // Size in bytes of conflicting operation. @@ -108,10 +97,6 @@ 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); ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Valgrind-developers mailing list Valgrind-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-developers