brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 6df0057 Raw
39 lines · c
1//===-- xray_fdr_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_FDR_LOGGING_H13#define XRAY_XRAY_FDR_LOGGING_H14 15#include "xray/xray_log_interface.h"16#include "xray_fdr_log_records.h"17 18// FDR (Flight Data Recorder) Mode19// ===============================20//21// The XRay whitepaper describes a mode of operation for function call trace22// logging that involves writing small records into an in-memory circular23// buffer, that then gets logged to disk on demand. To do this efficiently and24// capture as much data as we can, we use smaller records compared to the25// default mode of always writing fixed-size records.26 27namespace __xray {28XRayLogInitStatus fdrLoggingInit(size_t BufferSize, size_t BufferMax,29                                 void *Options, size_t OptionsSize);30XRayLogInitStatus fdrLoggingFinalize();31void fdrLoggingHandleArg0(int32_t FuncId, XRayEntryType Entry);32void fdrLoggingHandleArg1(int32_t FuncId, XRayEntryType Entry, uint64_t Arg1);33XRayLogFlushStatus fdrLoggingFlush();34XRayLogInitStatus fdrLoggingReset();35 36} // namespace __xray37 38#endif // XRAY_XRAY_FDR_LOGGING_H39