Path: blob/main/contrib/llvm-project/compiler-rt/lib/xray/xray_fdr_logging.h
35263 views
//===-- xray_fdr_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_FDR_LOGGING_H12#define XRAY_XRAY_FDR_LOGGING_H1314#include "xray/xray_log_interface.h"15#include "xray_fdr_log_records.h"1617// FDR (Flight Data Recorder) Mode18// ===============================19//20// The XRay whitepaper describes a mode of operation for function call trace21// logging that involves writing small records into an in-memory circular22// buffer, that then gets logged to disk on demand. To do this efficiently and23// capture as much data as we can, we use smaller records compared to the24// default mode of always writing fixed-size records.2526namespace __xray {27XRayLogInitStatus fdrLoggingInit(size_t BufferSize, size_t BufferMax,28void *Options, size_t OptionsSize);29XRayLogInitStatus fdrLoggingFinalize();30void fdrLoggingHandleArg0(int32_t FuncId, XRayEntryType Entry);31void fdrLoggingHandleArg1(int32_t FuncId, XRayEntryType Entry, uint64_t Arg1);32XRayLogFlushStatus fdrLoggingFlush();33XRayLogInitStatus fdrLoggingReset();3435} // namespace __xray3637#endif // XRAY_XRAY_FDR_LOGGING_H383940