Changes between Version 13 and Version 14 of EngineProfiling


Ignore:
Timestamp:
Jun 22, 2016, 4:28:26 PM (8 years ago)
Author:
wraitii
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • EngineProfiling

    v13 v14  
    3636== Profiler2 ==
    3737
    38 The in-game profiler is designed to show average performance data at an instant in time. While this is adequate for some purposes, it's not as good for analyzing rapid fluctuations in game performance. It also doesn't support multiple threads, so only the engine thread can be analyzed. To solve these shortcomings, proflier2 was [http://www.wildfiregames.com/forum/index.php?showtopic=15270&st=20#entry228237 created].
     38The in-game profiler is designed to show average performance data at an instant in time. While this is adequate for some purposes, it's not as good for analyzing rapid fluctuations in game performance. It also doesn't support multiple threads, so only the engine thread can be analyzed. To solve these shortcomings, profiler2 was [http://www.wildfiregames.com/forum/index.php?showtopic=15270&st=20#entry228237 created].
    3939
    40 Profiler2 collects profiling data across multiple threads and runs a small web server in the engine. When enabled, an HTML page and script can request, analyze and render this profiling data. Profiler2 is currently enabled by pressing F11 while the game is open, similar to the in-game profiler. Then the HTML page included with the profiler2 tool ([source:/ps/trunk/source/tools/profiler2 source/tools/profiler2/profiler2.html]) is opened in a web browser supporting HTML5.
     40Profiler2 collects profiling data across multiple threads and runs a small web server in the engine. When enabled, an HTML page and script can request, analyze and render this profiling data. Profiler2 is currently enabled by pressing Ctrl+F11 while the game is open, similar to the in-game profiler. Then the HTML page included with the profiler2 tool ([source:/ps/trunk/source/tools/profiler2 source/tools/profiler2/profiler2.html]) is opened in a web browser supporting HTML5.
    4141
    42 TODO screenshot and describe it
    43 
    44 Using profiler2 in code works similarly to the in-game profiler, except the scoped macro is named `PROFILER2`:
    45 {{{
    46 #include "ps/Profiler2.h"
    47 ...
    48 {
    49   PROFILE2("section name");
    50   ... code to measure ...
    51 }
    52 }}}
    53 and it will measure all code from the `PROFILE2` until the end of the current scope. There is also `PROFILE2_EVENT` to record events in profiler2 and `PROFILE2_ATTR` to add printf-style strings to the current region or event (seen in tooltips when hovering the profiler2 rendered output). This allows displaying more contextual data than would typically be possible in a profiler. For convenience, using `PROFILE3` will measure with both the in-game profiler and the new profiler2.
     42Profiler supports the PROFILE2, PROFILE2_IFSPIKE, PROFILE2_AGGREGATED macros. There is also `PROFILE2_EVENT` to record events in profiler2 and `PROFILE2_ATTR` to add printf-style strings to the current region or event (seen in tooltips when hovering the profiler2 rendered output). This allows displaying more contextual data than would typically be possible in a profiler. For convenience, using `PROFILE3` will measure with both the in-game profiler and the new profiler2.
    5443
    5544For more detailed GPU profiling data on some systems, `PROFILE2_GPU` and `PROFILE3_GPU` can be used similarly.
    5645
     46Additional information on Profiler2 such as screenshots and explanations of the HTML interface can be found at [wiki:Profiler2 Profiler2]
    5747
    5848== Low-overhead timer ==