llvm-project/compiler-rt/lib/xray
Dean Michael Berris e7dbebf182 [XRay][compiler-rt] XRay Flight Data Recorder Mode
Summary:
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 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.

Reviewers: echristo, rSerge, majnemer

Subscribers: mehdi_amini, llvm-commits, mgorny

Differential Revision: https://reviews.llvm.org/D27038

llvm-svn: 293015
2017-01-25 03:50:46 +00:00
..
tests [XRay][compiler-rt] XRay Flight Data Recorder Mode 2017-01-25 03:50:46 +00:00
CMakeLists.txt [XRay][compiler-rt] XRay Flight Data Recorder Mode 2017-01-25 03:50:46 +00:00
xray_AArch64.cc [XRay][AArch64] An attempt to fix test patching-unpatching.cc by flushing the instruction cache after code modification 2017-01-10 16:16:33 +00:00
xray_arm.cc [XRay][Arm] Enable back XRay testing on Arm32 and fix the failing tests 2017-01-19 20:27:11 +00:00
xray_buffer_queue.cc [XRay][compiler-rt] XRay Flight Data Recorder Mode 2017-01-25 03:50:46 +00:00
xray_buffer_queue.h [XRay][compiler-rt] XRay Flight Data Recorder Mode 2017-01-25 03:50:46 +00:00
xray_defs.h [XRay][compiler-rt] Disable XRay instrumentation of the XRay runtime. 2016-11-16 01:01:13 +00:00
xray_emulate_tsc.h [XRay] [compiler-rt] Move machine-dependent code into machine-dependent files 2016-12-22 07:35:56 +00:00
xray_fdr_logging.cc [XRay][compiler-rt] XRay Flight Data Recorder Mode 2017-01-25 03:50:46 +00:00
xray_fdr_logging.h [XRay][compiler-rt] XRay Flight Data Recorder Mode 2017-01-25 03:50:46 +00:00
xray_flags.cc [XRay][compiler-rt] Disable XRay instrumentation of the XRay runtime. 2016-11-16 01:01:13 +00:00
xray_flags.h [compiler-rt][XRay] re-submitting r276117, with fixes for build breakage due to extraneous and missing dependencies and attempts to build on unsupported OSes 2016-07-21 07:39:55 +00:00
xray_flags.inc [XRay][compiler-rt] XRay Flight Data Recorder Mode 2017-01-25 03:50:46 +00:00
xray_init.cc [XRay][compiler-rt] Disable XRay instrumentation of the XRay runtime. 2016-11-16 01:01:13 +00:00
xray_inmemory_log.cc [XRay][compiler-rt] XRay Flight Data Recorder Mode 2017-01-25 03:50:46 +00:00
xray_interface.cc [XRay][AArch64] Attempt to fix unstable test XRay-aarch64-linux::patching-unpatching.cc 2016-12-05 23:29:56 +00:00
xray_interface_internal.h [XRay] [compiler-rt] Move machine-dependent code into machine-dependent files 2016-12-22 07:35:56 +00:00
xray_log_interface.cc [XRay][compiler-rt] XRay Flight Data Recorder Mode 2017-01-25 03:50:46 +00:00
xray_trampoline_AArch64.S [XRay] Support AArch64 in compiler-rt 2016-11-21 03:20:43 +00:00
xray_trampoline_arm.S [XRay] ARM 32-bit no-Thumb support in compiler-rt 2016-09-20 14:35:57 +00:00
xray_trampoline_x86_64.S xray: fix assembly macro definition 2016-12-15 18:54:27 +00:00
xray_utils.cc [XRay][compiler-rt] XRay Flight Data Recorder Mode 2017-01-25 03:50:46 +00:00
xray_utils.h [XRay][compiler-rt] XRay Flight Data Recorder Mode 2017-01-25 03:50:46 +00:00
xray_x86_64.cc [compiler-rt] Add missing includes of <errno.h> and <iterator> 2016-12-22 15:31:21 +00:00
xray_x86_64.h [XRay][compiler-rt] XRay Flight Data Recorder Mode 2017-01-25 03:50:46 +00:00