about:memory sawtooth memory usage pattern under odd circumstances

RESOLVED WONTFIX

Status

()

Core
General
RESOLVED WONTFIX
7 years ago
2 years ago

People

(Reporter: Jesse Ruderman, Unassigned)

Tracking

({mlk})

Trunk
x86_64
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [ironic])

Attachments

(1 attachment)

(Reporter)

Description

7 years ago
(2011-05-13 nightly on Mac)

1. about:memory?verbose
2. javascript:setInterval(sendHeapMinNotifications, 0); void 0

Result: several entries increase steadily forever:
  heap-used/tjit-data/allocators/main 
  heap-used/other

Expected: memory use should be reasonably steady
Whiteboard: [ironic]
(Reporter)

Comment 1

7 years ago
If I turn tracejit off in about:config, tjit-data becomes stable (of course) and heap-used/other bounces around within 1MB.  So I bet the leak is a tjit leak.  (But it would be nice to know what causes the "other" bouncing.)
Jesse, you are a sadist :P

I'll take a look next week.
Created attachment 532883 [details] [diff] [review]
Massif output

AFAICT this is not a true leak.  On my Linux64 box, the tjit-data count started at < 1MB, got up to about 12MB before dropping back again to < 1MB, whereupon the cycle was repeated.

I did a Massif run, here's the graph:

    MB
44.75^                                                           #
     |                                                   : : : : #
     |                                       :      :::: ::::::::#
     |                  :                    :  :::::: ::::::::::#
     |                  :    ::      ::::::::::::::::: ::::::::::#
     |              ::  :  :::::::::::::: :::::::::::: ::::::::::#
     |           :::: ::::::::::::::::::: :::::::::::: ::::::::::#     :::::::
     |   :::::::::::: : ::::::::::::::::: :::::::::::: ::::::::::#::::::::::::
     |  ::::::::::::: : ::::::::::::::::: :::::::::::: ::::::::::#::::::::::::
     |  ::::::::::::: : ::::::::::::::::: :::::::::::: ::::::::::#::::::::::::
     |  ::::::::::::: : ::::::::::::::::: :::::::::::: ::::::::::#::::::::::::
     |  ::::::::::::: : ::::::::::::::::: :::::::::::: ::::::::::#::::::::::::
     | :::::::::::::: : ::::::::::::::::: :::::::::::: ::::::::::#::::::::::::
     | :::::::::::::: : ::::::::::::::::: :::::::::::: ::::::::::#::::::::::::
     | :::::::::::::: : ::::::::::::::::: :::::::::::: ::::::::::#::::::::::::
     | :::::::::::::: : ::::::::::::::::: :::::::::::: ::::::::::#::::::::::::
     | :::::::::::::: : ::::::::::::::::: :::::::::::: ::::::::::#::::::::::::
     | :::::::::::::: : ::::::::::::::::: :::::::::::: ::::::::::#::::::::::::
     | :::::::::::::: : ::::::::::::::::: :::::::::::: ::::::::::#::::::::::::
     | :::::::::::::: : ::::::::::::::::: :::::::::::: ::::::::::#::::::::::::
   0 +----------------------------------------------------------------------->s
     0                                                                   786.2

The Massif snapshots show a range of tracer allocation points, nothing terribly surprising.

Not surprisingly, if you disable javascript.options.tracejit.content the sawtooth pattern disappears.
Summary: about:memory memory leak → about:memory sawtooth memory usage pattern under odd circumstances
(Reporter)

Comment 4

7 years ago
So I guess the tracer just isn't listening for memory-pressure notifications like it should?

This makes it a little tricky to use about:memory to tell which *other* actions are causing memory use to rise permanently.
(In reply to comment #4)
> So I guess the tracer just isn't listening for memory-pressure notifications
> like it should?

Quite possibly.  I'm not aware of anywhere in the JS engine where these notifications are listened for.  (But I might just not know about them.)  CC'ing some JS guys who might know.
(Reporter)

Comment 6

7 years ago
The memory pressure observer in nsJSEnvironment.cpp tells the JS engine to GC, so it's probably a good place to tell the JS engine to do other kinds of memory use reduction.

http://hg.mozilla.org/mozilla-central/annotate/5ffdf4967dec/dom/base/nsJSEnvironment.cpp#l197
Duplicate of this bug: 678647
The trace JIT is long gone. I don't think anything will come from this bug.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.