[PATCH] D12554: tsan: speed up race deduplication

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 2 10:33:01 PDT 2015


kcc added inline comments.

================
Comment at: lib/lsan/lsan_common.cc:602
@@ -600,2 +601,3 @@
       s->weight += leaks_[i].total_size;
-      s->hit_count += leaks_[i].hit_count;
+      atomic_store(&s->hit_count, atomic_load(&s->hit_count,
+          memory_order_relaxed) + leaks_[i].hit_count, memory_order_relaxed);
----------------
May I ask you to introduce atomic_{load,store}_relaxed to make the code less verbose? 

================
Comment at: test/tsan/race_stress.cc:1
@@ +1,2 @@
+// RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t 2>&1 | FileCheck %s
+#include "test.h"
----------------
Do we still need %deflake? 


http://reviews.llvm.org/D12554





More information about the llvm-commits mailing list