Fix missing time for some script functions in profiler

Fixes the issue by adding a mechanism by which the functions that were
previously disappearing can be profiled too. This is optional with
an editor setting, since collecting more information naturally slows the engine
further while profiling.

Fixes #23715, #40251, #29049
This commit is contained in:
msreis
2023-03-05 14:37:11 +02:00
committed by Yuri Sizov
parent 1f5d4a62e9
commit f1cc14d525
16 changed files with 191 additions and 57 deletions

View File

@ -439,6 +439,7 @@ class GDScriptLanguage : public ScriptLanguage {
SelfList<GDScriptFunction>::List function_list;
bool profiling;
bool profile_native_calls;
uint64_t script_frame_time;
HashMap<String, ObjectID> orphan_subclasses;
@ -590,6 +591,8 @@ public:
virtual void profiling_start() override;
virtual void profiling_stop() override;
virtual void profiling_set_save_native_calls(bool p_enable) override;
void profiling_collate_native_call_data(bool p_accumulated);
virtual int profiling_get_accumulated_data(ProfilingInfo *p_info_arr, int p_info_max) override;
virtual int profiling_get_frame_data(ProfilingInfo *p_info_arr, int p_info_max) override;