Open Bug 1350292 Opened 8 years ago Updated 7 months ago

Memory allocated by WebGL in WebGLBuffer::BufferData is not tracked in about:memory (detected by DMD in heap-unclassified)

Categories

(Core :: Graphics: CanvasWebGL, defect, P2)

defect

Tracking

()

People

(Reporter: jujjyl, Assigned: jgilbert)

Details

(Keywords: feature, Whiteboard: [gfx-noted])

STR: 1. Do a DMD build of Firefox from https://developer.mozilla.org/en-US/docs/Mozilla/Performance/DMD 2. Visit http://mzl.la/webassemblydemo 3. Run a snapshot and analyze the content process Observed: There are 588 memory allocations that are untracked in about:memory, coming from Unreported { 588 blocks in heap block record 5 of 2,715 4,747,008 bytes (4,379,230 requested / 367,778 slop) Individual block sizes: 1,048,576 x 2; 294,912; 196,608; 102,400; 65,536; 45,056 x 4; 32,768 x 4; 24,576 x 8; 20,480 x 8; 16,384 x 8; 12,288 x 4; 8,192 x 50; 4,096 x 101; 2,048 x 68; 1,024 x 129; 512 x 12; 480 x 8; 464 x 4; 448 x 4; 432 x 12; 384 x 8; 320 x 8; 272 x 4; 256 x 8; 240 x 12; 224 x 4; 192 x 25; 176 x 16; 144 x 4; 112 x 8; 96 x 6; 80 x 17; 64 x 4; 48 x 12; 32 x 13; 16 x 9 0.81% of the heap (27.39% cumulative) 2.76% of unreported (93.34% cumulative) Allocated at { #01: mozilla::WebGLBuffer::BufferData (e:\gecko-dev\dom\canvas\webglbuffer.cpp:126) #02: mozilla::WebGLContext::BufferDataImpl (e:\gecko-dev\dom\canvas\webglcontextbuffers.cpp:333) } } which is "newIndexCache" variable that is being malloc()ed at https://dxr.mozilla.org/mozilla-central/source/dom/canvas/WebGLBuffer.cpp#126. This is the fourth highest call site of untracked memory on that page, so it would be good to track these in about:memory under a node "webgl->index-cache-memory" or something similar?
Flags: needinfo?(jgilbert)
Keywords: feature
Priority: -- → P3
Whiteboard: [gfx-noted]
Flags: needinfo?(jgilbert)
Priority: P3 → P2
Severity: normal → S3
Assignee: nobody → jgilbert
Severity: S3 → S4
Type: enhancement → defect

This should be an easy fix.

You need to log in before you can comment on or make changes to this bug.