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

core(tracing): handle FrameCommittedInBrowser with processPseudoId #14800

Merged
merged 9 commits into from
Mar 1, 2023

Conversation

paulirish
Copy link
Member

@paulirish paulirish commented Feb 15, 2023

fixes #14798

There are some traces where the pid isnt available when the frame is created. In these situations, the FrameCommittedInBrowser event has an undefined processId prop, and empty string name prop, and a hexadecimal processPseudoId. Later a ProcessReadyInBrowser event provides the processId.

I'm not sure how common this is, or the exact circumstances. I've only discovered one of my saved traces (out of 200+) had this pattern, but.. matt ran into it #14798 too.

Regardless, here's a fix w/ a test.

@paulirish paulirish requested a review from a team as a code owner February 15, 2023 20:25
@paulirish paulirish requested review from adamraine and removed request for a team February 15, 2023 20:25
Copy link
Member

@brendankenny brendankenny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice fix!

core/lib/tracehouse/trace-processor.js Outdated Show resolved Hide resolved
core/lib/tracehouse/trace-processor.js Outdated Show resolved Hide resolved
core/test/lib/tracehouse/trace-processor-test.js Outdated Show resolved Hide resolved

const procReadyEvt = JSON.parse(JSON.stringify(fcibEvt));
procReadyEvt.name = 'ProcessReadyInBrowser';
procReadyEvt.args.data = {frame, processId, processPseudoId: '0xbaabaa'};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, do the processPseudoIds match? Almost feels like information we should be using in trace-processor (only look at ProcessReadyInBrowser events that have a processPseudoId that matches a FrameCommittedInBrowser without a proccessId?) but maybe it can never matter

Copy link
Member Author

@paulirish paulirish Mar 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yah we definitely could. and I considered it. But I think it's kinda overkill. (tho admittedly OPP does it)
I'm happy to revisit.

@ftservice ftservice linked an issue Feb 28, 2023 that may be closed by this pull request
@brendankenny brendankenny mentioned this pull request Feb 28, 2023
4 tasks
@brendankenny brendankenny merged commit 54ffe04 into main Mar 1, 2023
@brendankenny brendankenny deleted the process-ready-in-browser branch March 1, 2023 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Phone Unable to determine tid for renderer process
4 participants