Home | History | Annotate | Line # | Download | only in xray
      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           "DEPRECATED: use the environment variable XRAY_BASIC_OPTIONS and set "
     31           "func_duration_threshold_us instead.")
     32 XRAY_FLAG(int, xray_naive_log_max_stack_depth, 64,
     33           "DEPRECATED: use the environment variable XRAY_BASIC_OPTIONS and set "
     34           "max_stack_depth instead.")
     35 XRAY_FLAG(int, xray_naive_log_thread_buffer_size, 1024,
     36           "DEPRECATED: use the environment variable XRAY_BASIC_OPTIONS and set "
     37           "thread_buffer_size instead.")
     38 
     39 // FDR (Flight Data Recorder) Mode logging options.
     40 XRAY_FLAG(bool, xray_fdr_log, false,
     41           "DEPRECATED: Use xray_mode=xray-fdr instead.")
     42 XRAY_FLAG(int, xray_fdr_log_func_duration_threshold_us, 5,
     43           "DEPRECATED: use the environment variable XRAY_FDR_OPTIONS and set "
     44           "func_duration_threshold_us instead.")
     45 XRAY_FLAG(int, xray_fdr_log_grace_period_us, 0,
     46           "DEPRECATED: use the environment variable XRAY_FDR_OPTIONS and set "
     47           "grace_period_ms instead.")
     48 XRAY_FLAG(int, xray_fdr_log_grace_period_ms, 100,
     49           "DEPRECATED: use the environment variable XRAY_FDR_OPTIONS and set "
     50           "grace_period_ms instead.")
     51