Closed Bug 538393 Opened 14 years ago Closed 14 years ago

Assembler allocates two code chunks for each assembly pass even if the code has no side exits

Categories

(Core Graveyard :: Nanojit, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED
flash10.1

People

(Reporter: edwsmith, Assigned: edwsmith)

References

Details

(Whiteboard: fixed-in-nanojit, fixed-in-tamarin, fixed-in-tracemonkey)

Attachments

(1 file, 1 obsolete file)

We eagerly allocate code for side exits before we know we need it.  In tamarin-redux this results in one extra code chunk being allocated and returned to CodeAlloc each time we jit, and we'd like to eliminate that overhead.

It turns out a simple fix is to lazy-allocate memory for side exits.
Blocks: 460993
Target Milestone: --- → flash10.1
Assignee: nobody → edwsmith
Attachment #420561 - Flags: review?(graydon)
Seems reasonable, but can you add a comment to Assembler::_nExitIns in Assembler.h mentioning it's not valid if there are no side exits because the underlying memory isn't allocated?  Thanks.
yes, and i'll double make sure it's nulled out in that case.
Attachment #420561 - Flags: review?(graydon) → review?(nnethercote)
Attachment #420561 - Attachment is obsolete: true
Attachment #421106 - Flags: review?(nnethercote)
Attachment #420561 - Flags: review?(nnethercote)
Attachment #421106 - Attachment is patch: true
Attachment #421106 - Attachment mime type: application/octet-stream → text/plain
Attachment #421106 - Flags: review?(nnethercote) → review+
Whiteboard: fixed-in-nanojit
Whiteboard: fixed-in-nanojit → fixed-in-nanojit fixed-in-tamarin
http://hg.mozilla.org/tracemonkey/rev/5fe8a6fe07c4
Whiteboard: fixed-in-nanojit fixed-in-tamarin → fixed-in-nanojit, fixed-in-tamarin, fixed-in-tracemonkey
Priority: -- → P3
http://hg.mozilla.org/tracemonkey/rev/5fe8a6fe07c4
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.