Reduce OffTheBooks allocation to (nearly) zero.

NEW
Unassigned

Status

()

Core
JavaScript Engine
7 years ago
3 years ago

People

(Reporter: Paul Biggar, Unassigned)

Tracking

Trunk
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 years ago
After bug 634155, there will be 42 OffTheBooks allocations. The GC does not know about these allocations, and so is unable to factor them into its decisions. We should remove these wherever possible.

Comment 1

7 years ago
There is actually a ton more of these places, literally thousands--outside the JS engine. I think the right thing to do here is to start monitoring overall process memory use.
(Reporter)

Comment 2

7 years ago
(In reply to comment #1)
> There is actually a ton more of these places, literally thousands

I don't understand. I thought allocating JS objects etc went through the JSAPI, like using JS_NewObject.

Comment 3

7 years ago
Yes, JS object headers are allocate inside the engine. The embedding can attach megabytes of malloc-ed memory to a JS object though. The JS heap is usually a small part of our total memory profile.
Also, unless the GC incremental rewrite that is ongoing has changed things, the when-to-GC heuristics are touchy and adding more on-the-books accounting can cause SS and other benchmark regressions due to too much GC.

/be
So, retuning will be a wild ride. Definitely do not want for Fx4.

Comment 1 is right and there's even some electrolysis work to build on, IIRC. Cc'ing cjones.

/be
(In reply to comment #1)
> There is actually a ton more of these places, literally thousands--outside the
> JS engine. I think the right thing to do here is to start monitoring overall
> process memory use.

Does this mean adding OffTheBooks was a waste of time?

Comment 7

7 years ago
No, it means it needs more work.
(Assignee)

Updated

3 years ago
Assignee: general → nobody
You need to log in before you can comment on or make changes to this bug.