Closed Bug 1509533 Opened 6 years ago Closed 5 years ago

Shutdown profiles should include content process profiles

Categories

(Core :: Gecko Profiler, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: florian, Assigned: mozbugz)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

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

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...

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

Assignee: nobody → gsquelart

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

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.

Pushed by gsquelart@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/169e737928ca
Include child process profiles in shutdown profiles - r=mstange
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: