[compiler-rt] 7afd956 - [compiler-rt][memprof] Disambiguate checks for __tls_get_addr in output

Leonard Chan via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 6 13:54:57 PDT 2021


Author: Leonard Chan
Date: 2021-10-06T13:54:42-07:00
New Revision: 7afd956e0fff78cf0f0be6b362ba1796bae31932

URL: https://github.com/llvm/llvm-project/commit/7afd956e0fff78cf0f0be6b362ba1796bae31932
DIFF: https://github.com/llvm/llvm-project/commit/7afd956e0fff78cf0f0be6b362ba1796bae31932.diff

LOG: [compiler-rt][memprof] Disambiguate checks for __tls_get_addr in output

TestCases/stress_dtls.c was failing when we ran memprof tests for the first
time. The test checks that __tls_get_addr is not in the output for the last
run when it is possible for the interceptor __interceptor___tls_get_addr to
be in the output from stack dumps. The test actually intends to check that
the various __tls_get_addr reports don't get emitted when intercept_tls_get_addr=0.
This updates the test to also check for the following `:` and preceding `==`
which should ignore the __interceptor___tls_get_addr interceptor.

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

Added: 
    

Modified: 
    compiler-rt/test/memprof/TestCases/stress_dtls.c

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/memprof/TestCases/stress_dtls.c b/compiler-rt/test/memprof/TestCases/stress_dtls.c
index 0cabf0dc0f54..f730ccad5043 100644
--- a/compiler-rt/test/memprof/TestCases/stress_dtls.c
+++ b/compiler-rt/test/memprof/TestCases/stress_dtls.c
@@ -10,19 +10,19 @@
 // RUN: %env_memprof_opts=log_path=stderr:verbosity=2 %run %t 10 2 2>&1 | FileCheck %s
 // RUN: %env_memprof_opts=log_path=stderr:verbosity=2:intercept_tls_get_addr=1 %run %t 10 2 2>&1 | FileCheck %s
 // RUN: %env_memprof_opts=log_path=stderr:verbosity=2:intercept_tls_get_addr=0 %run %t 10 2 2>&1 | FileCheck %s --check-prefix=CHECK0
-// CHECK: __tls_get_addr
+// CHECK: ==__tls_get_addr:
 // CHECK: Creating thread 0
-// CHECK: __tls_get_addr
+// CHECK: ==__tls_get_addr:
 // CHECK: Creating thread 1
-// CHECK: __tls_get_addr
+// CHECK: ==__tls_get_addr:
 // CHECK: Creating thread 2
-// CHECK: __tls_get_addr
+// CHECK: ==__tls_get_addr:
 // CHECK: Creating thread 3
-// CHECK: __tls_get_addr
+// CHECK: ==__tls_get_addr:
 // Make sure that TLS slots don't leak
 // CHECK-NOT: num_live_dtls 5
 //
-// CHECK0-NOT: __tls_get_addr
+// CHECK0-NOT: ==__tls_get_addr:
 /*
 cc=your-compiler
 


        


More information about the llvm-commits mailing list