brintos

brintos / llvm-project-archived public Read only

0
0
Text · 798 B · 0f77b0c Raw
23 lines · plain
1# Try to instrument a very fast test. Input bin will not execute any code during2# runtime besides returning zero in main, so it is a good trivial case.3REQUIRES: system-linux,bolt-runtime4 5RUN: %clang %p/Inputs/basic-instrumentation.s -Wl,-q -o %t.exe6RUN: llvm-bolt %t.exe -o %t --instrument \7RUN:   --instrumentation-file=%t \8RUN:   --instrumentation-file-append-pid9 10# Execute program to collect profile11RUN: rm %t.*.fdata || echo Nothing to remove12RUN: %t13 14# Profile should be written to %t.PID.fdata, check it15RUN: mv %t.*.fdata %t.fdata16RUN: cat %t.fdata | FileCheck -check-prefix=CHECK %s17 18# Check BOLT works with this profile19RUN: llvm-bolt %t.exe --data %t.fdata -o %t.2 --reorder-blocks=cache20 21# The instrumented profile should at least say main was called once22CHECK: main 0 0 1{{$}}23