Skip to content

Commit d12829d

Browse files
authored
[BOLT] Fix perf2bolt/perf_test.test (llvm#154209)
The original test crashed with segmentation fault: ` perf_test.test.script: line 8: 1470352 Segmentation fault (core dumped) perf record -Fmax -e cycles:u -o /home/gpastukhov/llvm-build-release/tools/bolt/test/perf2bolt/Output/perf_test.test.tmp2 -- /home/gpastukhov/llvm-build-release/tools/bolt/test/perf2bolt/Output/perf_test.test.tmp ` The crash happens if the compiler set up not to build PIE by default, however the test expects PIE.
1 parent f941769 commit d12829d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bolt/test/perf2bolt/perf_test.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
REQUIRES: system-linux, perf
44

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

0 commit comments

Comments
 (0)