Path: blob/main/contrib/llvm-project/compiler-rt/lib/xray/xray_profiling_flags.cpp
35265 views
//===-- xray_flags.h -------------------------------------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This file is a part of XRay, a dynamic runtime instrumentation system.9//10// XRay runtime flags.11//===----------------------------------------------------------------------===//1213#include "xray_profiling_flags.h"14#include "sanitizer_common/sanitizer_common.h"15#include "sanitizer_common/sanitizer_flag_parser.h"16#include "sanitizer_common/sanitizer_libc.h"17#include "xray_defs.h"1819namespace __xray {2021// Storage for the profiling flags.22ProfilerFlags xray_profiling_flags_dont_use_directly;2324void ProfilerFlags::setDefaults() XRAY_NEVER_INSTRUMENT {25#define XRAY_FLAG(Type, Name, DefaultValue, Description) Name = DefaultValue;26#include "xray_profiling_flags.inc"27#undef XRAY_FLAG28}2930void registerProfilerFlags(FlagParser *P,31ProfilerFlags *F) XRAY_NEVER_INSTRUMENT {32#define XRAY_FLAG(Type, Name, DefaultValue, Description) \33RegisterFlag(P, #Name, Description, &F->Name);34#include "xray_profiling_flags.inc"35#undef XRAY_FLAG36}3738} // namespace __xray394041