Realtime profiler

From PopcornFX
Jump to: navigation, search

you can also see the developer profiler video tutorial

Realtime display


  • Threads : one line per thread, main thread at bottom
  • Scale : scale of smallest time subdivisions is displayed on the bottom-right corner. distance between red time subdivisions is one 60-fps frame
  • Profile nodes : hierarchical bottom-up stacked profile nodes
  • Special nodes (idle/lock) : all low-level lock/idle/wait/synchronization primitives appear with a special red/yellow colored banner on their profile bars.

1 Main thread
2-6 Worker threads
7 IconProfilerShow.png Toggle profiler display
8 IconProfilerMemory.png Toggle memory view
9 IconProfilerPause.png Pause profile capture
10 Node filter textbox
11 Current display scale, shown in human time units, and in CPU cycles
12 CPU Hardware thread usage history
13 Thread info: % usage, time idle, hh-Thread ID, thread name
14 Profiler frame history
15 Frame cache containing the most time-consuming frames in the last couple seconds
16 Vertical bar showing which frame is currently displayed
17 Memory free graph
18 Memory alloc graph
19 Thread idle profile bar
20 Normal profile bar
21 Vertical red marker: each marker shows one 60 fps frame
22 Particle update tasks
23 Particle render tasks
24 D3D9/OpenGL backbuffer flip: time waiting for GPU

Navigation controls

  • Alt+mousewheel : zoom in/out of the profile report, at the time under the mouse cursor.
  • Alt+Ctrl+mousewheel : travel in the profile history frames.

Profile node tooltip


  • profile section name (can be the raw function name, or a custom name)
  •  % usage of total frame time
  • duration (in scaled units of time. can be seconds, milliseconds, microseconds, or nanoseconds
  • timestamp range : begin time - end time
  • cycle count, in raw CPU cycles
  • alloc volume
  • free volume
  • source file
  • function name
  • callstack : adress:module:function

Main profile report

Time View

  • standard view
  • color chosen by developer in the profile node declaration.

Profiler-0 .png

Memory view

  • activated with MemoryView toggle button IconProfilerMemory.png on the bottom right toolbar
  • black profile nodes have no memory transactions
  • grey profile nodes have a combination of allocs/frees
  • profile nodes whose color go towards yellow have a larger volume of allocation transactions
  • profile nodes whose color go towards blue have a larger volume of free transactions
  • the brighter the node, the larger the transaction


Node filter

The node filter textbox allows to quickly search for specific profile nodes. It highlights all nodes whose name matches the input text in bright red, and shows the other ones in grayscale.

For example, if we search for "eval", if will match all the ParticleScriptEvaluator nodes:


Profile history

  • 3 graphs are displayed:
    • instant alloc graph (displayed as a red line)
    • instant free graph (displayed as a blue line)
    • total memory graph (displayed as a light blue surface)
    • time graph (displayed as colored bars. the worse the performance, the redder the bar)
  • history contains 64 frames by default
  • in those 64 frames, frame cache of 5 frames by default, containing the most costly frames. costly frames last for 6 seconds by default in the cache before being evicted
  • the 59 remaining slots are used to store the profile reports of the last 59 frames.
  • profile cache very useful when running at high framerates, if you want to catch a rare performance drop



all configurable profiler parameters are in "Preferences > Configuration tab > Common > ModuleConfigProfiler"

ActivateProfiler Changed by the 'Show profiler' button in the editor UI. Enables/disables profiling. when the profiler is disabled, profile overhead becomes almost non-existent.
PauseProfilerCapture Changed by the 'Pause profiler' button in the editor UI. when set, frame capture is stopped.
GrabCallstacks If not set, the profiler will not walk the stack and grab the callstacks on every profile node.
ShowTooltipOnlyWhenCapturePaused If not set, the node tooltip will appear even when capture is running. can be annoying sometimes.
MemoryView Changed by the 'Memory view' button in the editor UI. colors the profile node according to their inclusive child's memory transaction volume.
MemoryViewIntensity Brightness coefficient applied to the memory view colors
VisibleFraction controls the auto-rescaling. a value of 1 will try to keep the frame large enough to fit the whole screen width. a value of 2 means the frame will only take up half the screen width.
HighlightFilter Changed by the 'NodeFilter' textbox in the editor UI.
Profiler_HMarginsInPixels Left and right horizontal margins in pixels, from the screen borders.
Profiler_StartX Changed by the zoom (Alt+mousewheel) in the editor UI. time in seconds at the left-side of the screen
Profiler_StartY Position in pixels from the bottom of the screen at which the profiler is displayed.
Profiler_LineHeight Height of a profile node's rectangle in pixels, for the main thread.
Profiler_LineSpacing Space in pixels between two hierarchical profile lines, for the main thread.
Profiler_SatteliteThreadLineHeight Height of a profile node's rectangle in pixels, for all other worker threads.
Profiler_SatteliteThreadLineSpacing Space in pixels between two hierarchical profile lines, for all other worker threads.
Profiler_LineThreadSpacing Space in pixels between each different thread.
Profiler_LineBottomColorCoeff Darkening coefficient applied to the profile node's colors at the bottom of the node rectangle. when this is != 1.0, it gives an embossed effect.
Profiler_HScale Changed by the zoom (Alt+mousewheel) in the editor UI. Zoom factor.
Profiler_ContenseAllSatteliteThreads If checked, all threads other than the main threads will be collapsed into a single line per thread, instead of the classic hierarchical view. You might want to use this it you're running on a large number of cores to save display space.
Profiler_HideUnusedCallLevels If checked, hierarchical lines where no profile nodes appeared that frame, but were used before, will be collapsed. This might induce some flickering if the profile node nesting differs from frame to frame.
Profiler_BackgroundBarsColor Color of the vertical scale subdivisions
Profiler_ScaleFont Font used to display the scale
Profiler_ThreadInfoFont Font used to display the thread infos
FrameCacheSize Size of the most time-consuming frames, in frames.
FrameCachePersistence Time in seconds a frame is kept in the time-consuming frames cache.
HistorySizeInFrames Total size of the frame history, INCLUDING the frame cache.
HistoryGraph_Start x,y position in pixels of the top-left corner of the frame history display.
HistoryGraph_Size x,y size in pixels of the frame history display.
HistoryGraph_ShowCPU If set, the frame history will display the CPU timing graph
HistoryGraph_ShowMem If set, the frame history will display the Memory graphs (alloc+free+total)
ConfigProfiler-2 .png

Related topics