llvm-project/compiler-rt/test/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
..
TestCases/Posix [XRay][compiler-rt] Add APIs for processing logs in memory 2018-03-07 02:45:14 +00:00
Unit [XRay][compiler-rt] Enable the XRay compiler-rt unit tests. 2017-08-31 00:50:12 +00:00
CMakeLists.txt [xray] Don't try to run XRay unit tests on Darwin 2018-01-28 03:11:25 +00:00
lit.cfg Xray instrumentation / enabling more tests 2018-02-22 06:08:26 +00:00
lit.site.cfg.in [XRay][compiler-rt] Enable the XRay compiler-rt unit tests. 2017-08-31 00:50:12 +00:00