]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/compiler-rt/lib/xray/xray_flags.inc
Merge llvm, clang, lld, lldb, compiler-rt and libc++ trunk r321545,
[FreeBSD/FreeBSD.git] / contrib / compiler-rt / lib / xray / xray_flags.inc
1 //===-- xray_flags.inc ------------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // XRay runtime flags.
11 //
12 //===----------------------------------------------------------------------===//
13 #ifndef XRAY_FLAG
14 #error "Define XRAY_FLAG prior to including this file!"
15 #endif
16
17 XRAY_FLAG(bool, patch_premain, false,
18           "Whether to patch instrumentation points before main.")
19 XRAY_FLAG(const char *, xray_logfile_base, "xray-log.",
20           "Filename base for the xray logfile.")
21 XRAY_FLAG(const char *, xray_mode, "", "Mode to install by default.")
22 XRAY_FLAG(uptr, xray_page_size_override, 0,
23           "Override the default page size for the system, in bytes. The size "
24           "should be a power-of-two.")
25
26 // Basic (Naive) Mode logging options.
27 XRAY_FLAG(bool, xray_naive_log, false,
28           "DEPRECATED: Use xray_mode=xray-basic instead.")
29 XRAY_FLAG(int, xray_naive_log_func_duration_threshold_us, 5,
30           "Naive logging will try to skip functions that execute for fewer "
31           "microseconds than this threshold.")
32 XRAY_FLAG(int, xray_naive_log_max_stack_depth, 64,
33           "Naive logging will keep track of at most this deep a call stack, "
34           "any more and the recordings will be droppped.")
35 XRAY_FLAG(int, xray_naive_log_thread_buffer_size, 1024,
36           "The number of entries to keep on a per-thread buffer.")
37
38 // FDR (Flight Data Recorder) Mode logging options.
39 XRAY_FLAG(bool, xray_fdr_log, false,
40           "DEPRECATED: Use xray_mode=xray-fdr instead.")
41 XRAY_FLAG(int, xray_fdr_log_func_duration_threshold_us, 5,
42           "FDR logging will try to skip functions that execute for fewer "
43           "microseconds than this threshold.")
44 XRAY_FLAG(int, xray_fdr_log_grace_period_us, 0,
45           "DEPRECATED: use xray_fdr_log_grace_period_ms instead.")
46 XRAY_FLAG(int, xray_fdr_log_grace_period_ms, 100,
47           "FDR logging will wait this much time in microseconds before "
48           "actually flushing the log; this gives a chance for threads to "
49           "notice that the log has been finalized and clean up.")