CPU profiling result contains frames from outer context.
7 views
Skip to first unread message
Jane Chen
unread,
Nov 19, 2016, 8:43:58 PM11/19/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to v8-users
Embedding v8 5.3.
I have a JavaScript function prof.eval which is implemented through a callback function that creates a fresh v8 context, starts CPU profiling, evaluates the inner script, stops profiling and returns profiling result. The profiling result contains frames calling prof.eval in the stack. Is there anyway to exclude the frames for the outer context?
Thanks!
Ben Noordhuis
unread,
Nov 20, 2016, 4:36:09 AM11/20/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to v8-users
I think the answer is 'no'; the profiler ignores context boundaries,
as far as I am aware, even if they have different security tokens.
A workaround is to do all processing in C++, that way it won't be
visible to the CPU profiler.