xref: /llvm-project/bolt/test/X86/match-blocks-with-pseudo-probes-inline.test (revision 9a9af0a23fc910694b6a806b7ce9cb2e7e4240ef)
1## Test stale block matching with pseudo probes including inline tree matching.
2# RUN: split-file %s %t
3# RUN: llvm-bolt \
4# RUN:   %S/../../../llvm/test/tools/llvm-profgen/Inputs/inline-cs-pseudoprobe.perfbin \
5# RUN:   -o %t.bolt -data %t/yaml -infer-stale-profile -v=2 \
6# RUN:   --stale-matching-with-pseudo-probes 2>&1 | FileCheck %s
7
8# CHECK: BOLT-WARNING: 3 (100.0% of all profiled) functions have invalid (possibly stale) profile
9# CHECK: BOLT-INFO: inference found an exact pseudo probe match for 100.00% of basic blocks (3 out of 3 stale)
10
11#--- yaml
12---
13header:
14  profile-version: 1
15  binary-name:     'inline-cs-pseudoprobe.perfbin'
16  binary-build-id: '<unknown>'
17  profile-flags:   [ lbr ]
18  profile-origin:  perf data aggregator
19  profile-events:  ''
20  dfs-order:       false
21  hash-func:       xxh3
22functions:
23  - name:            bar
24    fid:             9
25    hash:            0x1
26    exec:            1
27    nblocks:         1
28    blocks:
29      - bid:             0
30        insns:           11
31        hash:            0x1
32        exec:            1
33        probes:          [ { blx: 9 } ]
34    inline_tree:     [ {  } ]
35  - name:            foo
36    fid:             10
37    hash:            0x2
38    exec:            1
39    nblocks:         6
40    blocks:
41      - bid:             0
42        insns:           3
43        hash:            0x2
44        exec:            1
45        succ:            [ { bid: 3, cnt: 0 } ]
46        probes:          [ { blx: 3 } ]
47    inline_tree:     [ { g: 1 }, { g: 0, cs: 8 } ]
48  - name:            main
49    fid:             11
50    hash:            0x3
51    exec:            1
52    nblocks:         6
53    blocks:
54      - bid:             0
55        insns:           3
56        hash:            0x3
57        exec:            1
58        succ:            [ { bid: 3, cnt: 0 } ]
59        probes:          [ { blx: 3, id: 1 }, { blx: 1 } ]
60    inline_tree:     [ { g: 2 }, { g: 1, cs: 2 }, { g: 0, p: 1, cs: 8 } ]
61pseudo_probe_desc:
62  gs:              [ 0xE413754A191DB537, 0x5CF8C24CDB18BDAC, 0xDB956436E78DD5FA ]
63  gh:              [ 2, 0, 1 ]
64  hs:              [ 0x200205A19C5B4, 0x10000FFFFFFFF, 0x10E852DA94 ]
65...
66