brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · d97d82e Raw
32 lines · plain
1Tests for conversion between text and binary encoded sample profiles.2 31- Encode the original profile into binary form. All the tests below will use4   the binary profile.5RUN: llvm-profdata merge --sample %p/Inputs/inline-samples.afdo -o %t.profbin6 72- Show all functions. This profile has a single main() function with several8   inlined callees.9RUN: llvm-profdata show --sample %t.profbin | FileCheck %s --check-prefix=SHOW110SHOW1: Function: main: 366846, 0, 6 sampled lines11SHOW1: 2.3: inlined callee: _Z3fool: 246044, 0, 3 sampled lines12SHOW1:   1.3: inlined callee: _Z3bari: 0, 0, 2 sampled lines13SHOW1:   1.7: inlined callee: _Z3bari: 99492, 0, 2 sampled lines14SHOW1:     1.2: 4673215SHOW1:   1.8: inlined callee: _Z3bari: 0, 0, 2 sampled lines16 173- Convert the binary profile to text encoding and check that they are both18   identical.19RUN: llvm-profdata merge --sample %t.profbin --text -o - | llvm-profdata show --sample - -o %t-bintext20RUN: llvm-profdata show --sample %p/Inputs/inline-samples.afdo -o %t-text21RUN: diff %t-bintext %t-text22 234- Merge the binary and text encodings of the profile and check that the24   counters have doubled.25RUN: llvm-profdata merge --sample --text %t.profbin %p/Inputs/inline-samples.afdo -o - | FileCheck %s --check-prefix=MERGE126RUN: llvm-profdata merge --sample --text - < %t.profbin %p/Inputs/inline-samples.afdo -o - | FileCheck %s --check-prefix=MERGE127MERGE1: main:733692:028MERGE1: 2.3: 12080229MERGE1: 2.3: _Z3fool:49208830MERGE1: 1.7: _Z3bari:19898431MERGE1: 1.1: 10552032