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
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
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.
Reply all
Reply to author
Forward
0 new messages