1 //===-- xray_basic_logging.h ----------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
9 // This file is a part of XRay, a function call tracing system.
11 //===----------------------------------------------------------------------===//
12 #ifndef XRAY_XRAY_INMEMORY_LOG_H
13 #define XRAY_XRAY_INMEMORY_LOG_H
15 #include "xray/xray_log_interface.h"
17 /// Basic (Naive) Mode
18 /// ==================
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.
27 XRayLogInitStatus
basicLoggingInit(size_t BufferSize
, size_t BufferMax
,
28 void *Options
, size_t OptionsSize
);
29 XRayLogInitStatus
basicLoggingFinalize();
31 void basicLoggingHandleArg0RealTSC(int32_t FuncId
, XRayEntryType Entry
);
32 void basicLoggingHandleArg0EmulateTSC(int32_t FuncId
, XRayEntryType Entry
);
33 void basicLoggingHandleArg1RealTSC(int32_t FuncId
, XRayEntryType Entry
,
35 void basicLoggingHandleArg1EmulateTSC(int32_t FuncId
, XRayEntryType Entry
,
37 XRayLogFlushStatus
basicLoggingFlush();
38 XRayLogInitStatus
basicLoggingReset();
42 #endif // XRAY_XRAY_INMEMORY_LOG_H