firefox-devtools / profiler

Firefox Profiler — Web app for Firefox performance analysis
https://profiler.firefox.com
Mozilla Public License 2.0
1.19k stars 390 forks source link

Selecting multiple threads hides IPC markers in the marker chart #3038

Open mstange opened 3 years ago

mstange commented 3 years ago

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

Steps to reproduce:

  1. Collect a profile with IPC information using the "IPC messages" profiler feature, or load the profile linked above.
  2. Use Cmd+Click to select multiple threads, at least one of which has IPCIn or IPCOut markers.

The IPC markers disappear in the merged thread.

┆Issue is synchronized with this Jira Task

julienw commented 3 years ago

I found this in the console: Unable to find shared data for IPC marker (marker-data.js:582:20)

This belongs to this code: https://github.com/firefox-devtools/profiler/blob/04127134822d616346298cb504262ad1ccad7b08/src/profile-logic/marker-data.js#L578-L584

But in the case of merged threads, the threadId here is undefined because of https://github.com/firefox-devtools/profiler/blob/04127134822d616346298cb504262ad1ccad7b08/src/profile-logic/merge-compare.js#L970

I don't know yet what's the best way to fix this. Especially I know nothing about the implementation around IPC markers, what is this correlation, etc. @gregtatum I believe you reviewed this code from Jim, and you worked on the merged threads implementation, so maybe you'll have a few ideas :-)