1 //===-- xray_fdr_logging.h ------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file is a part of XRay, a function call tracing system.
12 //===----------------------------------------------------------------------===//
13 #ifndef XRAY_XRAY_FDR_LOGGING_H
14 #define XRAY_XRAY_FDR_LOGGING_H
16 #include "xray/xray_log_interface.h"
17 #include "xray_fdr_log_records.h"
19 // FDR (Flight Data Recorder) Mode
20 // ===============================
22 // The XRay whitepaper describes a mode of operation for function call trace
23 // logging that involves writing small records into an in-memory circular
24 // buffer, that then gets logged to disk on demand. To do this efficiently and
25 // capture as much data as we can, we use smaller records compared to the
26 // default mode of always writing fixed-size records.
29 XRayLogInitStatus fdrLoggingInit(size_t BufferSize, size_t BufferMax,
30 void *Options, size_t OptionsSize);
31 XRayLogInitStatus fdrLoggingFinalize();
32 void fdrLoggingHandleArg0(int32_t FuncId, XRayEntryType Entry);
33 XRayLogFlushStatus fdrLoggingFlush();
34 XRayLogInitStatus fdrLoggingReset();
38 #endif // XRAY_XRAY_FDR_LOGGING_H