Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is “(program)” in Chrome debugger’s profiler?

People also ask

What is profiler in Chrome?

Recording Website's Load Performance If you want to measure how your website loads, you can click the Start profiling and reload the page button next to the Record button. This will record what is going on and below the page while it's being loaded.

What is the use of Chrome debugger?

The chrome. debugger API serves as an alternate transport for Chrome's remote debugging protocol. Use chrome. debugger to attach to one or more tabs to instrument network interaction, debug JavaScript, mutate the DOM and CSS, etc.

How do I read my Chrome Performance Monitor?

To access the Performance tab, navigate to the website you want to profile, then open Chrome DevTools by right-clicking and selecting Inspect. Select the Performance tab inside Chrome DevTools. The easiest way to capture a performance profile is by clicking the Start profiling and reload page icon.


(program) is Chrome itself, the root of the tree calling all other code...it's there because the jump from native code to JavaScript, resource loading, etc. has to start somewhere :)

You can see examples of the treeview in the Chrome developer tool docs.


I believe (program) is native code, not the root of the tree.

See this thread:

https://bugs.webkit.org/show_bug.cgi?id=88446

So, more like system calls than like main().

Apparently it includes idle time. Also, some profiling of (program) is available from chrome://profiler/


As @Nick says, it has to start somewhere.

It looks like the CPU Profiler part is like so many other profilers that are based on the same concepts as gprof.

For example, self is nearly a useless number unless there is something like a bubble-sort of a big array of numbers in some code that you can edit. Highly unlikely.

Total should include callees, so that's more useful. However, unless samples are taken during blocked time as well as during running time, it is still pretty useless except for totally cpu-bound programs.

It gives you these stats by function, rather than by line of code. That means (if you could rely on Total percent) that a function costs that much, in the sense that if you could somehow make it take zero time, such as by stubbing it, that percent is how much time you would save.

So if you want to focus on a costly function, you need to hunt inside it for what could be optimized. In order to do that, you need to know how the time is subdivided among the lines of code in the function. If you had cost on a line of code basis, it would take you directly to those lines.

I don't know if you will be able to get a better profiler, like a wall-clock stack sampler reporting at the line level, such as Zoom. Here's how I do it.