LeviLamina
Loading...
Searching...
No Matches
Whisker_ProfileClient.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/profiler/ProfileClient.h"
7#include "mc/deps/profiler/ThreadFrameType.h"
8#include "mc/platform/brstd/basic_cstring_view.h"
9
10// auto generated forward declare list
11// clang-format off
12namespace Bedrock::Profile { class ScopeStackStorage; }
13namespace Bedrock::Profile::Whisker { struct ScopeData; }
14namespace Bedrock::Profiler::details { struct StaticProfLabel; }
15namespace Core::Profile { class CPUProfileToken; }
16namespace brstd { struct source_location; }
17// clang-format on
18
19namespace Core::Profile {
20
22public:
23 // Whisker_ProfileClient inner types declare
24 // clang-format off
25 struct KeepAlive;
26 // clang-format on
27
28 // Whisker_ProfileClient inner types define
29 struct KeepAlive {
30 public:
31 // member variables
32 // NOLINTBEGIN
34 // NOLINTEND
35
36 public:
37 // prevent constructor by default
38 KeepAlive& operator=(KeepAlive const&);
39 KeepAlive(KeepAlive const&);
40 KeepAlive();
41
42 public:
43 // member functions
44 // NOLINTBEGIN
45#ifdef LL_PLAT_C
46 MCNAPI ~KeepAlive();
47#endif
48 // NOLINTEND
49
50 public:
51 // destructor thunk
52 // NOLINTBEGIN
53#ifdef LL_PLAT_C
54 MCNAPI void $dtor();
55#endif
56 // NOLINTEND
57 };
58
59public:
60 // virtual functions
61 // NOLINTBEGIN
62 virtual ~Whisker_ProfileClient() /*override*/ = default;
63
64 virtual void onFrameTransition(uchar previousFrameType) /*override*/;
65
66 virtual void onThreadCreate(
67 ::brstd::basic_cstring_view<char, ::std::char_traits<char>> name,
68 ::Core::Profile::ThreadFrameType frameType
69 ) /*override*/;
70
71 virtual void onThreadDestroy() /*override*/;
72
73 virtual void onMainThreadCreate() /*override*/;
74
75 virtual void onMainThreadDestroy() /*override*/;
76
77 virtual void enterCPUProfile(
80 ) /*override*/;
81
82 virtual void leaveCPUProfile(
85 ) /*override*/;
86
87 virtual void generateCPUProfileTokenStatic(
89 char const* group,
91 uint color,
92 ::brstd::source_location const& location
93 ) /*override*/;
94 // NOLINTEND
95
96public:
97 // member functions
98 // NOLINTBEGIN
99#ifdef LL_PLAT_C
100 MCNAPI void fetchData(::gsl::span<::Bedrock::Profile::Whisker::ScopeData> output, ::std::thread::id thread) const;
101
102 MCNAPI ::std::shared_ptr<::Core::Profile::Whisker_ProfileClient::KeepAlive const>
103 makeActive(::std::string_view consumerName);
104
105 MCNAPI void prepareForFetch(::Bedrock::Profile::Whisker::ScopeData& output, void const* key) const;
106
107 MCNAPI void
108 queryThreadIDsByType(::std::vector<::std::thread::id>& output, ::Core::Profile::ThreadFrameType threadType) const;
109
110 MCNAPI void resolveUniqueKeysByName(
111 ::gsl::span<void const*> output,
112 ::gsl::span<::std::string_view const> names,
113 ::std::thread::id thread
114 ) const;
115#endif
116 // NOLINTEND
117
118public:
119 // static functions
120 // NOLINTBEGIN
121#ifdef LL_PLAT_C
122 MCNAPI static ::Core::Profile::Whisker_ProfileClient getInterface();
123#endif
124 // NOLINTEND
125
126public:
127 // virtual function thunks
128 // NOLINTBEGIN
129 MCNAPI void $onFrameTransition(uchar previousFrameType);
130
131 MCNAPI void $onThreadCreate(
132 ::brstd::basic_cstring_view<char, ::std::char_traits<char>> name,
133 ::Core::Profile::ThreadFrameType frameType
134 );
135
136 MCNAPI void $onThreadDestroy();
137
138 MCNAPI void $onMainThreadCreate();
139
140 MCNAPI void $onMainThreadDestroy();
141
142 MCNAPI void
144
145 MCNAPI void
147
150 char const* group,
152 uint color,
153 ::brstd::source_location const& location
154 );
155
156
157 // NOLINTEND
158
159public:
160 // vftables
161 // NOLINTBEGIN
162 MCNAPI static void** $vftable();
163 // NOLINTEND
164};
165
166} // namespace Core::Profile
Definition ScopeStackStorage.h:7
Definition CPUProfileToken.h:7
Definition ProfileClient.h:27
Definition Whisker_ProfileClient.h:21
static MCAPI void ** $vftable()
MCAPI void $generateCPUProfileTokenStatic(::Core::Profile::CPUProfileToken &target, char const *group, ::Bedrock::Profiler::details::StaticProfLabel label, uint color, ::brstd::source_location const &location)
MCAPI void $onThreadCreate(::brstd::basic_cstring_view< char, ::std::char_traits< char > > name, ::Core::Profile::ThreadFrameType frameType)
MCAPI void $leaveCPUProfile(::Bedrock::Profile::ScopeStackStorage &scope, ::Core::Profile::CPUProfileToken const &token)
MCAPI void $enterCPUProfile(::Bedrock::Profile::ScopeStackStorage &scope, ::Core::Profile::CPUProfileToken const &token)
MCAPI void $onFrameTransition(uchar previousFrameType)
Definition basic_cstring_view.h:8
Definition ScopeData.h:7
Definition StaticProfLabel.h:7
Definition Whisker_ProfileClient.h:29
Definition source_location.h:7
Definition Alias.h:14