profiler
profiler copied to clipboard
The line numbers in marker stacks (shown in the tooltip or in the sidebar) should be the line number of the frame, not the line number where the function starts
Here is an example profile: https://perfht.ml/2LwnxbS
In the cause for the "reflow" marker, the line number 24 is where the function has been defined, instead of the actual line inside this function that triggers this synchronous reflow.
This profile was taken from the testcase in https://everlong.org/mozilla/testcase-reflow-sync.html.
┆Issue is synchronized with this Jira Task
We can make use of the frameTable's line column here. This column is otherwise unused in perf.html at the moment. It contains the line number of the frame's executed line of JavaScript for JS interpreter frames, and is null otherwise. Bug 1441689 tracks adding this information for JS JIT frames as well.
Yeah, the current code is: https://github.com/devtools-html/perf.html/blob/9934bc950d25e5baf88ebb5179d5d5363288ff4e/src/components/shared/Backtrace.js#L42-L47
We currently use the funcTable to get the information in: https://github.com/devtools-html/perf.html/blob/9934bc950d25e5baf88ebb5179d5d5363288ff4e/src/profile-logic/profile-data.js#L1614-L1617