About:Memory does not list a PID for Main Process and Socket Process
Categories
(Toolkit :: about:memory, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: lh.bennett, Assigned: n.nethercote)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0
Steps to reproduce:
Main Process has not had a PID listed for a while but Socket Process is fairly new. Its much easier to track down the processes when there's a PID attached.
Updated•4 years ago
|
Comment 1•4 years ago
|
||
The priority flag is not set for this bug.
:njn, could you have a look please?
For more information, please visit auto_nag documentation.
Assignee | ||
Comment 2•4 years ago
|
||
This is modelled on the corresponding code in
RDDParent::RecvRequestMemoryReport()
.
Updated•4 years ago
|
Assignee | ||
Comment 3•4 years ago
|
||
Adding the PID to the socket process is easy and I have uploaded a patch for it.
The main process is harder, because it gets special treatment -- normal memory reporters use an empty string for the process name and then about:memory turns that into "Main Process". Is it possible to get the main process pid from JS chrome code?
Assignee | ||
Comment 4•4 years ago
|
||
Is it possible to get the main process pid from JS chrome code?
Services.appinfo.processID
does the trick!
Assignee | ||
Comment 5•4 years ago
|
||
Services.appinfo.processID does the trick!
Hmm, no, that won't work. E.g. if we load memory reports from file, we need the PID from when they were saved, not the current PID, because they may have been saved in a different invocation of Firefox (possibly even on a different machine).
Updated•4 years ago
|
Assignee | ||
Comment 6•4 years ago
|
||
Oh, interesting: if you get live measurements by pressing the "Measure..." button, you just get "Main Process" for the main process. But if you do "Measure and save..." and then subsequently load, you get "Main Process (pid XYZ)", due to this code.
Assignee | ||
Comment 7•4 years ago
|
||
In the tests we now explicitly use "Main Process" (or similar) for the process
name in various places to avoid having to filter out a PID.
Also in test_aboutmemory[34].xhtml
, the main process entries now appear
first, as they should, because the sorting code now looks for a "Main Process"
prefix, rather than an exact match.
Depends on D72995
Pushed by nnethercote@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5112f6a72171 Add pid to the socket process in about:memory. r=valentin,necko-reviewers https://hg.mozilla.org/integration/autoland/rev/693d927ca216 Add pid to the main process in about:memory. r=erahm
Comment 9•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5112f6a72171
https://hg.mozilla.org/mozilla-central/rev/693d927ca216
Description
•