1 //===-- xray_flags.h -------------------------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 // This file is a part of XRay, a dynamic runtime instrumentation system.
11 // XRay runtime flags.
12 //===----------------------------------------------------------------------===//
14 #include "xray_profiling_flags.h"
15 #include "sanitizer_common/sanitizer_common.h"
16 #include "sanitizer_common/sanitizer_flag_parser.h"
17 #include "sanitizer_common/sanitizer_libc.h"
18 #include "xray_defs.h"
22 // Storage for the profiling flags.
23 ProfilerFlags xray_profiling_flags_dont_use_directly
;
25 void ProfilerFlags::setDefaults() XRAY_NEVER_INSTRUMENT
{
26 #define XRAY_FLAG(Type, Name, DefaultValue, Description) Name = DefaultValue;
27 #include "xray_profiling_flags.inc"
31 void registerProfilerFlags(FlagParser
*P
,
32 ProfilerFlags
*F
) XRAY_NEVER_INSTRUMENT
{
33 #define XRAY_FLAG(Type, Name, DefaultValue, Description) \
34 RegisterFlag(P, #Name, Description, &F->Name);
35 #include "xray_profiling_flags.inc"