Files
clang-p2996/bolt/test/runtime/X86/basic-instrumentation.test
Maksim Panchenko d648aa1b8e [BOLT][TEST] Use double dash flags in tests
Replace a single dash with a double dash for options that have more
than a single letter.

llvm-bolt-wrapper.py has special treatment for output options such as
"-o" and "-w" causing issues when a single dash is used, e.g. for
"-write-dwp". The wrapper can be fixed as well, but using a double dash
has other advantages as well.

Reviewed By: rafauler

Differential Revision: https://reviews.llvm.org/D127538
2022-06-10 16:27:33 -07:00

23 lines
785 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{{$}}