-
Notifications
You must be signed in to change notification settings - Fork 351
Profiling V8
Nako Sung edited this page Dec 11, 2016
·
7 revisions
Go to V8 inspector
- For serious V8 profiling, add '--prof' to V8 flags in 'Editor - Project Settings - Plugins - UnrealJS - V8 Flags' and restart engine. After shutting down JavascriptIsolate, 'isolate-*-v8.log' will be dumped in 'Engine/Binaries/Win64/...' folder.
- clone
v8
npm i -g http-server
-
cd v8/tools
andhttp-server
to launch simple web server - open
http://localhost:8080/profviz/profviz.html
- Visit http://v8.googlecode.com/svn/trunk/tools/tick-processor.html, and feed '*-v8.log' to analyze.
const sessionName = 'SessionName'
JavascriptProfile.Start(sessionName)
<<< HEAVY WORK LOAD >>>
let profile = JavascriptProfile.Stop(sessionName)
profile.GetTopRootNode().GetFunctionName()
function traverse(node,visit) {
visit(node)
_.range(node.GetChildCount()).forEach(index =>
traverse(node.GetChild(index))
)
)
traverse(profile.GetTopRootNode(), node => console.log(node.GetFunctionName()))