003 File Manager
Current Path:
/usr/src/contrib/llvm-project/compiler-rt/lib/tsan/benchmarks
usr
/
src
/
contrib
/
llvm-project
/
compiler-rt
/
lib
/
tsan
/
benchmarks
/
📁
..
📄
func_entry_exit.cpp
(397 B)
📄
mini_bench_local.cpp
(1.06 KB)
📄
mini_bench_shared.cpp
(1.1 KB)
📄
mop.cpp
(2.01 KB)
📄
start_many_threads.cpp
(1.48 KB)
📄
vts_many_threads_bench.cpp
(3.5 KB)
Editing: func_entry_exit.cpp
// Synthetic benchmark for __tsan_func_entry/exit (spends ~75% there). void foo(bool x); int main() { volatile int kRepeat1 = 1 << 30; const int kRepeat = kRepeat1; for (int i = 0; i < kRepeat; i++) foo(false); } __attribute__((noinline)) void bar(volatile bool x) { if (x) foo(x); } __attribute__((noinline)) void foo(bool x) { if (__builtin_expect(x, false)) bar(x); }
Upload File
Create Folder