brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 75c3da2 Raw
23 lines · plain
1REQUIRES: x86_64-linux2 3To update the inputs used below run Inputs/update_memprof_inputs.sh /path/to/updated/clang4RUN: llvm-readelf --notes %p/Inputs/buildid.memprofexe > %t1.txt5RUN: llvm-profdata show --memory %p/Inputs/buildid.memprofraw --profiled-binary %p/Inputs/buildid.memprofexe -o -  > %t2.txt6RUN: cat %t1.txt %t2.txt | FileCheck %s7 8Test that we print out the profile build ids when --profiled-binary is empty. 9RUN: not llvm-profdata show --memory %p/Inputs/buildid.memprofraw -o - 2> %t3.txt10RUN: cat %t1.txt %t3.txt | FileCheck %s11 12COM: First extract the id from the llvm-readelf output.13CHECK: Build ID: [[ID:[[:xdigit:]]+]]14 15COM: Then match it with the profdata output.16CHECK-COUNT-1: BuildId: {{.*}}[[ID]]17 18Test error message when profile build id does not match build id in a different binary.19RUN: not llvm-profdata show --memory %p/Inputs/buildid.memprofraw --profiled-binary %p/Inputs/basic.memprofexe -o - 2>&1 | FileCheck %s -check-prefix=BUILDID-NOT-MATCH20RUN: not llvm-profdata merge %p/Inputs/buildid.memprofraw %p/Inputs/basic.memprofraw  --profiled-binary %p/Inputs/basic.memprofexe -o %t4.prof 2>&1 | FileCheck %s -check-prefix=BUILDID-NOT-MATCH21 22BUILDID-NOT-MATCH: No matching executable segments found in binary23