diff options
author | Dean Michael Berris <dberris@google.com> | 2018-07-31 04:16:54 +0000 |
---|---|---|
committer | Dean Michael Berris <dberris@google.com> | 2018-07-31 04:16:54 +0000 |
commit | bc821e04b5903da1e87031d4c6112eace2cb0b32 (patch) | |
tree | 98a3f49bdf2579f6f227a24fbbdc52cbd82aed43 /test/xray/TestCases/Posix/profiling-single-threaded.cc | |
parent | 6172f778f61ee72085844a6566b72bdd2be141f4 (diff) |
[XRay][compiler-rt] Profiling Mode: Include file header in buffers
Summary:
This change provides access to the file header even in the in-memory
buffer processing. This allows in-memory processing of the buffers to
also check the version, and the format, of the profile data.
Reviewers: eizan, kpw
Reviewed By: eizan
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D50037
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@338347 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.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/xray/TestCases/Posix/profiling-single-threaded.cc b/test/xray/TestCases/Posix/profiling-single-threaded.cc index fd508b1ac..fc518145e 100644 --- a/test/xray/TestCases/Posix/profiling-single-threaded.cc +++ b/test/xray/TestCases/Posix/profiling-single-threaded.cc @@ -47,7 +47,10 @@ volatile int buffer_counter = 0; f0(); assert(__xray_log_process_buffers(process_buffer) == XRayLogFlushStatus::XRAY_LOG_FLUSHED); - assert(buffer_counter == 1); + // There's always at least one buffer, containing the profile file header. We + // assert that we have two, to indicate that we're expecting exactly one + // thread's worth of data. + assert(buffer_counter == 2); assert(__xray_log_flushLog() == XRayLogFlushStatus::XRAY_LOG_FLUSHED); // Let's reset the counter. @@ -60,6 +63,6 @@ volatile int buffer_counter = 0; f0(); assert(__xray_log_process_buffers(process_buffer) == XRayLogFlushStatus::XRAY_LOG_FLUSHED); - assert(buffer_counter == 1); + assert(buffer_counter == 2); assert(__xray_log_flushLog() == XRayLogFlushStatus::XRAY_LOG_FLUSHED); } |