1 # Try to instrument a very fast test. Input bin will not execute any code during
2 # runtime besides returning zero in main, so it is a good trivial case.
3 REQUIRES: system-linux,bolt-runtime
5 RUN: %clang %p/Inputs/basic-instrumentation.s -Wl,-q -o %t.exe
6 RUN: llvm-bolt %t.exe -o %t --instrument \
7 RUN: --instrumentation-file=%t \
8 RUN: --instrumentation-file-append-pid
10 # Execute program to collect profile
11 RUN: rm %t.*.fdata || echo Nothing to remove
14 # Profile should be written to %t.PID.fdata, check it
15 RUN: mv %t.*.fdata %t.fdata
16 RUN: cat %t.fdata | FileCheck -check-prefix=CHECK %s
18 # Check BOLT works with this profile
19 RUN: llvm-bolt %t.exe --data %t.fdata -o %t.2 --reorder-blocks=cache
21 # The instrumented profile should at least say main was called once
22 CHECK: main 0 0 1{{$}}