xref: /freebsd/contrib/llvm-project/compiler-rt/lib/xray/xray_profiling_flags.h (revision 0b57cec536236d46e3dba9bd041533462f33dbb7)
1*0b57cec5SDimitry Andric //===-- xray_profiling_flags.h ----------------------------------*- C++ -*-===//
2*0b57cec5SDimitry Andric //
3*0b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*0b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5*0b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*0b57cec5SDimitry Andric //
7*0b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
8*0b57cec5SDimitry Andric //
9*0b57cec5SDimitry Andric // This file is a part of XRay, a dynamic runtime instrumentation system.
10*0b57cec5SDimitry Andric //
11*0b57cec5SDimitry Andric // XRay profiling runtime flags.
12*0b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
13*0b57cec5SDimitry Andric 
14*0b57cec5SDimitry Andric #ifndef XRAY_PROFILER_FLAGS_H
15*0b57cec5SDimitry Andric #define XRAY_PROFILER_FLAGS_H
16*0b57cec5SDimitry Andric 
17*0b57cec5SDimitry Andric #include "sanitizer_common/sanitizer_flag_parser.h"
18*0b57cec5SDimitry Andric #include "sanitizer_common/sanitizer_internal_defs.h"
19*0b57cec5SDimitry Andric 
20*0b57cec5SDimitry Andric namespace __xray {
21*0b57cec5SDimitry Andric 
22*0b57cec5SDimitry Andric struct ProfilerFlags {
23*0b57cec5SDimitry Andric #define XRAY_FLAG(Type, Name, DefaultValue, Description) Type Name;
24*0b57cec5SDimitry Andric #include "xray_profiling_flags.inc"
25*0b57cec5SDimitry Andric #undef XRAY_FLAG
26*0b57cec5SDimitry Andric 
27*0b57cec5SDimitry Andric   void setDefaults();
28*0b57cec5SDimitry Andric };
29*0b57cec5SDimitry Andric 
30*0b57cec5SDimitry Andric extern ProfilerFlags xray_profiling_flags_dont_use_directly;
profilingFlags()31*0b57cec5SDimitry Andric inline ProfilerFlags *profilingFlags() {
32*0b57cec5SDimitry Andric   return &xray_profiling_flags_dont_use_directly;
33*0b57cec5SDimitry Andric }
34*0b57cec5SDimitry Andric void registerProfilerFlags(FlagParser *P, ProfilerFlags *F);
35*0b57cec5SDimitry Andric 
36*0b57cec5SDimitry Andric } // namespace __xray
37*0b57cec5SDimitry Andric 
38*0b57cec5SDimitry Andric #endif // XRAY_PROFILER_FLAGS_H
39