about:memory blank in presence of WebGL contexts

RESOLVED FIXED

Status

()

Core
Canvas: WebGL
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: bjacob, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

This seems to be a recent regression, since it worked fine when I initially landed WebGL about:memory support.

Steps to reproduce:
1. load a WebGL script in a tab
2. load about:memory in another tab

Result: about:memory is completely blank
Bug 669611 added some sanity checking to aboutMemory.js.  If I open the error console on FOTN I see  "uncaught exception: assertion failed: elem._kind is not KIND_OTHER for webgl-buffer-cache-memory."

In WebGLContext.cpp three of the reporters have KIND_HEAP:  webgl-buffer-cache-memory, webgl-shader-sources-size, webgl-shader-translationlogs-size.  All the others have KIND_OTHER.

The comments in nsIMemoryReporter explain that KIND_HEAP reporters must have a path of the form "explicit/a/b".  Should these three reporters just be changed to KIND_OTHER?
(Reporter)

Comment 2

6 years ago
Created attachment 548511 [details] [diff] [review]
unbreak WebGL about:memory

Since these really are heap memory measurements, I kept KIND_HEAP and used "explicit/..." names as you suggested. That works. Also, I like that they're hidden by default as they're small: in this way, they don't clutter the view as they used to but if eventually one becomes big, it will show up.
Attachment #548511 - Flags: review?(nnethercote)
(Reporter)

Updated

6 years ago
Duplicate of this bug: 674306
Comment on attachment 548511 [details] [diff] [review]
unbreak WebGL about:memory

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

So the memory covered by the reporters is always on the heap, i.e. allocated with malloc/calloc/realloc/new/new[]?  And there's no overlap between the memory, i.e. no byte of memory is counted by more than one reporter?  This is ok if so.
Attachment #548511 - Flags: review?(nnethercote) → review+
Duplicate of this bug: 674427
(Reporter)

Comment 6

6 years ago
> So the memory covered by the reporters is always on the heap, i.e. allocated
> with malloc/calloc/realloc/new/new[]?  And there's no overlap between the
> memory, i.e. no byte of memory is counted by more than one reporter?  This
> is ok if so.

Yes and yes, for the 3 KIND_HEAP reporters in question here. THere is no overlap, neither among these reporters nor between them and any other reporter.

The KIND_OTHER WebGL reporters, on the other hand, account for stuff not on the heap.
Great!
(Reporter)

Comment 8

6 years ago
http://hg.mozilla.org/mozilla-central/rev/15be41bf7150
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.