Closed Bug 657032 Opened 13 years ago Closed 9 years ago

about:memory sawtooth memory usage pattern under odd circumstances

Categories

(Core :: General, defect)

x86_64
macOS
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: jruderman, Unassigned)

References

Details

(Keywords: memory-leak, Whiteboard: [ironic])

Attachments

(1 file)

(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]
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.
Attached patch Massif outputSplinter Review
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
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.
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
The trace JIT is long gone. I don't think anything will come from this bug.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: