1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-21 14:57:09 +00:00

Add some important profiling hooks.

This commit is contained in:
Lukas Tenbrink
2025-04-01 19:00:57 +02:00
parent e80194e31f
commit c3747884da
14 changed files with 118 additions and 10 deletions

View File

@@ -30,7 +30,13 @@
#include "profiling.h"
#ifdef GODOT_USE_PERFETTO
#if defined(GODOT_USE_TRACY)
void godot_init_profiler() {
// Send our first event to tracy; otherwise it doesn't start collecting data.
// FrameMark is kind of fitting because it communicates "this is where we started tracing".
FrameMark;
}
#elif defined(GODOT_USE_PERFETTO)
PERFETTO_TRACK_EVENT_STATIC_STORAGE();
void godot_init_profiler() {
@@ -41,5 +47,8 @@ void godot_init_profiler() {
perfetto::Tracing::Initialize(args);
perfetto::TrackEvent::Register();
}
#else
void godot_init_profiler() {
// Stub
}
#endif