profiler icon indicating copy to clipboard operation
profiler copied to clipboard

Re-evaluate whether we need the "implementation" concept, or if subcategories are enough

Open mstange opened this issue 3 years ago • 8 comments

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

mstange avatar Dec 04 '21 01:12 mstange

Example profile: https://share.firefox.dev/3dlkdfI

Screen Shot 2021-12-03 at 8 26 49 PM

mstange avatar Dec 04 '21 01:12 mstange

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.

mstange avatar Dec 04 '21 01:12 mstange

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.

gregtatum avatar Dec 06 '21 14:12 gregtatum

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.

mstange avatar Dec 06 '21 20:12 mstange

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?

mstange avatar Jan 20 '22 21:01 mstange

A lesser change would be to implement a flag in the profile to disable it (#3709), this would be beneficial to external tools.

parttimenerd avatar Aug 17 '22 08:08 parttimenerd

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.

mstange avatar Aug 20 '22 06:08 mstange

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.

mstange avatar Apr 26 '24 14:04 mstange