Open Bug 1357810 Opened 7 years ago Updated 2 years ago

Investigate source of memory_pressure event in gecko, and whether to repurpose it

Categories

(Core :: JavaScript: GC, enhancement, P3)

enhancement

Tracking

()

Performance Impact low

People

(Reporter: djvj, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: perf, perf:responsiveness, triage-deferred)

Gecko reports a memory_pressure event which initiates GC.  This was supposedly introduced due to requirements by B2G, and may not be relevant any more.

Can we use a free memory metric and repurpose this event to make it relevant again?
I thought linux, windows, and osx all had this concept too?
I guess there's prior art in bug 664291.
Whiteboard: [qf]
Whiteboard: [qf] → [qf:investigate]
(In reply to Mike Conley (:mconley) from comment #3)
> Found at least one place where it's fired:
> 
> http://searchfox.org/mozilla-central/rev/
> 7aa21f3b531ddee90a353215bd86e97d6974e25b/xpcom/base/nsMemoryImpl.cpp#115-149

I think that's only triggered by nsIMemory::heapMinimize, which is used in imglib [1] and NPAPI's NPN_memflush [2].

[1] http://searchfox.org/mozilla-central/rev/7aa21f3b531ddee90a353215bd86e97d6974e25b/image/ImageFactory.cpp#225
[2] http://searchfox.org/mozilla-central/rev/7aa21f3b531ddee90a353215bd86e97d6974e25b/dom/plugins/base/nsNPAPIPlugin.cpp#926
Keywords: triage-deferred
Priority: -- → P3
Keywords: perf
Whiteboard: [qf:investigate] → [qf:js:investigate]
Performance Impact: --- → ?
Whiteboard: [qf:js:investigate]

Setting keyword perf:responsiveness because this is about GC timing, and GC blocks the main thread.

Performance Impact: ? → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.