firefox-devtools / firefox-devtools/profiler

Make it easy to find the line that calls a function

Open
#4,948 1 comment 0 reactions 0 assignees View on GitHub
source view
Dominant language
TypeScript
Stars
1.5k
Forks
491
Avg merge
3d 46m
Merged PRs (30d)
27

Description

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](https://mozilla-hub.atlassian.net/browse/FP-754)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.