Skip to content

Pass the correct sample index offset to getTimingsForCallNodeIndex for the flame graph tooltip.#5328

Merged
julienw merged 1 commit into
firefox-devtools:mainfrom
mstange:fix-flamegraph-preview-offset
Jan 17, 2025
Merged

Pass the correct sample index offset to getTimingsForCallNodeIndex for the flame graph tooltip.#5328
julienw merged 1 commit into
firefox-devtools:mainfrom
mstange:fix-flamegraph-preview-offset

Conversation

@mstange

@mstange mstange commented Jan 17, 2025

Copy link
Copy Markdown
Contributor

Fixes #5323.

The other caller of getTimingsForCallNodeIndex is the getTimingsForSidebar selector, which already passes the right offset.

…r the flame graph tooltip.

Fixes firefox-devtools#5323.

The other caller of getTimingsForCallNodeIndex is the getTimingsForSidebar
selector, which already passes the right offset.
@mstange mstange requested a review from julienw January 17, 2025 14:31
@mstange mstange self-assigned this Jan 17, 2025

@julienw julienw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we used the "CommitedRange" version because the thread passed above is the one from CommittedRange, not the one that is PreviewFiltered.

However the samples below are preview-filtered. That's what matters here. Thanks for the fix!

Random observations:
It looks like we use the thread only for its stringTable and its funcTable. I'm not sure these structures change when a thread is filtered....

Also in the timing function itself, we use the stringTable only for the JS implementation, that we want to remove in favor of the categories anyway.

@julienw julienw merged commit 503d2eb into firefox-devtools:main Jan 17, 2025
@canova canova mentioned this pull request Jan 30, 2025
canova added a commit that referenced this pull request Jan 30, 2025
Updates:

[Julien Wajsberg] Some more small refactorings (#5320)
[Markus Stange] Pass the correct sample index offset to
getTimingsForCallNodeIndex for the flame graph tooltip. (#5328)
[Nisarg Jhaveri] Update docs to include Android Studio/Simpleperf trace
file support (#5309)
[Markus Stange] Don't pass the preview filtered thread to
getTimingsForPath/CallNodeIndex. (#5329)
[Nazım Can Altınova] Add a "Sample timestamp" field to the sample
tooltip in timeline (#5322)
[Markus Stange] Reduce confusion between call tree summary strategy
aware samples and regular samples (#5330)
[Markus Stange] Rename this getCounter selector to getCounters. (#5337)
[Markus Stange] Make sample indexes compatible between the unfiltered
and (preview) filtered call tree summary strategy samples when using an
allocation strat>
[Markus Stange] Remove some code that uses the preview filtered thread
(#5336)
[Markus Stange] Remove getMarkerSchemaName special cases - look up
marker schemas from data.type and nothing else (#5293)
[Markus Stange] Remove the makeProfileSerializable step - make the raw
in-memory profile match the format that's stored in the file (#5287)
[Nicolas Chevobbe] Adapt FilterNavigatorBar to High Contrast Mode.
(#5257)
[Nicolas Chevobbe] Adapt Tracks to High Contrast Mode. (#5252)
[Markus Stange] Adjust string index fields in markers when merging
threads (#5344)
[Theodoros Nikolaou] Localize title and aria label in ProfileName
(#5345)
[Julien Wajsberg] Adapt time-slice selection in High Contrast Mode.
(#5259)
[Markus Stange] Make stackTable (sub)category derived data (#5342)
[Markus Stange] Compute cpuRatio values when computing the derived
thread (#5288)
[Nazım Can Altınova] Add a context menu item to open the JS scripts in
DevTools debugger (#5295)

Also thanks to our localizers:

el: Jim Spentzos
fr: Théo Chevalier
it: Francesco Lodolo [:flod]
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.

The category breakdown in the Flame Graph tooltip is wrong whenever a preview selection is applied

2 participants