Skip to content

Commit 416c782

Browse files
committed
[BOLT][test] Fix perf_test
The interaction between `--show-density` and NFC testing wrapper is a bit subtle. ShowDensity is enabled by default in perf2bolt mode, which is detected based on executable name. NFC wrapper however replaces the invocation of perf2bolt with `llvm-bolt --aggregate-only`, and so ShowDensity is not enabled, which caused NFC test to fail: https://lab.llvm.org/buildbot/#/builders/92/builds/18656 Add show-density flag explicitly to work around the issue. Test Plan: ``` ../llvm-project/bolt/utils/nfc-check-setup.py bin/llvm-lit -a tools/bolt/test/perf2bolt/perf_test.test ```
1 parent 8a9e767 commit 416c782

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bolt/test/perf2bolt/perf_test.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ 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
66
RUN: perf record -Fmax -e cycles:u -o %t2 -- %t
7-
RUN: perf2bolt %t -p=%t2 -o %t3 -nl -ignore-build-id 2>&1 | FileCheck %s
7+
RUN: perf2bolt %t -p=%t2 -o %t3 -nl -ignore-build-id --show-density 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
CHECK: BOLT-INFO: Functions with density >= {{.*}} account for 99.00% total sample counts.
1212

1313
RUN: %clang %S/Inputs/perf_test.c -no-pie -fuse-ld=lld -o %t4
1414
RUN: perf record -Fmax -e cycles:u -o %t5 -- %t4
15-
RUN: perf2bolt %t4 -p=%t5 -o %t6 -nl -ignore-build-id 2>&1 | FileCheck %s
15+
RUN: perf2bolt %t4 -p=%t5 -o %t6 -nl -ignore-build-id --show-density 2>&1 | FileCheck %s

0 commit comments

Comments
 (0)