summaryrefslogtreecommitdiff
path: root/test/xray/TestCases/Posix/profiling-single-threaded.cc
diff options
context:
space:
mode:
authorDean Michael Berris <dberris@google.com>2018-06-12 04:06:25 +0000
committerDean Michael Berris <dberris@google.com>2018-06-12 04:06:25 +0000
commit31049741a2a2c58ebe04fc2e13b62ae8398945f4 (patch)
tree3669e45b54390db233f5bef24ef5add39829e92d /test/xray/TestCases/Posix/profiling-single-threaded.cc
parentda1b8bff539cef08140fb20b8e7ed0ae0c244df5 (diff)
[XRay][profiler] Part 5: Profiler File Writing
Summary: This is part of the larger XRay Profiling Mode effort. This patch implements the profile writing mechanism, to allow profiles collected through the profiler mode to be persisted to files. Follow-on patches would allow us to load these profiles and start converting/analysing them through the `llvm-xray` tool. Depends on D44620. Reviewers: echristo, kpw, pelikan Reviewed By: kpw Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D45998 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@334472 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/xray/TestCases/Posix/profiling-single-threaded.cc')
-rw-r--r--test/xray/TestCases/Posix/profiling-single-threaded.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/xray/TestCases/Posix/profiling-single-threaded.cc b/test/xray/TestCases/Posix/profiling-single-threaded.cc
index 91d3efbe4..6ce1f06a0 100644
--- a/test/xray/TestCases/Posix/profiling-single-threaded.cc
+++ b/test/xray/TestCases/Posix/profiling-single-threaded.cc
@@ -3,7 +3,13 @@
//
// FIXME: Make -fxray-modes=xray-profiling part of the default?
// RUN: %clangxx_xray -std=c++11 %s -o %t -fxray-modes=xray-profiling
-// RUN: %run %t
+// RUN: rm xray-log.profiling-single-* || true
+// RUN: XRAY_OPTIONS=verbosity=1 \
+// RUN: XRAY_PROFILING_OPTIONS=no_flush=true %run %t
+// RUN: XRAY_OPTIONS=verbosity=1 %run %t
+// RUN: PROFILES=`ls xray-log.profiling-single-* | wc -l`
+// RUN: [ $PROFILES -eq 2 ]
+// RUN: rm xray-log.profiling-single-* || true
//
// UNSUPPORTED: target-is-mips64,target-is-mips64el