[PATCH] D27038: [XRay][compiler-rt] XRay Flight Data Recorder Mode
Dean Michael Berris via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 23 00:58:16 PST 2016
dberris created this revision.
dberris added reviewers: echristo, rSerge, majnemer.
dberris added a subscriber: llvm-commits.
dberris added a dependency: D26232: [XRay][compiler-rt] XRay Buffer Queue.
Herald added subscribers: mgorny, mehdi_amini.
In this change we introduce the notion of a "flight data recorder" mode
for XRay logging, where XRay logs in-memory first, and write out data
on-demand as required (as opposed to the naive implementation that keeps
logging while tracing is "on"). This depends on https://reviews.llvm.org/D26232 where we
implement the core data structure for holding the buffers that threads
will be using to write out records of operation.
This implementation only currently works on x86_64 and depends heavily
on the TSC math to write out smaller records to the inmemory buffers.
Also, this implementation defines two different kinds of records with
different sizes (compared to the current naive implementation): a
MetadataRecord (16 bytes) and a FunctionRecord (8 bytes). MetadataRecord
entries are meant to write out information like the thread ID for which
the metadata record is defined for, whether the execution of a thread
moved to a different CPU, etc. while a FunctionRecord represents the
different kinds of function call entry/exit records we might encounter
in the course of a thread's execution along with a delta from the last
time the logging handler was called.
While this implementation is not exactly what is described in the
original XRay whitepaper, this one gives us an initial implementation
that we can iterate and build upon.
https://reviews.llvm.org/D27038
Files:
include/xray/xray_log_interface.h
lib/xray/CMakeLists.txt
lib/xray/tests/CMakeLists.txt
lib/xray/tests/unit/CMakeLists.txt
lib/xray/tests/unit/fdr_logging_test.cc
lib/xray/xray_buffer_queue.cc
lib/xray/xray_fdr_logging.cc
lib/xray/xray_fdr_logging.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27038.79042.patch
Type: text/x-patch
Size: 27665 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161123/7c5271d9/attachment.bin>
More information about the llvm-commits
mailing list