Closed Bug 674074 Opened 13 years ago Closed 13 years ago

about:memory blank in presence of WebGL contexts

Categories

(Core :: Graphics: CanvasWebGL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bjacob, Unassigned)

References

Details

Attachments

(1 file)

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?
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)
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+
> 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.
http://hg.mozilla.org/mozilla-central/rev/15be41bf7150
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: