WSF
ProfilingHooks.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright (C) 2021 Stellar Science; U.S. Government has Unlimited Rights.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef PROFILINGHOOKS_HPP
13#define PROFILINGHOOKS_HPP
14
40
41#include "profiling_export.h"
42
43#include <cstdint>
44#include <string>
45
46#include <UtOptional.hpp>
47
48#include "ProfilingCommon.hpp"
49
50namespace profiling
51{
60using ProfilingInterfaceVersionFunc = uint64_t (*)();
61
64constexpr const char cPROFILING_INTERFACE_VERSION_SYMBOL[] = "AfsimProfilingInterfaceVersion";
65
73using ProfilingInitializeFunc = int32_t (*)(const char*);
74
77constexpr const char cPROFILING_INITIALIZE_SYMBOL[] = "AfsimProfilingInitialize";
78
86using BeginProfilingRegionFunc = void (*)(const char*);
87
90constexpr const char cPROFILING_BEGIN_REGION_SYMBOL[] = "AfsimProfilingBeginRegion";
91
99using EndProfilingRegionFunc = void (*)();
100
103constexpr const char cPROFILING_END_REGION_SYMBOL[] = "AfsimProfilingEndRegion";
104
112using CreateProfilingSectionFunc = uint32_t (*)(const char*);
113
116constexpr const char cPROFILING_CREATE_SECTION_SYMBOL[] = "AfsimProfilingCreateSection";
117
125using DestroyProfilingSectionFunc = void (*)(uint32_t);
126
129constexpr const char cPROFILING_DESTROY_SECTION_SYMBOL[] = "AfsimProfilingDestroySection";
130
138using BeginProfilingSectionFunc = void (*)(uint32_t);
139
142constexpr const char cPROFILING_BEGIN_SECTION_SYMBOL[] = "AfsimProfilingBeginSection";
143
151using EndProfilingSectionFunc = void (*)(uint32_t);
152
155constexpr const char cPROFILING_END_SECTION_SYMBOL[] = "AfsimProfilingEndSection";
156
164using ProfilingFinalizeFunc = void (*)();
165
168constexpr const char cPROFILING_FINALIZE_SYMBOL[] = "AfsimProfilingFinalize";
169
282
283} // namespace profiling
284
285#endif // PROFILINGHOOKS_HPP
Definition of utility struct and function used by the profiling targets.
Definition ProfilingCommon.hpp:23
void(*)() ProfilingFinalizeFunc
Type of a callback for finalizing the profiling library.
Definition ProfilingHooks.hpp:164
constexpr const char cPROFILING_INTERFACE_VERSION_SYMBOL[]
Name of symbol (to load from shared library) for the callback that gets the version number of the pro...
Definition ProfilingHooks.hpp:64
constexpr const char cPROFILING_END_REGION_SYMBOL[]
Name of symbol (to load from shared library) for the callback that ends a profiling region that was p...
Definition ProfilingHooks.hpp:103
constexpr const char cPROFILING_INITIALIZE_SYMBOL[]
Name of symbol (to load from shared library) for the callback that initializes the profiling library.
Definition ProfilingHooks.hpp:77
void(*)(uint32_t) BeginProfilingSectionFunc
Type of a callback for beginning a profiling section.
Definition ProfilingHooks.hpp:138
void(*)() EndProfilingRegionFunc
Type of a callback for ending a profiling region that was previously begun.
Definition ProfilingHooks.hpp:99
constexpr const char cPROFILING_CREATE_SECTION_SYMBOL[]
Name of symbol (to load from shared library) for the callback that creates a profiling section.
Definition ProfilingHooks.hpp:116
constexpr const char cPROFILING_BEGIN_SECTION_SYMBOL[]
Name of symbol (to load from shared library) for the callback that begins a profiling section.
Definition ProfilingHooks.hpp:142
void(*)(const char *) BeginProfilingRegionFunc
Type of a callback for beginning a profiling region.
Definition ProfilingHooks.hpp:86
uint32_t(*)(const char *) CreateProfilingSectionFunc
Type of a callback for creating a profiling section.
Definition ProfilingHooks.hpp:112
constexpr const char cPROFILING_END_SECTION_SYMBOL[]
Name of symbol (to load from shared library) for the callback that ends a profiling section that was ...
Definition ProfilingHooks.hpp:155
void(*)(uint32_t) DestroyProfilingSectionFunc
Type of a callback for destroying a profiling section.
Definition ProfilingHooks.hpp:125
constexpr const char cPROFILING_DESTROY_SECTION_SYMBOL[]
Name of symbol (to load from shared library) for the callback that destroys a profiling section.
Definition ProfilingHooks.hpp:129
constexpr const char cPROFILING_BEGIN_REGION_SYMBOL[]
Name of symbol (to load from shared library) for the callback that begins a profiling region.
Definition ProfilingHooks.hpp:90
constexpr const char cPROFILING_FINALIZE_SYMBOL[]
Name of symbol (to load from shared library) for the callback that finalizes the profiling library.
Definition ProfilingHooks.hpp:168
void(*)(uint32_t) EndProfilingSectionFunc
Type of a callback for ending a profiling section that was previously begun.
Definition ProfilingHooks.hpp:151
int32_t(*)(const char *) ProfilingInitializeFunc
Type of a callback for initializing the profiling library.
Definition ProfilingHooks.hpp:73
uint64_t(*)() ProfilingInterfaceVersionFunc
Type of a callback for getting the version number of the profiling interface that the library provide...
Definition ProfilingHooks.hpp:60
Set of all function pointers used for profiling.
Definition ProfilingHooks.hpp:196
EndProfilingSectionFunc mEndSection
Callback for ending a profiling section.
Definition ProfilingHooks.hpp:272
ProfilingInterfaceVersionFunc mInterfaceVersion
Callback for getting the version number of the profiling interface that the library provides.
Definition ProfilingHooks.hpp:205
CreateProfilingSectionFunc mCreateSection
Callback for creating a profiling section.
Definition ProfilingHooks.hpp:242
DestroyProfilingSectionFunc mDestroySection
Callback for destroying a profiling section.
Definition ProfilingHooks.hpp:249
ProfilingInitializeFunc mInitialize
Callback for initializing the profiling library.
Definition ProfilingHooks.hpp:216
EndProfilingRegionFunc mEndRegion
Callback for ending the last profiling region that was begun.
Definition ProfilingHooks.hpp:226
BeginProfilingRegionFunc mBeginRegion
Callback for beginning a profiling region.
Definition ProfilingHooks.hpp:223
ProfilingFinalizeFunc mFinalize
Callback for finalizing the profiling library.
Definition ProfilingHooks.hpp:280
BeginProfilingSectionFunc mBeginSection
Callback for beginning a profiling section.
Definition ProfilingHooks.hpp:260
Copyrights Multiple, All Rights Reserved