Changes between Version 14 and Version 15 of EngineProfiling
- Timestamp:
- Sep 3, 2016, 5:41:15 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
EngineProfiling
v14 v15 116 116 * Shows how many times functions got called in total (also read the part below about inlining). 117 117 * 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.119 118 * 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. 120 119 * The Tracelogger only profiles JavaScript functions (also read the part below about C++ functions). … … 131 130 When you use it the first time, you can just do all the steps described below in order. 132 131 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 ==== 133 This 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 135 Note: Windows versions seem to have inconsistencies with respect to the use of semicolons to delimitate values. 137 136 138 137 ==== Getting the Tracelogger ==== … … 143 142 }}} 144 143 145 Version with git hash a9f37928f95ea46a8c8767497c8fb8223d2b3268was successfully tested with our version of SpiderMonkey (in case future versions aren't compatible anymore).144 Version with git hash 1c67e97e794b5039d0cae95f72ea0c76e4aa4696 was successfully tested with our version of SpiderMonkey (in case future versions aren't compatible anymore). 146 145 147 146 ==== Measuring ==== … … 156 155 }}} 157 156 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''. Thenselect a thread from the list.157 To 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. 159 158 160 159