16db8c59fSFangrui Song // Check to make sure that we have a log file with a fixed-size. 26db8c59fSFangrui Song 36db8c59fSFangrui Song // RUN: %clangxx_xray -std=c++11 %s -o %t 4*02cdbc34SFangrui Song // RUN: XRAY_OPTIONS="patch_premain=true xray_mode=xray-basic verbosity=1 xray_logfile_base=fixedsize-logging-" %run %t 2>&1 | FileCheck %s 56db8c59fSFangrui Song // 66db8c59fSFangrui Song // After all that, clean up the output xray log. 76db8c59fSFangrui Song // 86db8c59fSFangrui Song // RUN: rm fixedsize-logging-* 96db8c59fSFangrui Song 106db8c59fSFangrui Song // UNSUPPORTED: target-is-mips64,target-is-mips64el 116db8c59fSFangrui Song 126db8c59fSFangrui Song #include <cstdio> 136db8c59fSFangrui Song foo()146db8c59fSFangrui Song[[clang::xray_always_instrument]] void foo() { 156db8c59fSFangrui Song printf("foo() is always instrumented!"); 166db8c59fSFangrui Song } 176db8c59fSFangrui Song main()186db8c59fSFangrui Songint main() { 196db8c59fSFangrui Song // CHECK: XRay: Log file in 'fixedsize-logging-{{.*}}' 206db8c59fSFangrui Song foo(); 216db8c59fSFangrui Song // CHECK: foo() is always instrumented! 226db8c59fSFangrui Song } 23