firefox-devtools / firefox-devtools/profiler

The behavior of transforms with merged threads coud be improved

Open
#3,681 0 comments 0 reactions 0 assignees View on GitHub
data transform
Dominant language
TypeScript
Stars
1.5k
Forks
491
Avg merge
3d 46m
Merged PRs (30d)
27

Description

STR:

1. Open https://share.firefox.dev/2ZyaEXy
1. Open one of the StreamTrans thread.
1. Select the other StreamTrans thread with ctrl to merge these threads together.
1. Drop the NtWaitForAlertByThreadId function

=> notice in the timeline how all samples are still present in the sample graph (the blue line below the tracks)
=> notice that when selecting one of the tracks only, the transform isn't applied.

This is quite confusing to a user. Indeed the transforms are saved with the track index as a key, and in the case of merged threads, track indexes; also the transforms themselves use a thread's func indexes (either directly or through call node paths), which are currently different for each thread.

Probably we should:

* apply the transforms on each of the underlying threads instead of the merged thread
* apply the merge algorithm after transforms

Of course this isn't exactly trivial with the current architecture. From the merged thread we'd need to find the func indexes in all of the underlying threads for this transform. It could be easier if we move the functable (and other tables possibly) to the root of the profile instead of having one different in each thread, like we discussed recently.

cc fqueze

┆Issue is synchronized with this [Jira Task](https://mozilla-hub.atlassian.net/browse/FP-458)

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.