Closed zacharyfmarion closed 8 months ago
@jlfwong can you take a look? I can provide an example trace but I don't want to post it publicly.
Hey @zacharyfmarion! Thanks for the investigation and the patch!
An example trace sent privately would be appreciated (you can send to jamie.lf.wong at gmail), but even better would be a dramatically reduced test file that minimally reproduces the issue.
I have been taking a lot of profiles using the Hermes profiler, but I noticed that they sometimes to not show up properly. After debugging what exactly was going on, I realized it was because the logic in
selectQueueToTakeFromNext
only checks for name, instead of the key for the event. I had a bunch of events with the nameanonymous
that were getting improperly exited before they should have been due to this logic.This fix makes the code more robust if there are added "args" which differentiate an event from another (as is the case in Hermes profiles), however it would still be an issue if they key just defaults to the name.
Example profile before:
What it should look like (in Perfetto):
After the fix: