Extend the workaround in the v53 upgrader to generate missing subcategory columns.#5369
Conversation
Codecov ReportAttention: Patch coverage is
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. |
5ae2cd7 to
217755f
Compare
canova
left a comment
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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:

And this is how it looks like after this PR:

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.
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
217755f to
16fd7ef
Compare
## 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
Production | Deploy preview
Fixes #5368.