[llvm-branch-commits] [compiler-rt] 5ccc104 - [compiler-rt] Reduce the number of threads in gcov test to avoid failure

Tom Stellard via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Jun 23 15:43:58 PDT 2020


Author: Calixte Denizet
Date: 2020-06-23T15:43:11-07:00
New Revision: 5ccc104c206c02e712dec68cc0daef6379f51861

URL: https://github.com/llvm/llvm-project/commit/5ccc104c206c02e712dec68cc0daef6379f51861
DIFF: https://github.com/llvm/llvm-project/commit/5ccc104c206c02e712dec68cc0daef6379f51861.diff

LOG: [compiler-rt] Reduce the number of threads in gcov test to avoid failure

Summary:
Patch in D78477 introduced a new test for gcov and this test is failing on arm:
 - http://lab.llvm.org:8011/builders/clang-cmake-thumbv7-full-sh/builds/4752/steps/ninja%20check%202/logs/stdio
  - http://lab.llvm.org:8011/builders/clang-cmake-armv7-full/builds/10501/steps/ninja%20check%202/logs/stdio
So try to fix it in reducing the number of threads.

Reviewers: marco-c

Reviewed By: marco-c

Subscribers: dberris, kristof.beyls, #sanitizers, serge-sans-paille, sylvestre.ledru

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D79621

(cherry picked from commit 0da37bedc2667da371eda30595a06210595881d0)

Added: 
    

Modified: 
    compiler-rt/test/profile/Inputs/instrprof-gcov-multithread_fork.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/profile/Inputs/instrprof-gcov-multithread_fork.cpp b/compiler-rt/test/profile/Inputs/instrprof-gcov-multithread_fork.cpp
index 94db50fc8265..0f043caedf3e 100644
--- a/compiler-rt/test/profile/Inputs/instrprof-gcov-multithread_fork.cpp
+++ b/compiler-rt/test/profile/Inputs/instrprof-gcov-multithread_fork.cpp
@@ -1,27 +1,17 @@
 #include <sys/types.h>
 #include <thread>
 #include <unistd.h>
-#include <vector>
 
 template <typename T>
 void launcher(T func) {
-  std::vector<std::thread> pool;
+  auto t1 = std::thread(func);
+  auto t2 = std::thread(func);
 
-  for (int i = 0; i < 10; i++) {
-    pool.emplace_back(std::thread(func));
-  }
-
-  for (auto &t : pool) {
-    t.join();
-  }
+  t1.join();
+  t2.join();
 }
 
-void h() {}
-
-void g() {
-  fork();
-  launcher<>(h);
-}
+void g() {}
 
 void f() {
   fork();


        


More information about the llvm-branch-commits mailing list