1 //===-- xray_flags.h -------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file is a part of XRay, a dynamic runtime instrumentation system.
12 // XRay runtime flags.
13 //===----------------------------------------------------------------------===//
15 #include "xray_profiling_flags.h"
16 #include "sanitizer_common/sanitizer_common.h"
17 #include "sanitizer_common/sanitizer_flag_parser.h"
18 #include "sanitizer_common/sanitizer_libc.h"
19 #include "xray_defs.h"
23 // Storage for the profiling flags.
24 ProfilerFlags xray_profiling_flags_dont_use_directly;
26 void ProfilerFlags::setDefaults() XRAY_NEVER_INSTRUMENT {
27 #define XRAY_FLAG(Type, Name, DefaultValue, Description) Name = DefaultValue;
28 #include "xray_profiling_flags.inc"
32 void registerProfilerFlags(FlagParser *P,
33 ProfilerFlags *F) XRAY_NEVER_INSTRUMENT {
34 #define XRAY_FLAG(Type, Name, DefaultValue, Description) \
35 RegisterFlag(P, #Name, Description, &F->Name);
36 #include "xray_profiling_flags.inc"