Memory reporter for worker's JS runtime is not being called

RESOLVED DUPLICATE of bug 813867

Status

()

Core
DOM: Workers
RESOLVED DUPLICATE of bug 813867
5 years ago
5 years ago

People

(Reporter: Justin Lebar (not reading bugmail), Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
ARM
Gonk (Firefox OS)
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [MemShrink])

(Reporter)

Description

5 years ago
The DMD report in attachment 691386 [details] shows the following set of unreported blocks in the main process with the B2G gallery app open and in the foreground.

> Unreported: 4 blocks in block group 7 of 724
>  458,752 bytes (448,064 requested / 10,688 slop)
>  1.67% of the heap (19.15% cumulative);  3.41% of unreported (39.19% cumulative)
>  Allocated at
>    malloc /Users/jlebar/code/moz/ff-git/src/memory/build/replace_malloc.c:152 (0x4024e2f6 libmozglue.so+0x42f6)
>    js_new<JSRuntime, JSUseHelperThreads> /Users/jlebar/code/moz/B2G/objdir-gecko/dist/include/js/Utility.h:496 (0x41b7c6f2 libxul.so+0xc686f2)
>    CreateJSContextForWorker /Users/jlebar/code/moz/ff-git/src/dom/workers/RuntimeService.cpp:382 (0x41543f04 libxul.so+0x62ff04)
>    nsThread::ProcessNextEvent(bool, bool*) /Users/jlebar/code/moz/ff-git/src/xpcom/threads/nsThread.cpp:627 (0x419679de libxul.so+0xa539de)
>    NS_ProcessNextEvent_P(nsIThread*, bool) /Users/jlebar/code/moz/B2G/objdir-gecko/dist/include/nsError.h:156 (0x41947c2a libxul.so+0xa33c2a)
>    nsThread::ThreadFunc(void*) /Users/jlebar/code/moz/ff-git/src/xpcom/threads/nsThread.h:63 (0x41967e28 libxul.so+0xa53e28)
>    _pt_root /Users/jlebar/code/moz/ff-git/src/nsprpub/pr/src/pthreads/ptthread.c:159 (0x40180a70 libnspr4.so+0x19a70)
>    __thread_entry /Users/jlebar/code/moz/B2G/bionic/libc/bionic/pthread.c:218 (0x400cde18 libc.so+0x12e18)
>    pthread_create /Users/jlebar/code/moz/B2G/bionic/libc/bionic/pthread.c:362 (0x400cd96c libc.so+0x1296c)
(Reporter)

Updated

5 years ago
Blocks: 563700
(Reporter)

Updated

5 years ago
Whiteboard: [MemShrink]
(Reporter)

Updated

5 years ago
Blocks: 820906
Weird, we have a memory reporter... The only time I know of that the worker runtime won't be included in the report is when the worker is using ctypes, but I don't think that's possible in gaia apps...
Assignee: general → nobody
Component: JavaScript Engine → DOM: Workers
Duplicate of this bug: 820896
Summary: Memory from worker's JS runtime (?) is not reported → Memory reporter for worker's JS runtime is not being called
jlebar points out that there are 4 blocks being unreported here. Given that there are 4 instances of ballast also being unreported, and there should only be one per worker, that suggests there are four workers being unreported.
Ah, I misread comment 0. Since this is the main process we can have ChromeWorkers using ctypes which will not get reported. We have at least one of those (RIL), probably more.
(Reporter)

Updated

5 years ago
Depends on: 813876
Yes, it looks like net_worker.js, ril_worker.js and wifi_worker.js all use ctypes. wifi_worker seems to get spawned twice, so there's our four unreported workers.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 813867
No longer blocks: 820906
No longer depends on: 813876
You need to log in before you can comment on or make changes to this bug.