Closed Bug 638199 Opened 13 years ago Closed 13 years ago

Shrink ArenaHeader

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: gwagner, Assigned: gwagner)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file, 1 obsolete file)

We can move some fields from ArenaHeader to the debug mode.
Attached patch patch (obsolete) — Splinter Review
Use thingSize and isUsed only in debug mode.
Assignee: general → anygregor
Attached patch patchSplinter Review
Attachment #516368 - Attachment is obsolete: true
Attachment #517320 - Flags: review?(wmccloskey)
I'm actually not too familiar with the low-level arena code. A few questions:
- Why did you move the assertion in Arena<T>::mark?
- Why is it okay to get rid of the CGCT_FREEARENA check?
- In Chunk::init, it seems like you should be setting arena->compartment to NULL. Is it okay to assume that new chunks are zeroed?
(In reply to comment #3)
> I'm actually not too familiar with the low-level arena code. A few questions:
> - Why did you move the assertion in Arena<T>::mark?

Because I removed the redundant check in MarkIfGCThingWord. Now we can enter this function for an unsued arena and the thingsize is 0;
Only after "if (!aheader.compartment || inFreeList(alignedThing))" we know that the arena is used now.
 

> - Why is it okay to get rid of the CGCT_FREEARENA check?
It is redundant.

> - In Chunk::init, it seems like you should be setting arena->compartment to
> NULL. Is it okay to assume that new chunks are zeroed?

Good point! I think this line got lost during my last merge.
Comment on attachment 517320 [details] [diff] [review]
patch

OK, now I see. Thanks.
Attachment #517320 - Flags: review?(wmccloskey) → review+
http://hg.mozilla.org/tracemonkey/rev/d339633d2c42
Whiteboard: fixed-in-tracemonkey
http://hg.mozilla.org/mozilla-central/rev/d339633d2c42
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: