Dean Michael Berris | cfd7eec | 2018-06-12 03:29:39 +0000 | [diff] [blame] | 1 | //===-- xray_profiling_flags.h ----------------------------------*- C++ -*-===// |
Dean Michael Berris | 980d93d | 2018-05-15 00:42:36 +0000 | [diff] [blame] | 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 | // This file is a part of XRay, a dynamic runtime instrumentation system. |
| 11 | // |
Dean Michael Berris | cfd7eec | 2018-06-12 03:29:39 +0000 | [diff] [blame] | 12 | // XRay profiling runtime flags. |
Dean Michael Berris | 980d93d | 2018-05-15 00:42:36 +0000 | [diff] [blame] | 13 | //===----------------------------------------------------------------------===// |
| 14 | |
| 15 | #ifndef XRAY_PROFILER_FLAGS_H |
| 16 | #define XRAY_PROFILER_FLAGS_H |
| 17 | |
| 18 | #include "sanitizer_common/sanitizer_flag_parser.h" |
| 19 | #include "sanitizer_common/sanitizer_internal_defs.h" |
| 20 | |
| 21 | namespace __xray { |
| 22 | |
| 23 | struct ProfilerFlags { |
| 24 | #define XRAY_FLAG(Type, Name, DefaultValue, Description) Type Name; |
Dean Michael Berris | cfd7eec | 2018-06-12 03:29:39 +0000 | [diff] [blame] | 25 | #include "xray_profiling_flags.inc" |
Dean Michael Berris | 980d93d | 2018-05-15 00:42:36 +0000 | [diff] [blame] | 26 | #undef XRAY_FLAG |
| 27 | |
| 28 | void setDefaults(); |
| 29 | }; |
| 30 | |
Dean Michael Berris | cfd7eec | 2018-06-12 03:29:39 +0000 | [diff] [blame] | 31 | extern ProfilerFlags xray_profiling_flags_dont_use_directly; |
| 32 | inline ProfilerFlags *profilingFlags() { |
| 33 | return &xray_profiling_flags_dont_use_directly; |
Dean Michael Berris | 980d93d | 2018-05-15 00:42:36 +0000 | [diff] [blame] | 34 | } |
| 35 | void registerProfilerFlags(FlagParser *P, ProfilerFlags *F); |
| 36 | |
| 37 | } // namespace __xray |
| 38 | |
| 39 | #endif // XRAY_PROFILER_FLAGS_H |