Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it easy to find the line that calls a function #4948

Open
mstange opened this issue Apr 2, 2024 · 1 comment
Open

Make it easy to find the line that calls a function #4948

mstange opened this issue Apr 2, 2024 · 1 comment
Labels
feature Work that is user facing, and typically should be planned through https://airtable.com/shrRydo6UXheb source view Related to the source view feature

Comments

@mstange
Copy link
Contributor

mstange commented Apr 2, 2024

Profile: https://share.firefox.dev/3VKdfIO

In this profile, the function MOZ_Z_adler32 is called by the function MOZ_Z_inflate. However, MOZ_Z_inflate also calls memcpy from a different spot in the function and spends more samples there. This means that double-clicking the MOZ_Z_inflate function only shows the call to memcpy in the source view. The call to MOZ_Z_adler32 is somewhere else and you can't easily find it.

I'd like there to be a way to easily see the line of code in the source view where MOZ_Z_adler32 was called from MOZ_Z_inflate. (It's line 1191, by the way; the call is via the the UPDATE_CHECK macro.)

Maybe we could have a "go to caller" button in the source view which takes the currently selected call node into account. It would select the parent call node, and open the parent call node's source file in the source view, and scroll to the line which is heaviest among the samples in the previously selected child call node.

┆Issue is synchronized with this Jira Task

@mstange mstange added feature Work that is user facing, and typically should be planned through https://airtable.com/shrRydo6UXheb source view Related to the source view feature labels Apr 2, 2024
@julienw
Copy link
Contributor

julienw commented Apr 4, 2024

I like the idea of "go to caller" but it's not perfect either.

I imagine that when selecting a call node, we could have an horizontally scrollable list of all its callees in the source view header, ordered by sample count.
For each of these callees, there would be a button:
Click once => scroll to the line where its called; click twice => go into this callee.
Or one different button for each of these actions.
Or just the action for scrolling, the action for "go into" would be somewhere else (directly on the highlighted line could be a better UI).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Work that is user facing, and typically should be planned through https://airtable.com/shrRydo6UXheb source view Related to the source view feature
Projects
None yet
Development

No branches or pull requests

2 participants