]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/compiler-rt/lib/xray/xray_basic_logging.h
Merge clang 7.0.1 and several follow-up changes
[FreeBSD/FreeBSD.git] / contrib / compiler-rt / lib / xray / xray_basic_logging.h
1 //===-- xray_basic_logging.h ----------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file is a part of XRay, a function call tracing system.
11 //
12 //===----------------------------------------------------------------------===//
13 #ifndef XRAY_XRAY_INMEMORY_LOG_H
14 #define XRAY_XRAY_INMEMORY_LOG_H
15
16 #include "xray/xray_log_interface.h"
17
18 /// Basic (Naive) Mode
19 /// ==================
20 ///
21 /// This implementation hooks in through the XRay logging implementation
22 /// framework. The Basic Mode implementation will keep appending to a file as
23 /// soon as the thread-local buffers are full. It keeps minimal in-memory state
24 /// and does the minimum filtering required to keep log files smaller.
25
26 namespace __xray {
27
28 XRayLogInitStatus basicLoggingInit(size_t BufferSize, size_t BufferMax,
29                                    void *Options, size_t OptionsSize);
30 XRayLogInitStatus basicLoggingFinalize();
31
32 void basicLoggingHandleArg0RealTSC(int32_t FuncId, XRayEntryType Entry);
33 void basicLoggingHandleArg0EmulateTSC(int32_t FuncId, XRayEntryType Entry);
34 void basicLoggingHandleArg1RealTSC(int32_t FuncId, XRayEntryType Entry,
35                                    uint64_t Arg1);
36 void basicLoggingHandleArg1EmulateTSC(int32_t FuncId, XRayEntryType Entry,
37                                       uint64_t Arg1);
38 XRayLogFlushStatus basicLoggingFlush();
39 XRayLogInitStatus basicLoggingReset();
40
41 } // namespace __xray
42
43 #endif // XRAY_XRAY_INMEMORY_LOG_H