Shutdown profiles should include content process profiles

RESOLVED FIXED in Firefox 67

Status

()

enhancement
P1
normal
RESOLVED FIXED
7 months ago
4 months ago

People

(Reporter: florian, Assigned: gerald)

Tracking

(Blocks 2 bugs)

unspecified
mozilla67
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox67 fixed)

Details

Attachments

(1 attachment)

Reporter

Description

7 months ago
Currently shutdown profiles dumped using the MOZ_PROFILER_SHUTDOWN environment variable contain only a profile of the parent process. It's likely that the other profiles are available but not written to the JSON file we dump to the disk.

More info from Markus:
> here’s the code that doesn’t include content process profiles:
> https://searchfox.org/mozilla-central/rev/20df68a5f5b5e078a11fa62a681f09debda61d79/tools/profiler/core/platform.cpp#3012-3015
> 
> `nsProfiler::mExitProfiles` probably has the content process profiles;
> in the normal profile collection code paths we include those:
> https://searchfox.org/mozilla-central/rev/876022232b15425bb9efde189caf747823b39567/tools/profiler/gecko/nsProfiler.cpp#648-657
Tentatively setting as P1, since folks are actively looking at startup/shutdown right now, and this is a blocker.
Priority: -- → P1
Assignee

Updated

4 months ago
See Also: → 1528859
Assignee

Comment 2

4 months ago

I've opened bug 1528859 for a stop-gap solution, where MOZ_PROFILER_SHUTDOWN will generate separate files for each process.

But this bug here should still get a proper fix eventually...

Assignee

Comment 3

4 months ago

Got it working, yeah! Will submit soon...

Assignee: nobody → gsquelart
Assignee

Comment 4

4 months ago

Example: https://perfht.ml/2X7iBgm
Notice that child processes are present, and have shut down before the main process.

Assignee

Comment 5

4 months ago

Received exit profiles are now stored in the main process' ActivePS and managed
there, including discarding expired profiles (when they don't intersect with the
parent's profile anymore).

nsProfiler may grab exit profiles from the profiler when the add-on needs them.

On shutdown, the profiler now includes non-expired exit profiles.

Comment 6

4 months ago
Pushed by gsquelart@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/169e737928ca
Include child process profiles in shutdown profiles - r=mstange
Assignee

Updated

4 months ago
Blocks: 1529131
Assignee

Updated

4 months ago
Blocks: 1528859
See Also: 1528859

Comment 7

4 months ago
bugherder
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.