I’m using the CPU profiler under Window->Session Frontend with the goal of profiling my C++ code.
However the functions in the event stack seem to be very high-level/engine-specific stuff. Is there a way to filter out my own C++ UFunctions from these?
I’m hoping that I’m missing something straightforward because I’m used to profilers that offer function by function breakdown (eg: JProfiler for enterprise Java) and that kind of data is invaluable in identifying areas for optimization.
Edit: I just found that Visual Studio community edition may have a profiler built into it, I’m going through this Microsoft guide, has anyone done this kind of profiling for their UE project as opposed to using the Unreal front-end?
I think you may need to use the stats macros, these are documented in Engine\Source\Runtime\Core\Public\Stats\Stats.h, the QUICK_SCOPE_CYCLE_COUNTER macro is probably the most relevant one in this case.
Thanks a lot enlight_2014 and amigo. So far I was manually adding code in each function to count milliseconds elapsed but I’ll try that macro instead next time.
I haven’t yet investigated the ‘native’ Visual Studio profiling described in the document I linked above so there’s potentially that option as well.