1*3cab2bb3Spatrick//===-- xray_flags.inc ------------------------------------------*- C++ -*-===// 2*3cab2bb3Spatrick// 3*3cab2bb3Spatrick// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*3cab2bb3Spatrick// See https://llvm.org/LICENSE.txt for license information. 5*3cab2bb3Spatrick// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*3cab2bb3Spatrick// 7*3cab2bb3Spatrick//===----------------------------------------------------------------------===// 8*3cab2bb3Spatrick// 9*3cab2bb3Spatrick// XRay runtime flags. 10*3cab2bb3Spatrick// 11*3cab2bb3Spatrick//===----------------------------------------------------------------------===// 12*3cab2bb3Spatrick#ifndef XRAY_FLAG 13*3cab2bb3Spatrick#error "Define XRAY_FLAG prior to including this file!" 14*3cab2bb3Spatrick#endif 15*3cab2bb3Spatrick 16*3cab2bb3SpatrickXRAY_FLAG(bool, patch_premain, false, 17*3cab2bb3Spatrick "Whether to patch instrumentation points before main.") 18*3cab2bb3SpatrickXRAY_FLAG(const char *, xray_logfile_base, "xray-log.", 19*3cab2bb3Spatrick "Filename base for the xray logfile.") 20*3cab2bb3SpatrickXRAY_FLAG(const char *, xray_mode, "", "Mode to install by default.") 21*3cab2bb3SpatrickXRAY_FLAG(uptr, xray_page_size_override, 0, 22*3cab2bb3Spatrick "Override the default page size for the system, in bytes. The size " 23*3cab2bb3Spatrick "should be a power-of-two.") 24*3cab2bb3Spatrick 25*3cab2bb3Spatrick// Basic (Naive) Mode logging options. 26*3cab2bb3SpatrickXRAY_FLAG(bool, xray_naive_log, false, 27*3cab2bb3Spatrick "DEPRECATED: Use xray_mode=xray-basic instead.") 28*3cab2bb3SpatrickXRAY_FLAG(int, xray_naive_log_func_duration_threshold_us, 5, 29*3cab2bb3Spatrick "DEPRECATED: use the environment variable XRAY_BASIC_OPTIONS and set " 30*3cab2bb3Spatrick "func_duration_threshold_us instead.") 31*3cab2bb3SpatrickXRAY_FLAG(int, xray_naive_log_max_stack_depth, 64, 32*3cab2bb3Spatrick "DEPRECATED: use the environment variable XRAY_BASIC_OPTIONS and set " 33*3cab2bb3Spatrick "max_stack_depth instead.") 34*3cab2bb3SpatrickXRAY_FLAG(int, xray_naive_log_thread_buffer_size, 1024, 35*3cab2bb3Spatrick "DEPRECATED: use the environment variable XRAY_BASIC_OPTIONS and set " 36*3cab2bb3Spatrick "thread_buffer_size instead.") 37*3cab2bb3Spatrick 38*3cab2bb3Spatrick// FDR (Flight Data Recorder) Mode logging options. 39*3cab2bb3SpatrickXRAY_FLAG(bool, xray_fdr_log, false, 40*3cab2bb3Spatrick "DEPRECATED: Use xray_mode=xray-fdr instead.") 41*3cab2bb3SpatrickXRAY_FLAG(int, xray_fdr_log_func_duration_threshold_us, 5, 42*3cab2bb3Spatrick "DEPRECATED: use the environment variable XRAY_FDR_OPTIONS and set " 43*3cab2bb3Spatrick "func_duration_threshold_us instead.") 44*3cab2bb3SpatrickXRAY_FLAG(int, xray_fdr_log_grace_period_us, 0, 45*3cab2bb3Spatrick "DEPRECATED: use the environment variable XRAY_FDR_OPTIONS and set " 46*3cab2bb3Spatrick "grace_period_ms instead.") 47*3cab2bb3SpatrickXRAY_FLAG(int, xray_fdr_log_grace_period_ms, 100, 48*3cab2bb3Spatrick "DEPRECATED: use the environment variable XRAY_FDR_OPTIONS and set " 49*3cab2bb3Spatrick "grace_period_ms instead.") 50