| 1 | // Check to make sure that we have a log file with a fixed-size. |
| 2 | |
| 3 | // RUN: %clangxx_xray -std=c++11 %s -o %t |
| 4 | // RUN: env XRAY_OPTIONS="patch_premain=true xray_mode=xray-basic verbosity=1 xray_logfile_base=fixedsize-logging-" %run %t 2>&1 | FileCheck %s |
| 5 | // |
| 6 | // After all that, clean up the output xray log. |
| 7 | // |
| 8 | // RUN: rm fixedsize-logging-* |
| 9 | |
| 10 | // UNSUPPORTED: target-is-mips64,target-is-mips64el |
| 11 | |
| 12 | #include <cstdio> |
| 13 | |
| 14 | [[clang::xray_always_instrument]] void foo() { |
| 15 | printf(format: "foo() is always instrumented!" ); |
| 16 | } |
| 17 | |
| 18 | int main() { |
| 19 | // CHECK: XRay: Log file in 'fixedsize-logging-{{.*}}' |
| 20 | foo(); |
| 21 | // CHECK: foo() is always instrumented! |
| 22 | } |
| 23 | |