brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 89caca6 Raw
43 lines · c
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-exception6//7//===----------------------------------------------------------------------===//8//9// This file is a part of XRay, a function call tracing system.10//11//===----------------------------------------------------------------------===//12#ifndef XRAY_XRAY_INMEMORY_LOG_H13#define XRAY_XRAY_INMEMORY_LOG_H14 15#include "xray/xray_log_interface.h"16 17/// Basic (Naive) Mode18/// ==================19///20/// This implementation hooks in through the XRay logging implementation21/// framework. The Basic Mode implementation will keep appending to a file as22/// soon as the thread-local buffers are full. It keeps minimal in-memory state23/// 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 __xray41 42#endif // XRAY_XRAY_INMEMORY_LOG_H43