2018-07-18 09:31:46 +08:00
|
|
|
# This script checks that perf2bolt is reading pre-aggregated perf information
|
|
|
|
# correctly for a simple example. The perf.data of this example was generated
|
|
|
|
# with the following command:
|
|
|
|
#
|
|
|
|
# $ perf record -j any,u -e branch -o perf.data -- ./blarge
|
|
|
|
#
|
|
|
|
# blarge is the binary for "basicmath large inputs" taken from Mibench.
|
|
|
|
|
2020-06-25 09:24:07 +08:00
|
|
|
# Currently failing in MacOS / generating different hash for usqrt
|
2020-07-01 09:36:49 +08:00
|
|
|
REQUIRES: system-linux
|
2020-06-25 09:24:07 +08:00
|
|
|
|
2018-07-18 09:31:46 +08:00
|
|
|
RUN: yaml2obj %p/Inputs/blarge.yaml &> %t.exe
|
|
|
|
RUN: perf2bolt %t.exe -o %t -pa -p %p/Inputs/pre-aggregated.txt -w %t.new
|
|
|
|
RUN: cat %t | sort | FileCheck %s -check-prefix=PERF2BOLT
|
|
|
|
RUN: cat %t.new | FileCheck %s -check-prefix=NEWFORMAT
|
|
|
|
|
|
|
|
PERF2BOLT: 0 [unknown] 7f36d18d60c0 1 main 53c 0 2
|
|
|
|
PERF2BOLT: 1 main 451 1 SolveCubic 0 0 2
|
|
|
|
PERF2BOLT: 1 main 490 0 [unknown] 4005f0 0 1
|
|
|
|
PERF2BOLT: 1 main 537 0 [unknown] 400610 0 1
|
|
|
|
PERF2BOLT: 1 usqrt 30 1 usqrt 32 0 22
|
|
|
|
PERF2BOLT: 1 usqrt 30 1 usqrt 39 4 33
|
|
|
|
PERF2BOLT: 1 usqrt 35 1 usqrt 39 0 22
|
|
|
|
PERF2BOLT: 1 usqrt 3d 1 usqrt 10 0 58
|
|
|
|
PERF2BOLT: 1 usqrt 3d 1 usqrt 3f 0 22
|
2021-12-19 09:03:35 +08:00
|
|
|
PERF2BOLT: 1 usqrt a 1 usqrt 10 0 22
|
2018-07-18 09:31:46 +08:00
|
|
|
|
|
|
|
NEWFORMAT: - name: usqrt
|
|
|
|
NEWFORMAT: fid: 7
|
|
|
|
NEWFORMAT: exec: 0
|
|
|
|
NEWFORMAT: nblocks: 5
|
|
|
|
NEWFORMAT: blocks:
|
|
|
|
NEWFORMAT: - bid: 0
|
2021-12-19 09:03:35 +08:00
|
|
|
NEWFORMAT: insns: 4
|
2018-07-18 09:31:46 +08:00
|
|
|
NEWFORMAT: succ: [ { bid: 1, cnt: 22 } ]
|
|
|
|
NEWFORMAT: - bid: 1
|
|
|
|
NEWFORMAT: insns: 9
|
|
|
|
NEWFORMAT: succ: [ { bid: 3, cnt: 33, mis: 4 }, { bid: 2, cnt: 22 } ]
|
|
|
|
NEWFORMAT: - bid: 2
|
|
|
|
NEWFORMAT: insns: 2
|
|
|
|
NEWFORMAT: succ: [ { bid: 3, cnt: 22 } ]
|
|
|
|
NEWFORMAT: - bid: 3
|
|
|
|
NEWFORMAT: insns: 2
|
|
|
|
NEWFORMAT: succ: [ { bid: 1, cnt: 58 }, { bid: 4, cnt: 22 } ]
|