Path: blob/main/contrib/llvm-project/compiler-rt/lib/xray/xray_basic_logging.h
35265 views
//===-- xray_basic_logging.h ----------------------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This file is a part of XRay, a function call tracing system.9//10//===----------------------------------------------------------------------===//11#ifndef XRAY_XRAY_INMEMORY_LOG_H12#define XRAY_XRAY_INMEMORY_LOG_H1314#include "xray/xray_log_interface.h"1516/// Basic (Naive) Mode17/// ==================18///19/// This implementation hooks in through the XRay logging implementation20/// framework. The Basic Mode implementation will keep appending to a file as21/// soon as the thread-local buffers are full. It keeps minimal in-memory state22/// and does the minimum filtering required to keep log files smaller.2324namespace __xray {2526XRayLogInitStatus basicLoggingInit(size_t BufferSize, size_t BufferMax,27void *Options, size_t OptionsSize);28XRayLogInitStatus basicLoggingFinalize();2930void basicLoggingHandleArg0RealTSC(int32_t FuncId, XRayEntryType Entry);31void basicLoggingHandleArg0EmulateTSC(int32_t FuncId, XRayEntryType Entry);32void basicLoggingHandleArg1RealTSC(int32_t FuncId, XRayEntryType Entry,33uint64_t Arg1);34void basicLoggingHandleArg1EmulateTSC(int32_t FuncId, XRayEntryType Entry,35uint64_t Arg1);36XRayLogFlushStatus basicLoggingFlush();37XRayLogInitStatus basicLoggingReset();3839} // namespace __xray4041#endif // XRAY_XRAY_INMEMORY_LOG_H424344