]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Cleanup: removed old data race detection algorithm implementation.
authorBart Van Assche <bvanassche@acm.org>
Sun, 24 Feb 2008 18:25:43 +0000 (18:25 +0000)
committerBart Van Assche <bvanassche@acm.org>
Sun, 24 Feb 2008 18:25:43 +0000 (18:25 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7442

exp-drd/drd_error.c
exp-drd/drd_error.h

index 23008d1faf264fe9ea587f013b5d51696af3b943..71b8a2e2bcba6c6308271e627dc923977d26b1b4 100644 (file)
@@ -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)
 {
index c298df8219958fe4a924bd4820a3745aa591a9c9..81e7932dd497c81618f475f5d7cea63eeb538da7 100644 (file)
@@ -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);