Closed
Bug 605362
Opened 14 years ago
Closed 14 years ago
Add (coarse-grained) memory reporters for shmem
Categories
(Core :: IPC, defect)
Core
IPC
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
fennec | 2.0b3+ | --- |
People
(Reporter: cjones, Assigned: cjones)
Details
Attachments
(5 files)
9.45 KB,
patch
|
joe
:
review+
|
Details | Diff | Splinter Review |
5.05 KB,
patch
|
joe
:
review+
|
Details | Diff | Splinter Review |
3.61 KB,
patch
|
vlad
:
review+
|
Details | Diff | Splinter Review |
3.91 KB,
patch
|
joe
:
review+
|
Details | Diff | Splinter Review |
10.79 KB,
patch
|
joe
:
review+
|
Details | Diff | Splinter Review |
I propose reporting shmem/allocated shmem/mapped (lumping all the different shmem types, basic/sysv/android together) and the specific uses as, e.g. shmem/imagesurface shmem/ximage shmem/cgbitmap Vlad, does that follow the spirit of the about:memory display? Not sure how the various counts are expected to add up. Let's have this bug cover the gross shmem usage, and report the breakdown in followups. (This is most useful for mobile, and all the shmem we allocate there atm is for gfxSharedImageSurfaces.)
That looks fine -- the about:memory detailed display doesn't add up to any of the numbers, you sort of need a decoder ring to figure out which things are supposed to add up to any other things. But that's fine, I'd rather have as much data as we can in there and do the analysis separately if we run into memory-related problems.
Assignee | ||
Comment 2•14 years ago
|
||
Assignee: nobody → jones.chris.g
Attachment #484237 -
Flags: review?(joe)
Assignee | ||
Comment 3•14 years ago
|
||
Attachment #484238 -
Flags: review?(joe)
Assignee | ||
Comment 4•14 years ago
|
||
Attachment #484239 -
Flags: review?(vladimir)
Assignee | ||
Comment 5•14 years ago
|
||
Attachment #484240 -
Flags: review?(joe)
Assignee | ||
Comment 6•14 years ago
|
||
The way these patches work is, shmem/allocated reports the total shmem bytes actually allocated (by the system interfaces) by a process. shmem/mapped returns the total bytes mapped, which might be more, less, or the same as the amount allocated (though in our usage so far, mapped >= allocated). This allows us to see what has been allocated in the content process vs. chrome.
Comment on attachment 484239 [details] [diff] [review] part 3: Add MemoryReporters for shmem. er, 'static bool registered;' is missing a = false?
Attachment #484239 -
Flags: review?(vladimir) → review+
Comment 8•14 years ago
|
||
Comment on attachment 484237 [details] [diff] [review] part 1: Allocate page-aligned shmem segments in ShmImage, to match other allocators which more honestly report address space and system mem taken by alloc >+/*static*/ size_t >+SharedMemory::PageAlignedSize(size_t aSize) >+{ >+ size_t pageSize = SystemPageSize(); >+ size_t nPagesNeeded = int(ceil(double(aSize) / double(pageSize))); = size_t(ceil(...))?
Attachment #484237 -
Flags: review?(joe) → review+
Comment 9•14 years ago
|
||
Comment on attachment 484238 [details] [diff] [review] part 2: Track allocated sizes (in the allocating process) in all shmem backends Why not track/store alloc size in SharedMemory? We do something similar in gfxASurface, fwiw.
Attachment #484238 -
Flags: review?(joe) → review+
Updated•14 years ago
|
Attachment #484240 -
Flags: review?(joe) → review+
Assignee | ||
Comment 10•14 years ago
|
||
(In reply to comment #8) > Comment on attachment 484237 [details] [diff] [review] > = size_t(ceil(...))? Oop, yep. (In reply to comment #9) > Comment on attachment 484238 [details] [diff] [review] > part 2: Track allocated sizes (in the allocating process) in all shmem backends > > Why not track/store alloc size in SharedMemory? We do something similar in > gfxASurface, fwiw. Well, we're tracking allocs in SharedMemory. I thought about making mAllocSize a member of SharedMemory, but the only thing I believe it buys us is being able to call DestroyedShmem() from ~SharedMemory. I could make that change if you want.
Assignee | ||
Comment 11•14 years ago
|
||
Attachment #485471 -
Flags: review?(joe)
Comment 12•14 years ago
|
||
Comment on attachment 485471 [details] [diff] [review] part 5: Centralize more of the accounting So we're no longer going to report things as unmapped or destroyed until the destructor is called?
Attachment #485471 -
Flags: review?(joe) → review+
Assignee | ||
Comment 13•14 years ago
|
||
We don't (currently) support unmapping or destroying SharedMemorys separate from ~SharedMemory().
Assignee | ||
Comment 14•14 years ago
|
||
Requesting blocking because it's going to be hard to get memory usage info from users in the field without these patches. Technically approval? is probably more appropriate.
tracking-fennec: --- → ?
Updated•14 years ago
|
tracking-fennec: ? → 2.0b3+
Updated•14 years ago
|
Status: NEW → ASSIGNED
Whiteboard: [fennec-checkin-postb2][has-patch]
Assignee | ||
Comment 15•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/f5e82d1422e6 http://hg.mozilla.org/mozilla-central/rev/62bbf0aed452 http://hg.mozilla.org/mozilla-central/rev/e25e8b0bb4d0 http://hg.mozilla.org/mozilla-central/rev/e390c6cf96b1 http://hg.mozilla.org/mozilla-central/rev/ffb9040a013b http://hg.mozilla.org/mozilla-central/rev/0aa98eae87ed
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Updated•14 years ago
|
Whiteboard: [fennec-checkin-postb2][has-patch]
You need to log in
before you can comment on or make changes to this bug.
Description
•