-
Notifications
You must be signed in to change notification settings - Fork 351
Profiling V8
Nako Sung edited this page Feb 20, 2016
·
7 revisions
- 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/...' folder.
- 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()))