On Sun, Oct 30, 2016 at 2:03 AM, Talha <[email protected]> wrote:
> Hello,
>
> I am looking to understand the role of timer events in V8. Do the  timeline
> plots generated by profviz.html provide accurate information about how much
> time was spent while executing code performing a particular operation (e.g.
> looking at "compile unopt" row, can I say with confidence that "full code
> generator" worked only for the time shown by this plot)? Also, am I correct
> in understanding that the %ages shown next to each category represent %
> execution time spent in each category and should sum to a 100% ?

I think at least some cooperation from the host application is
necessary to get accurate numbers.  We had an issue in node.js some
years back where it never summed to 100% due to (lack of) idle time
accounting.

> From what I understand, these charts are generated using timing information
> associated with "timer-event-start" and "timer-event-end" events which are
> inserted whenever a particular code portion starts/ends execution in V8.
> Looking at these events should accurately tell me which part of the code is
> responsible for which functionality. Am I correct? Please point out if I
> misunderstood something.

That's right.  It's calculated from more than just timer events - the
built-in sampling profiler is involved as well - but that's details.

> Also, I think I understand most of what the plot represents except for
> "external". I learned it corresponds to external callbacks in V8. Can anyone
> clarify what these external callbacks are?

External callbacks are callbacks from V8 to the host application.  For
example, when JS code calls a C++ API function that you created with
v8::FunctionTemplate::New() or
v8::ObjectTemplate::SetNamedPropertyHandler(), that's counted as
external callback time.

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to