23 lines · plain
1# Check perf2bolt binary function which was compiled with pie2 3REQUIRES: system-linux, perf4 5RUN: %clang %S/Inputs/perf_test.c -fuse-ld=lld -pie -Wl,--script=%S/Inputs/perf_test.lds -o %t6RUN: perf record -Fmax -e cycles:u -o %t2 -- %t7RUN: perf2bolt %t -p=%t2 -o %t3 -ba -ignore-build-id --show-density \8RUN: --heatmap %t.hm 2>&1 | FileCheck %s9RUN: FileCheck %s --input-file %t.hm-section-hotness.csv --check-prefix=CHECK-HM10 11CHECK-NOT: PERF2BOLT-ERROR12CHECK-NOT: !! WARNING !! This high mismatch ratio indicates the input binary is probably not the same binary used during profiling collection.13CHECK: HEATMAP: building heat map14CHECK: BOLT-INFO: Functions with density >= {{.*}} account for 99.00% total sample counts.15 16RUN: %clang %S/Inputs/perf_test.c -no-pie -fuse-ld=lld -o %t417RUN: perf record -Fmax -e cycles:u -o %t5 -- %t418RUN: perf2bolt %t4 -p=%t5 -o %t6 -ba -ignore-build-id --show-density \19RUN: --heatmap %t.hm2 2>&1 | FileCheck %s20RUN: FileCheck %s --input-file %t.hm2-section-hotness.csv --check-prefix=CHECK-HM21 22CHECK-HM: .text23