1; RUN: llvm-profgen --format=text --perfscript=%S/Inputs/noinline-cs-pseudoprobe.perfscript --binary=%S/Inputs/noinline-cs-pseudoprobe.perfbin --output=%t1 --ignore-stack-samples 2; RUN: FileCheck %s --input-file %t1 3; RUN: llvm-profgen --format=text --perfscript=%S/Inputs/noinline-cs-pseudoprobe.aggperfscript --binary=%S/Inputs/noinline-cs-pseudoprobe.perfbin --output=%t2 --ignore-stack-samples 4; RUN: FileCheck %s --input-file %t2 5 6 7; CHECK: foo:75:0 8; CHECK-NEXT: 1: 0 9; CHECK-NEXT: 2: 15 10; CHECK-NEXT: 3: 15 11; CHECK-NEXT: 4: 15 12; CHECK-NEXT: 5: 0 13; CHECK-NEXT: 6: 15 14; CHECK-NEXT: 7: 0 15; CHECK-NEXT: 8: 15 bar:15 16; CHECK-NEXT: 9: 0 17; CHECK-NEXT: !CFGChecksum: 563088904013236 18; CHECK-NEXT: bar:30:15 19; CHECK-NEXT: 1: 15 20; CHECK-NEXT: 4: 15 21; CHECK-NEXT: !CFGChecksum: 72617220756 22 23 24 25; clang -O3 -fuse-ld=lld -fpseudo-probe-for-profiling 26; -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Xclang -mdisable-tail-calls 27; -fno-inline-functions -g test.c -o a.out 28 29#include <stdio.h> 30 31int bar(int x, int y) { 32 if (x % 3) { 33 return x - y; 34 } 35 return x + y; 36} 37 38void foo() { 39 int s, i = 0; 40 while (i++ < 4000 * 4000) 41 if (i % 91) s = bar(i, s); else s += 30; 42 printf("sum is %d\n", s); 43} 44 45int main() { 46 foo(); 47 return 0; 48} 49