brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 7e20d1b Raw
39 lines · c
1// REQUIRES: linux2// RUN: %clang_profgen -O2 -o %t %s3// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t4// RUN: llvm-profdata show --profile-version %t.profraw > %t.profraw.out5// RUN: FileCheck %s --check-prefix=RAW-PROF < %t.profraw.out6 7// RUN: rm -rf %t.profdir8// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t9// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t10// RUN: env LLVM_PROFILE_FILE=%t.profdir/default_%m.profraw %run %t11// RUN: llvm-profdata show --profile-version %t.profdir/default_*.profraw > %t.profraw.out12// RUN: FileCheck %s --check-prefix=INDEXED-PROF < %t.profraw.out13 14void foo() {}15 16void bar() {}17 18int main() {19  foo();20  bar();21  return 0;22}23 24// RAW-PROF: Instrumentation level: Front-end25// RAW-PROF-NEXT: Total functions: 326// RAW-PROF-NEXT: Maximum function count: 127// RAW-PROF-NEXT: Maximum internal block count: 028// RAW-PROF-NEXT: Total number of blocks: 329// RAW-PROF-NEXT: Total count: 330// RAW-PROF-NEXT: Profile version: {{[0-9]+}}31 32// INDEXED-PROF: Instrumentation level: Front-end33// INDEXED-PROF-NEXT: Total functions: 334// INDEXED-PROF-NEXT: Maximum function count: 335// INDEXED-PROF-NEXT: Maximum internal block count: 036// INDEXED-PROF-NEXT: Total number of blocks: 337// INDEXED-PROF-NEXT: Total count: 938// INDEXED-PROF-NEXT: Profile version: {{[0-9]+}}39