Changes between Version 14 and Version 15 of EngineProfiling


Ignore:
Timestamp:
Sep 3, 2016, 5:41:15 PM (8 years ago)
Author:
Itms
Comment:

Update for the SM38 tracelogging tools

Legend:

Unmodified
Added
Removed
Modified
  • EngineProfiling

    v14 v15  
    116116 * Shows how many times functions got called in total (also read the part below about inlining).
    117117 * Shows total runtime percentages for each function (also read the part below about C++ functions).
    118  * You need a special build of SpiderMonkey. On Linux this isn't an issue, but on Windows we use prebuilt SpiderMonkey binaries, so it's a bit harder to use there.
    119118 * There is a small overhead, but it's small enough that you can still play games as normal. The overhead is mainly caused by flushing profiling data to the disk. It reduces performance by around 5%, and you see on the output where the flushing happens, so it's not a big problem.
    120119 * The Tracelogger only profiles JavaScript functions (also read the part below about C++ functions).
     
    131130When you use it the first time, you can just do all the steps described below in order.
    132131
    133 ==== Build SpiderMonkey with Tracelogging ====
    134 1. In libraries/source/spidermonkey/build.sh, search for "--enable-trace-logging". It's disabled by a comment and you have to enable it.
    135 1. One line below, there's the definition of TLCXXFLAGS. This defines the output path and you may want to modify it. Make sure to keep the "/" at the end of the path.
    136 1. Run clean-workspaces.sh and update-workspaces.sh (or rebuild-osx-libs.sh --force-rebuild on the Mac) to rebuild SpiderMonkey.
     132==== Enabling tracelogging ====
     133This is done through environment variables. You can use the script located at [source:ps/trunk/source/tools/tracelogger/tracelogger-options.sh] to load default options.
     134
     135Note: Windows versions seem to have inconsistencies with respect to the use of semicolons to delimitate values.
    137136
    138137==== Getting the Tracelogger ====
     
    143142}}}
    144143
    145 Version with git hash a9f37928f95ea46a8c8767497c8fb8223d2b3268 was successfully tested with our version of SpiderMonkey (in case future versions aren't compatible anymore).
     144Version with git hash 1c67e97e794b5039d0cae95f72ea0c76e4aa4696 was successfully tested with our version of SpiderMonkey (in case future versions aren't compatible anymore).
    146145
    147146==== Measuring ====
     
    156155}}}
    157156
    158 To view the data, copy engine.js, tracelogger.js, tracelogger.css and tracelogger.html from the tools_v2 directory to /path/to/output/. Then open tracelogger.html in a browser and append ''?data=reduced.json''. Then select a thread from the list.
     157To view the data, copy server.py from the website directory to /path/to/output/. Start the script so the data gets fed automatically to the tracelogging tool, then open tracelogger.html in a browser and select the desired file. Finally, select a thread from the list.
    159158
    160159