llvm-project/compiler-rt/include/xray
Dean Michael Berris 35824efb45 [XRay][compiler-rt] Add APIs for processing logs in memory
Summary:
This change adds APIs to allow logging implementations to provide a
function for iterating through in-memory buffers (if they hold in-memory
buffers) and a way for users to generically deal with these buffers
in-process. These APIs are:

  - __xray_log_set_buffer_iterator(...) and
    __xray_log_remove_buffer_iterator(): installs and removes an
    iterator function that takes an XRayBuffer and yields the next one.

  - __xray_log_process_buffers(...): takes a function pointer that can
    take a mode identifier (string) and an XRayBuffer to process this
    data as they see fit.

The intent is to have the FDR mode implementation's buffers be
available through this `__xray_log_process_buffers(...)` API, so that
they can be streamed from memory instead of flushed to disk (useful for
getting the data to a network, or doing in-process analysis).

Basic mode logging will not support this mechanism as it's designed to
write the data mostly to disk.

Future implementations will may depend on this API as well, to allow for
programmatically working through the XRay buffers exposed to the
users in some fashion.

Reviewers: eizan, kpw, pelikan

Subscribers: llvm-commits

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

llvm-svn: 326866
2018-03-07 02:45:14 +00:00
..
xray_interface.h [XRay][compiler-rt] Allow for building the XRay runtime without PREINIT initialization. 2017-08-03 00:58:45 +00:00
xray_log_interface.h [XRay][compiler-rt] Add APIs for processing logs in memory 2018-03-07 02:45:14 +00:00
xray_records.h [XRay] [compiler-rt] stop writing garbage in naive log records 2018-01-30 13:25:25 +00:00