Skip to content

Commit 3000511

Browse files
committed
[BOLT][test] Update log.test and perf_test
Address noisy tests by: - perf_test: bumping sampling frequency to maximum, - log.test: matching Binary Function "main"
1 parent c9e2c38 commit 3000511

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

bolt/test/X86/log.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ RUN: yaml2obj %p/Inputs/blarge.yaml &> %t.exe
66
RUN: llvm-bolt %t.exe -o %t.null --data %p/Inputs/blarge.fdata -v=2 \
77
RUN: --reorder-blocks=normal --print-finalized --log-file=%t.log 2>&1 \
88
RUN: | FileCheck --check-prefix=CHECK --allow-empty %s
9-
RUN: cat %t.log | FileCheck %s --check-prefix=CHECK-LOG
9+
RUN: FileCheck %s --check-prefix=CHECK-LOG --input-file %t.log
1010

1111
CHECK-NOT: BOLT-INFO
1212
CHECK-NOT: BOLT-WARNING
@@ -16,4 +16,4 @@ CHECK-NOT: BOLT-ERROR
1616
CHECK-LOG: BOLT-INFO: Target architecture
1717
CHECK-LOG: BOLT-INFO: BOLT version
1818
CHECK-LOG: BOLT-INFO: basic block reordering modified layout
19-
CHECK-LOG: Binary Function "usqrt"
19+
CHECK-LOG: Binary Function "main"

bolt/test/perf2bolt/perf_test.test

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,12 @@
33
REQUIRES: system-linux, perf
44

55
RUN: %clang %S/Inputs/perf_test.c -fuse-ld=lld -Wl,--script=%S/Inputs/perf_test.lds -o %t
6-
RUN: perf record -e cycles:u -o %t2 -- %t
6+
RUN: perf record -Fmax -e cycles:u -o %t2 -- %t
77
RUN: perf2bolt %t -p=%t2 -o %t3 -nl -ignore-build-id 2>&1 | FileCheck %s
88

99
CHECK-NOT: PERF2BOLT-ERROR
1010
CHECK-NOT: !! WARNING !! This high mismatch ratio indicates the input binary is probably not the same binary used during profiling collection.
1111

1212
RUN: %clang %S/Inputs/perf_test.c -no-pie -fuse-ld=lld -o %t4
13-
RUN: perf record -e cycles:u -o %t5 -- %t4
14-
RUN: perf2bolt %t4 -p=%t5 -o %t6 -nl -ignore-build-id 2>&1 | FileCheck %s --check-prefix=CHECK-NO-PIE
15-
16-
CHECK-NO-PIE-NOT: PERF2BOLT-ERROR
17-
CHECK-NO-PIE-NOT: !! WARNING !! This high mismatch ratio indicates the input binary is probably not the same binary used during profiling collection.
13+
RUN: perf record -Fmax -e cycles:u -o %t5 -- %t4
14+
RUN: perf2bolt %t4 -p=%t5 -o %t6 -nl -ignore-build-id 2>&1 | FileCheck %s

0 commit comments

Comments
 (0)