Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[XRay][compiler-rt] Do not print the warning when the binary is not X…
…Ray instrumented. Summary: Currently when the XRay runtime is linked into a binary that doesn't have the instrumentation map, we print a warning unconditionally. This change attempts to make this behaviour more quiet. Reviewers: kpw, pelikan Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35789 llvm-svn: 309534
- Loading branch information
1 parent
7639db8
commit 5ca1955
Showing
3 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Ensure that we have a quiet startup when we don't have the XRay | ||
// instrumentation sleds. | ||
// | ||
// RUN: %clangxx -std=c++11 %s -o %t %xraylib | ||
// RUN: XRAY_OPTIONS="patch_premain=true verbosity=1" %run %t 2>&1 | \ | ||
// RUN: FileCheck %s --check-prefix NOISY | ||
// RUN: XRAY_OPTIONS="patch_premain=true verbosity=0" %run %t 2>&1 | \ | ||
// RUN: FileCheck %s --check-prefix QUIET | ||
// RUN: XRAY_OPTIONS="" %run %t 2>&1 | FileCheck %s --check-prefix DEFAULT | ||
#include <iostream> | ||
|
||
using namespace std; | ||
|
||
int main(int, char**) { | ||
// NOISY: {{.*}}XRay instrumentation map missing. Not initializing XRay. | ||
// QUIET-NOT: {{.*}}XRay instrumentation map missing. Not initializing XRay. | ||
// DEFAULT-NOT: {{.*}}XRay instrumentation map missing. Not initializing XRay. | ||
cout << "Hello, XRay!" << endl; | ||
// NOISY-NEXT: Hello, XRay! | ||
// QUIET: Hello, XRay! | ||
// DEFAULT: Hello, XRay! | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters