59 lines · plain
1Basic tests for sample profiles using fs discriminators.2 31- Show command and keep all the discrimiantor bits4RUN: llvm-profdata show --sample %p/Inputs/sample-fs.proftext -profile-isfs | FileCheck %s --check-prefix=SHOW15RUN: llvm-profdata show --sample %p/Inputs/sample-fs.proftext -profile-isfs -fs-discriminator-pass=PassLast | FileCheck %s --check-prefix=SHOW16SHOW1: Function: main: 6436, 0, 6 sampled lines7SHOW1: Samples collected in the function's body {8SHOW1: 4: 5349SHOW1: 4.2: 53410SHOW1: 4.738209026: 106811SHOW1: 5: 107512SHOW1: 5.1: 107513SHOW1: 5.738209025: 215014SHOW1: }15 162- Show command and keep only the base discriminator bits17RUN: llvm-profdata show --sample %p/Inputs/sample-fs.proftext -profile-isfs -fs-discriminator-pass=Base | FileCheck %s --check-prefix=SHOW218SHOW2: Function: main: 6436, 0, 4 sampled lines19SHOW2: Samples collected in the function's body {20SHOW2: 4: 53421SHOW2: 4.2: 160222SHOW2: 5: 107523SHOW2: 5.1: 322524SHOW2: }25 263- Show command and keep only the base discriminator bits and first pass of FS discriminator27RUN: llvm-profdata show --sample %p/Inputs/sample-fs.proftext -profile-isfs -fs-discriminator-pass=Pass1 | FileCheck %s --check-prefix=SHOW328Function: main: 6436, 0, 6 sampled lines29SHOW3: Samples collected in the function's body {30SHOW3: 4: 53431SHOW3: 4.2: 53432SHOW3: 4.11522: 106833SHOW3: 5: 107534SHOW3: 5.1: 107535SHOW3: 5.11521: 215036SHOW3: }37 384- Merge command and keep all the discrimiantor bits39RUN: llvm-profdata merge --sample %p/Inputs/sample-fs.proftext -profile-isfs -fs-discriminator-pass=PassLast --binary -o - | llvm-profdata show --sample - -o %t1-binary_140RUN: llvm-profdata merge --sample %p/Inputs/sample-fs.proftext -profile-isfs --binary -o - | llvm-profdata show --sample - -o %t1-binary_241RUN: llvm-profdata show --sample %p/Inputs/sample-fs.proftext -profile-isfs -o %t1-text42RUN: diff %t1-binary_1 %t1-text43RUN: diff %t1-binary_2 %t1-text44 452- Merge command and keep only the base discriminator bits46RUN: llvm-profdata merge --sample %p/Inputs/sample-fs.proftext -profile-isfs -fs-discriminator-pass=Base --binary -o - | llvm-profdata show --sample - -o %t2-binary47RUN: llvm-profdata show --sample %p/Inputs/sample-fs.proftext -profile-isfs -fs-discriminator-pass=Base -o %t2-text48RUN: diff %t2-binary %t2-text49 503- Merge command and keep only the base discriminator bits and first pass of FS discriminator51RUN: llvm-profdata merge --sample %p/Inputs/sample-fs.proftext -profile-isfs -fs-discriminator-pass=Pass1 --binary -o - | llvm-profdata show --sample - -o %t3-binary52RUN: llvm-profdata show --sample %p/Inputs/sample-fs.proftext -profile-isfs -fs-discriminator-pass=Pass1 -o %t3-text53RUN: diff %t3-binary %t3-text54 554- ProfileIsFS is set properly in extbinary format from the internal option56RUN: llvm-profdata merge --sample %p/Inputs/sample-fs.proftext -profile-isfs --extbinary -o %t_extbin.afdo57RUN: llvm-profdata show --sample --show-sec-info-only %t_extbin.afdo | FileCheck %s --check-prefix=ISFSSET58ISFSSET: Flags: {fs-discriminator}59