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