Closed Bug 1652883 Opened 5 years ago Closed 5 years ago

Shared surfaces memory reporter should give KIND_OTHER a different path

Categories

(Core :: Graphics: ImageLib, task)

task

Tracking

()

RESOLVED FIXED
mozilla80
Tracking Status
firefox80 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

References

Details

Attachments

(1 file)

In ImageMemoryReporter::ReportSharedSurface(), the surface is reported as a KIND_NONHEAP if it was not already reported, according to some reasoning I don't understand, or KIND_OTHER if it was already reported.

The problem is that you can end up with paths that vary only in their PID that have different kinds. When you do a diff, it first normalizes the PID, so you end up with multiple entries with the same path but different kinds. This causes an assertion in about:memory. In fact, when I capture a memory report locally and attempt to diff it with itself, it hits this assertion.

I think the easiest fix is to make the last segment something like "/decoded-other" instead of "/decoded-nonheap if it is KIND_OTHER instead of KIND_NONHEAP.

If you do a diff, all of the different shared surfaces get merged together,
because the diffing process removes all PIDs from the paths. This means
you end up hitting an assertion when the diffing process tries to combine
entries with the same path but different kinds.

I should probably write a test that we can diff a memory report with itself and it produces an empty report...

I started hacking up a test that diffs a report against itself, but it doesn't produce the exception. It looks like this particular issue requires that WebRender is enabled, and the memory reporter tests are crusty mochitest-chrome tests that presumably don't have it enabled. Maybe I can rewrite it as a browser chrome test or something. It looks like we do run those on Windows with WebRender enabled.

I don't think I really have time to investigate how to write an about:memory test in a new suite so we get WebRender coverage.

Pushed by amccreight@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/25360f9d4a9c Shared surfaces memory reporter should give KIND_OTHER a different path. r=aosmond
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
See Also: → 1654035
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: