profiler
profiler copied to clipboard
Re-evaluate whether we need the "implementation" concept, or if subcategories are enough
Long ago, we added "implementation" information to our UI so that we could differentiate between JS code that was running in a JavaScript JIT, JS code that was running in the interepreter, and non-JS code. This was before we had subcategories.
Now we have subcategories, which carry much of the same information. We should re-evaluate whether we still need the implementation info, and maybe remove it entirely. Both from the UI and from the profile data.
┆Issue is synchronized with this Jira Task
Example profile: https://share.firefox.dev/3dlkdfI
My inclination is that the implementation should be removed. It can often be wrong. We were using it because we didn't have the more precise subcategory data at the time.
As an example of a stack where the two disagree, here's a stack from the above profile where the implementation says "JS JIT (blinterp)", but the subcategory says "Parsing": https://share.firefox.dev/3DnkyJp The subcategory is right.
I'll ask denispal and jandem for feedback next week.
It would definitely simplify the (um err) implementation of the code and the profile processing pipeline, then you could also lean into to making the categories more useful.
I found #3572 which is at odds with the idea of removing the implementation entirely.
Maybe we could, for JS functions only, expose that function's implementation. And then not display any implementation-related information on non-JS functions. However, the implementation of a single JS function can change over time; it's a property of the frame, and multiple frames may have collapsed into the same function. So at that point you'd need some kind of breakdown again.
I found #3572 which is at odds with the idea of removing the implementation entirely.
Actually, I think this subcategories could also solve the flame graph tooltip use case.
@moztcampbell, @dpalmeiro, what are your opinions on removing "Implementation" and just using the subcategories to differentiate the various JIT tiers?
A lesser change would be to implement a flag in the profile to disable it (#3709), this would be beneficial to external tools.
Yes, once this implementation lands, let's discuss what to do for Firefox in #3709. My opinion is that we should just always display the category tooltip and completely remove anything related to the implementation, but we can do this independently of this PR.
My opinion is that we should just always display the category tooltip and completely remove anything related to the implementation, but we can do this independently of this PR.
The tooltip part has now been done in #4966. We still have code to display "implementation" things in other places, though.