xref: /freebsd/contrib/llvm-project/compiler-rt/lib/xray/xray_flags.inc (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
1//===-- xray_flags.inc ------------------------------------------*- C++ -*-===//
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-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// XRay runtime flags.
10//
11//===----------------------------------------------------------------------===//
12#ifndef XRAY_FLAG
13#error "Define XRAY_FLAG prior to including this file!"
14#endif
15
16XRAY_FLAG(bool, patch_premain, false,
17          "Whether to patch instrumentation points before main.")
18XRAY_FLAG(const char *, xray_logfile_base, "xray-log.",
19          "Filename base for the xray logfile.")
20XRAY_FLAG(const char *, xray_mode, "", "Mode to install by default.")
21XRAY_FLAG(uptr, xray_page_size_override, 0,
22          "Override the default page size for the system, in bytes. The size "
23          "should be a power-of-two.")
24
25// Basic (Naive) Mode logging options.
26XRAY_FLAG(bool, xray_naive_log, false,
27          "DEPRECATED: Use xray_mode=xray-basic instead.")
28XRAY_FLAG(int, xray_naive_log_func_duration_threshold_us, 5,
29          "DEPRECATED: use the environment variable XRAY_BASIC_OPTIONS and set "
30          "func_duration_threshold_us instead.")
31XRAY_FLAG(int, xray_naive_log_max_stack_depth, 64,
32          "DEPRECATED: use the environment variable XRAY_BASIC_OPTIONS and set "
33          "max_stack_depth instead.")
34XRAY_FLAG(int, xray_naive_log_thread_buffer_size, 1024,
35          "DEPRECATED: use the environment variable XRAY_BASIC_OPTIONS and set "
36          "thread_buffer_size instead.")
37
38// FDR (Flight Data Recorder) Mode logging options.
39XRAY_FLAG(bool, xray_fdr_log, false,
40          "DEPRECATED: Use xray_mode=xray-fdr instead.")
41XRAY_FLAG(int, xray_fdr_log_func_duration_threshold_us, 5,
42          "DEPRECATED: use the environment variable XRAY_FDR_OPTIONS and set "
43          "func_duration_threshold_us instead.")
44XRAY_FLAG(int, xray_fdr_log_grace_period_us, 0,
45          "DEPRECATED: use the environment variable XRAY_FDR_OPTIONS and set "
46          "grace_period_ms instead.")
47XRAY_FLAG(int, xray_fdr_log_grace_period_ms, 100,
48          "DEPRECATED: use the environment variable XRAY_FDR_OPTIONS and set "
49          "grace_period_ms instead.")
50