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. 3REQUIRES: system-linux,bolt-runtime 4 5RUN: %clang %p/Inputs/basic-instrumentation.s -Wl,-q -o %t.exe 6RUN: llvm-bolt %t.exe -o %t --instrument \ 7RUN: --instrumentation-file=%t \ 8RUN: --instrumentation-file-append-pid 9 10# Execute program to collect profile 11RUN: rm %t.*.fdata || echo Nothing to remove 12RUN: %t 13 14# Profile should be written to %t.PID.fdata, check it 15RUN: mv %t.*.fdata %t.fdata 16RUN: cat %t.fdata | FileCheck -check-prefix=CHECK %s 17 18# Check BOLT works with this profile 19RUN: llvm-bolt %t.exe --data %t.fdata -o %t.2 --reorder-blocks=cache 20 21# The instrumented profile should at least say main was called once 22CHECK: main 0 0 1{{$}} 23