xref: /freebsd/contrib/llvm-project/compiler-rt/lib/xray/xray_fdr_flags.inc (revision 0b57cec536236d46e3dba9bd041533462f33dbb7)
1*0b57cec5SDimitry Andric//===-- xray_fdr_flags.inc --------------------------------------*- C++ -*-===//
2*0b57cec5SDimitry Andric//
3*0b57cec5SDimitry Andric// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*0b57cec5SDimitry Andric// See https://llvm.org/LICENSE.txt for license information.
5*0b57cec5SDimitry Andric// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*0b57cec5SDimitry Andric//
7*0b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
8*0b57cec5SDimitry Andric//
9*0b57cec5SDimitry Andric// XRay FDR Mode runtime flags.
10*0b57cec5SDimitry Andric//
11*0b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
12*0b57cec5SDimitry Andric#ifndef XRAY_FLAG
13*0b57cec5SDimitry Andric#error "Define XRAY_FLAG prior to including this file!"
14*0b57cec5SDimitry Andric#endif
15*0b57cec5SDimitry Andric
16*0b57cec5SDimitry Andric// FDR (Flight Data Recorder) Mode logging options.
17*0b57cec5SDimitry AndricXRAY_FLAG(int, func_duration_threshold_us, 5,
18*0b57cec5SDimitry Andric          "FDR logging will try to skip functions that execute for fewer "
19*0b57cec5SDimitry Andric          "microseconds than this threshold.")
20*0b57cec5SDimitry AndricXRAY_FLAG(int, grace_period_ms, 100,
21*0b57cec5SDimitry Andric          "FDR logging will wait this much time in milliseconds before "
22*0b57cec5SDimitry Andric          "actually flushing the log; this gives a chance for threads to "
23*0b57cec5SDimitry Andric          "notice that the log has been finalized and clean up.")
24*0b57cec5SDimitry AndricXRAY_FLAG(int, buffer_size, 16384,
25*0b57cec5SDimitry Andric          "Size of buffers in the circular buffer queue.")
26*0b57cec5SDimitry AndricXRAY_FLAG(int, buffer_max, 100, "Maximum number of buffers in the queue.")
27*0b57cec5SDimitry AndricXRAY_FLAG(bool, no_file_flush, false,
28*0b57cec5SDimitry Andric          "Set to true to not write log files by default.")
29