llvm-project/bolt/test/runtime/X86/basic-instrumentation.test
Rafael Auler 2f3285989e [BOLT] Fix tailcall-traps and basic-instr tests on ubuntu
Summary: These tests are failing on opensource ubuntu.

(cherry picked from FBD32514489)
2021-11-17 15:38:36 -08:00

23 lines
780 B
Plaintext

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