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