Closed Bug 1475561 Opened 7 years ago Closed 6 months ago

Large vectors cause a lot of wasted space in LifoAlloc

Categories

(Core :: JavaScript Engine, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1489572

People

(Reporter: nbp, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: memory-footprint, perf)

The problem appears in both TI and Ion allocations, which are both using LifoAlloc for small and large allocation, including structures which are re-allocated. This causes LifoAlloc to waste a lot of memory as it will only allocate in the last chunks. Also, most of these allocations might be caused by structures which might be resized, and waste roughly the same amount of space with unused allocated memory. > Thread 1 hit Breakpoint 3, js::LifoAlloc::getOrCreateChunk (this=this@entry=0x25203a0, n=n@entry=9216) at /home/nicolas/mozilla/wksp-3/js/src/ds/LifoAlloc.cpp:223 > 223 { > 1: chunks_.last_->capacity_ - chunks_.last_->bump_ = 3984 > #0 js::LifoAlloc::getOrCreateChunk (this=this@entry=0x25203a0, n=n@entry=9216) at /home/nicolas/mozilla/wksp-3/js/src/ds/LifoAlloc.cpp:223 > … > #4 js::jit::FixedList<js::jit::LBlock>::init (length=<optimized out>, alloc=..., this=0x25cad80) at /home/nicolas/mozilla/wksp-3/js/src/jit/FixedList.h:39 > #5 js::jit::LIRGraph::init (this=0x25cad80) at /home/nicolas/mozilla/wksp-3/js/src/jit/LIR.h:1901 > Thread 1 hit Breakpoint 3, js::LifoAlloc::getOrCreateChunk (this=this@entry=0x1a67570, n=n@entry=4104) at /home/nicolas/mozilla/wksp-3/js/src/ds/LifoAlloc.cpp:223 223 { > 1: chunks_.last_->capacity_ - chunks_.last_->bump_ = 3504 > #0 js::LifoAlloc::getOrCreateChunk (this=this@entry=0x1a67570, n=n@entry=4104) at /home/nicolas/mozilla/wksp-3/js/src/ds/LifoAlloc.cpp:223 > … > #5 js::TypeHashSet::InsertTry<jsid, js::ObjectGroup::Property, js::ObjectGroup::Property> (key=..., count=<optimized out>, values=<optimized out>, alloc=...) at /home/nicolas/mozilla/wksp-3/js/src/vm/TypeInference-inl.h:778 > #6 js::TypeHashSet::Insert<jsid, js::ObjectGroup::Property, js::ObjectGroup::Property> (alloc=..., values=@0x7f8c841b8068: 0x25268a8, count=@0x7ffef03aa97c: 128, key=..., key@entry=...) at /home/nicolas/mozilla/wksp-3/js/src/vm/TypeInference-inl.h:852 > #7 0x00007f8cc7508cc5 in js::ObjectGroup::getProperty (this=this@entry=0x7f8c841b8040, sweep=..., cx=cx@entry=0x115a180, obj=obj@entry=0x7f8cbb4721c8, id=..., id@entry=...) at /home/nicolas/mozilla/wksp-3/js/src/vm/TypeInference-inl.h:1150
Priority: -- → P3
Severity: normal → S3
Blocks: sm-runtime
Severity: S3 → S2
Status: NEW → RESOLVED
Closed: 6 months ago
Duplicate of bug: 1489572
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.