Deprecated: Function get_magic_quotes_gpc() is deprecated in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 99

Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 619

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1169

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176
8000 Source view for marker stacks by fqueze · Pull Request #5633 · firefox-devtools/profiler · GitHub
Nothing Special   »   [go: up one dir, main page]

Skip to content

Conversation

fqueze
Copy link
Contributor
@fqueze fqueze commented Oct 9, 2025

This would go nicely with the work I'm doing in https://bugzilla.mozilla.org/show_bug.cgi?id=1993214 to include crash stacks in test resource usage profiles.

deploy preview

@codecov
Copy link
codecov bot commented Oct 9, 2025

Codecov Report

❌ Patch coverage is 50.49505% with 50 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.64%. Comparing base (f566a5b) to head (9544c00).

Files with missing lines Patch % Lines
src/profile-logic/profile-data.ts 0.00% 15 Missing ⚠️
src/utils/codemirror-shared.ts 33.33% 12 Missing ⚠️
src/components/shared/Backtrace.tsx 68.18% 6 Missing and 1 partial ⚠️
src/components/marker-chart/Canvas.tsx 64.28% 5 Missing ⚠️
src/components/shared/SourceView.tsx 72.72% 3 Missing ⚠️
src/components/shared/chart/Canvas.tsx 0.00% 3 Missing ⚠️
src/components/sidebar/MarkerSidebar.tsx 40.00% 3 Missing ⚠️
src/components/shared/SourceView-codemirror.ts 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5633      +/-   ##
==========================================
- Coverage   85.75%   85.64%   -0.12%     
==========================================
  Files         311      311              
  Lines       30703    30784      +81     
  Branches     8443     8471      +28     
==========================================
+ Hits        26329    26364      +35     
- Misses       3950     3996      +46     
  Partials      424      424              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fqueze fqueze requested a review from mstange October 9, 2025 15:24
@fqueze fqueze changed the title [deploy preview] Source view for marker stacks Source view for marker stacks Oct 9, 2025
Copy link
Contributor
@mstange mstange left a comment

Choose a reason for hiding this comment

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

I think this is a great addition, thank you so much! I have lots of comments on the implementation, but I'm strongly in favour of the intent behind the changes.


// Build a mapping from filtered frame index to stack index
const { stackTable } = thread;
const stackIndices: IndexIntoStackTable[] = [];
Copy link
Contributor

Choose a reason for hiding this comment

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

We've mostly aligned on using "indexes" instead of "indices" for the plural of index in this codebase. (Edit: the other review comments will make this comment obsolete because I'm also asking you to remove this variable)

</li>
)
({ funcName, origin, isFrameLabel, category, inlineDepth }, i) => {
return (
Copy link
Contributor

Choose a reason for hiding this comment

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

The addition of the return is unnecessary.

thread
);

// Build a mapping from filtered frame index to stack index
Copy link
Contributor

Choose a reason for hiding this comment

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

Compute this in getBacktraceItemsForStack instead; you can give BacktraceItem a new stackIndex property. And maybe rename funcNamesAndOrigins to backtraceItems.

Comment on lines 54 to 57
// Create event handlers for each stack frame to avoid arrow functions in JSX
const stackFrameHandlers = onStackFrameClick
? stackIndices.map((stackIdx) => () => onStackFrameClick(stackIdx))
: [];
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of creating a separate function per backtrace item, let's just create a single function. It should get the stackIndex from the event target. You can use a data-stackIndex attribute to store it on the element.

Comment on lines 75 to 77
onDoubleClick={
onStackFrameClick ? stackFrameHandlers[i] : undefined
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Given the hover effect and the hand cursor, I think we should do this on regular click, not on double click.

// The props have changed but not the selectedItem. Check if it's still valid
// by attempting to get its info. If it throws or returns null, the item is
// no longer valid (e.g., filtered out).
try {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not loving this try. Do you know in what cases the call to getHoveredItemInfo would throw?

Comment on lines 190 to 191
// When we have a specific line number to scroll to (e.g., from a crash marker)
// but no timing data, create synthetic timings to highlight that line.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't we just forward the scrollToLine along as another prop for SourceView, e.g. highlightedLine? Fake sample counts aren't very useful.

Comment on lines 83 to 86
const lib = profile.libs[nativeSymbol.libIndex];
if (!lib) {
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

If a numeric indexing operation returns undefined it means there's a bug and we used a bad index. A check like this hides a bug; if we actually hit this return then we should find out why. Don't add this check.

Comment on lines 44 to 46
if (!isAssemblyViewAvailable) {
return null;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I disagree with this change; if we add more buttons I don't want them to shift position depending on context. Is the disabled state not disabled enough?

return null;
}
return profile.libs[nativeSymbol.libIndex];
return profile.libs[nativeSymbol.libIndex] ?? null;
Copy link
Contributor

Choose a reason for hiding this comment

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

Wait, does this mean I missed something in the crash marker stack review and we forgot to populate profile.libs? Profiles with bad lib indexes in the nativeSymbols table are invalid.

@fqueze fqueze force-pushed the source-view-for-marker-stacks branch from 08ad5ed to 9544c00 Compare October 20, 2025 19:10
@fqueze fqueze requested a review from mstange October 20, 2025 19:13
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.

2 participants

0