Closed Bug 1412949 Opened 3 years ago Closed 3 years ago

Some code in SystemMemoryReporter might be dead code

Categories

(Core :: XPCOM, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: marco, Assigned: njn)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

I've noticed LinuxUtils.cpp is completely uncovered by tests (https://codecov.io/gh/marco-c/gecko-dev/src/1ebd2eff44617df3b82eea7d2f3ca1b60cc591a0/xpcom/base/LinuxUtils.cpp).
The portions of SystemMemoryReporter.cpp which are supposed to call LinuxUtils.cpp are not covered too (https://codecov.io/gh/marco-c/gecko-dev/src/1ebd2eff44617df3b82eea7d2f3ca1b60cc591a0/xpcom/base/SystemMemoryReporter.cpp).

Should we remove these portions now that Firefox OS is no longer actively developed and Firefox probably doesn't have access to those system directories?
It's not completely dead... that code is behind the memory.system_memory_reporter pref, which is false by default. You can turn it on and it works. But it's probably not useful, so I'll write a patch to remove it.
jld, can you see any reason not to remove this?
Attachment #8923646 - Flags: review?(erahm)
Attachment #8923646 - Flags: feedback?(jld)
Assignee: nobody → n.nethercote
Status: NEW → ASSIGNED
Comment on attachment 8923646 [details] [diff] [review]
Remove SystemMemoryReporter

Review of attachment 8923646 [details] [diff] [review]:
-----------------------------------------------------------------

Kind of sad to see these go, but I can't think of a good reason to keep them. Can you update the about:memory docs [1] as well?

[1] https://developer.mozilla.org/en-US/docs/Mozilla/Performance/about:memory#System
Attachment #8923646 - Flags: review?(erahm) → review+
Comment on attachment 8923646 [details] [diff] [review]
Remove SystemMemoryReporter

I can't think of a good reason to keep this either.
Attachment #8923646 - Flags: feedback?(jld) → feedback+
https://hg.mozilla.org/mozilla-central/rev/d76af6611465
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.