Closed Bug 1170877 Opened 5 years ago Closed 5 years ago

Track how many times the SurfaceCache has overflowed and report it in about:memory

Categories

(Core :: ImageLib, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: seth, Assigned: seth)

Details

Attachments

(1 file)

I've run into a lot of issues with management of image memory that only happen in a very transient fashion - for example, only when scrolling. These issues generally don't show up in about:memory because by the time someone collects a report, the peak memory situation is already over and things have returned to normal.

I'd like a cheap way for these issues to leave some kind of trace in about:memory, so it's more obvious in memory reports when these things are happening. The most obvious approach is to count the number of times we've been unable to insert a surface because the SurfaceCache was out of space. I needed a snappy term for that, so let's call it an "overflow".

I'm not going to do it in this bug, but this is also the kind of thing that might be worth reporting in Telemetry. If we ever see a sudden increase in the number of overflows users are experiencing, it'd be something we'd want to investigate ASAP.
Comment on attachment 8614486 [details] [diff] [review]
Track how many times the SurfaceCache has overflow and report it in about:memory

Just one language nit:

>@@ -792,16 +794,24 @@ public:
>+    rv = MOZ_COLLECT_REPORT("imagelib-surface-cache-overflow-count",
>+                            KIND_OTHER, UNITS_COUNT,
>+                            mOverflowCount,
>+                            "Count of how many times the surface cache has hit "
>+                            "its capacity limit and been unable to insert a "
>+                            "new surface.");

"capacity limit" seems a bit redundant. Maybe drop "limit"?

(so, "...hit its capacity and been unable to insert")

r=me regardless
Attachment #8614486 - Flags: review?(dholbert) → review+
Thanks for the review! I'll make that change.
https://hg.mozilla.org/mozilla-central/rev/908408ee27c7
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.