[BOLT] Support profile density with basic samples (#137644)
For profile with LBR samples, binary function profile density is computed as a ratio of executed bytes to function size in bytes. For profile with IP samples, use the size of basic block containing the sample IP as a numerator. Test Plan: updated perf_test.test
This commit is contained in:
@@ -8,6 +8,7 @@ RUN: perf2bolt %t -p=%t2 -o %t3 -nl -ignore-build-id 2>&1 | FileCheck %s
|
||||
|
||||
CHECK-NOT: PERF2BOLT-ERROR
|
||||
CHECK-NOT: !! WARNING !! This high mismatch ratio indicates the input binary is probably not the same binary used during profiling collection.
|
||||
CHECK: BOLT-INFO: Functions with density >= {{.*}} account for 99.00% total sample counts.
|
||||
|
||||
RUN: %clang %S/Inputs/perf_test.c -no-pie -fuse-ld=lld -o %t4
|
||||
RUN: perf record -Fmax -e cycles:u -o %t5 -- %t4
|
||||
|
||||
Reference in New Issue
Block a user