javascript - webkit profiler -


What are the 'self' and 'total' columns? The 'Total' column does not add up to 100% (too much) and it seems that what the self does, I suspect that the self is non-cumulative and is total. Therefore, if methodA call methodB call methodC will look personally for each method call in the ID itself, while the total method will show the total amount of all three methods, the method will show B2, and so on.

Is that correct?

Suppose you have this program:

main () call A ( ) Call B () Call (C), and C for 10 seconds to hang in a loop. The CPU-profiler will say something like this:

  Total time: 10 seconds according to the rule itself% Inclusive% Main 0 100A 100B 100C 100 100  

C. Time itself will be 10 seconds, 100% of others will have their time zero inevitably.

The total (inclusive) time of each of them will be 10 seconds or 100%. You do not add them.

On the other hand, suppose C is doing its 10 second I / O. Then the CPU-only profiler will say something like this:

  Total time: 0 seconds per routine self % Inclusive% Chief? ? a         ? ? B? ? C         ? ?  

Because only the actual CPU uses time it is so small that basically no specimens are pressed, so it is necessary to get the antithesis divided by zero.

OTOH If the specimens were given time of clock-time, you would get the output first.

A better type of profiler is one that is a call stack sample, at the time of the wall clock and as a percentage of the total, tells you inclusive time, and gives you at line-of-code level Is not just for the function This is useful because it is a direct idea how much can be saved if the line was executed less and almost no problem can hide in it. Examples of such professions are, and I have been told that ophfile can do this. Works with any such language and requires only a debugger.


Comments