1//===-- xray_basic_logging.h ----------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file is a part of XRay, a function call tracing system.
10//
11//===----------------------------------------------------------------------===//
12#ifndef XRAY_XRAY_INMEMORY_LOG_H
13#define XRAY_XRAY_INMEMORY_LOG_H
14
15#include "xray/xray_log_interface.h"
16
17/// Basic (Naive) Mode
18/// ==================
19///
20/// This implementation hooks in through the XRay logging implementation
21/// framework. The Basic Mode implementation will keep appending to a file as
22/// soon as the thread-local buffers are full. It keeps minimal in-memory state
23/// and does the minimum filtering required to keep log files smaller.
24
25namespace __xray {
26
27XRayLogInitStatus basicLoggingInit(size_t BufferSize, size_t BufferMax,
28 void *Options, size_t OptionsSize);
29XRayLogInitStatus basicLoggingFinalize();
30
31void basicLoggingHandleArg0RealTSC(int32_t FuncId, XRayEntryType Entry);
32void basicLoggingHandleArg0EmulateTSC(int32_t FuncId, XRayEntryType Entry);
33void basicLoggingHandleArg1RealTSC(int32_t FuncId, XRayEntryType Entry,
34 uint64_t Arg1);
35void basicLoggingHandleArg1EmulateTSC(int32_t FuncId, XRayEntryType Entry,
36 uint64_t Arg1);
37XRayLogFlushStatus basicLoggingFlush();
38XRayLogInitStatus basicLoggingReset();
39
40} // namespace __xray
41
42#endif // XRAY_XRAY_INMEMORY_LOG_H
43

source code of compiler-rt/lib/xray/xray_basic_logging.h