Skip to content

Extend the workaround in the v53 upgrader to generate missing subcategory columns.#5369

Merged
mstange merged 2 commits into
firefox-devtools:mainfrom
mstange:push-nsnorxwxsnvz
Feb 18, 2025
Merged

Extend the workaround in the v53 upgrader to generate missing subcategory columns.#5369
mstange merged 2 commits into
firefox-devtools:mainfrom
mstange:push-nsnorxwxsnvz

Conversation

@mstange

@mstange mstange commented Feb 13, 2025

Copy link
Copy Markdown
Contributor

@mstange mstange requested a review from canova February 13, 2025 18:24
@codecov

codecov Bot commented Feb 13, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 50.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 85.96%. Comparing base (1ae7b16) to head (16fd7ef).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/profile-logic/processed-profile-versioning.js 40.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5369   +/-   ##
=======================================
  Coverage   85.96%   85.96%           
=======================================
  Files         312      312           
  Lines       30331    30330    -1     
  Branches     8295     8296    +1     
=======================================
+ Hits        26073    26074    +1     
+ Misses       3661     3659    -2     
  Partials      597      597           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@canova canova left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick patch!
I see some inconsistencies with the older version on some vernier profiles. Please see my comment below.

// frameTable.subcategory, such as the ones generated by Lean before
// https://github.com/leanprover/lean4/pull/6363 or the ones generated by
// vernier before https://github.com/jhawthorn/vernier/issues/128 .
if (!frameTable.category || !frameTable.subcategory) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if the profile has category but doesn't have subcategory? Currently that's the case for vernier. And we are actually removing the category data of vernier and rewriting it with the categories that are in the stack table. Which could potentially be wrong.

I think this is okay for most of the case, but when I compared the example profiles, I find some inconsistencies.

For example, this is how this profile looks like before #5342:
Screenshot 2025-02-14 at 11 55 39 AM

And this is how it looks like after this PR:
Screenshot 2025-02-14 at 11 56 39 AM

So it looks like some of the samples are attributed as "idle" now, and it wasn't the case before.

Looking at the samples, and I see that Kernel#system frame was the "other" category and now it's "idle". I'm not familiar with Ruby, but it chatgpt says that in Ruby, Kernel#system is a method that executes a command in a subshell. So I don't think idle is correct here.

What do you think?

I think for vernier profiles, I would prefer to keep the frameTable.category information if they have it, instead of removing it completely.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for double-checking that! After making that change, the activity graph still looks different though - now there's no idle category at all any more! So I think this profile uses the same frame for stacks with different categories, some of them idle and some of them non-idle. This cannot be expressed in the new format - you'd need distinct frames with different frame categories. That's very interesting!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've changed the code to keep the category column and just generate a zero subcategory column. With zero instead of null, I was hoping that the call node tooltip in the flame graph would no longer show ": undefined" but it still does. I haven't looked into why.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've also added comments to express all the constraints that the front-end has for the category information. I'm not sure why I didn't write those comments when I first added those fields. Oh well.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After making that change, the activity graph still looks different though - now there's no idle category at all any more! So I think this profile uses the same frame for stacks with different categories, some of them idle and some of them non-idle. This cannot be expressed in the new format - you'd need distinct frames with different frame categories. That's very interesting!After making that change, the activity graph still looks different though - now there's no idle category at all any more! So I think this profile uses the same frame for stacks with different categories, some of them idle and some of them non-idle. This cannot be expressed in the new format - you'd need distinct frames with different frame categories. That's very interesting!

FYI this has been addressed in the latest release of vernier. Apologies for the delay! https://github.com/jhawthorn/vernier/releases/tag/v1.10.1

@canova canova left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mstange mstange merged commit 64fa0b5 into firefox-devtools:main Feb 18, 2025
@canova canova mentioned this pull request Feb 19, 2025
canova added a commit that referenced this pull request Feb 19, 2025
## Updates:

[Nicolas Chevobbe] Make timeline ruler notches visible in High Contrast
Mode (#5346)
[Nazım Can Altınova] Add the ability to mark marker fields as hidden
(#5354)
[Maxx Crawford] Update guide-startup-shutdown.md (#5357)
[Nazım Can Altınova] Enable prettier on the docs-user markdown files
(#5358)
[Paul Adenot] Allow searching by Content-Type in the network marker view
(#5351)
[Florian Quèze] Hide the pid in global tracks if it is 0. (#5361)
[Markus Stange] Make inverting the call tree fast, by computing inverted
call nodes lazily (#4900)
[Markus Stange] Use 64-bit floats for call tree timings. (#5371)
[Markus Stange] Extend the workaround in the v53 upgrader to generate
missing subcategory columns. (#5369)

## Also thanks to our localizers:

de: Michael Köhler
el: Jim Spentzos
en-GB: Paul
es-CL: ravmn
fr: Théo Chevalier
fur: Fabio Tomat
fy-NL: Fjoerfoks
ia: Melo46
it: Francesco Lodolo
nl: Mark Heijl
pt-BR: Marcelo Ghelman
ru: Valery Ledovskoy
sv-SE: Luna Jernberg, Andreas Pettersson
tr: Grk
uk: Іhor Hordiichuk
zh-CN: Olvcpr423
zh-TW: Pin-guang Chen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Existing profiles from vernier fail to load

3 participants