Closed Bug 989344 Opened 10 years ago Closed 10 years ago

IonMonkey: Lower resume points and encode them with RecoverWriter.

Categories

(Core :: JavaScript Engine: JIT, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: nbp, Assigned: nbp)

References

Details

Attachments

(2 files)

Currently RecoverWriter is writing one Recover entry per snapshot.  We should share the recover entry among snapshots and encode the recover separately.
This patch extract the LRecover out of LSnapshot, this patch also separate the function for encoding Recover and Snapshots.
Assignee: nobody → nicolas.b.pierron
Status: NEW → ASSIGNED
Attachment #8398940 - Flags: review?(jdemooij)
Attachment #8398940 - Attachment description: Extract LRecover from LSnapshot. → [part 1] Extract LRecover from LSnapshot.
Attachment #8398958 - Flags: review?(jdemooij)
Blocks: 989641
Comment on attachment 8398940 [details] [diff] [review]
[part 1] Extract LRecover from LSnapshot.

Review of attachment 8398940 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/jit/shared/CodeGenerator-shared.cpp
@@ +311,1 @@
>          recovers_.endFrame();

AFAICS, endFrame doesn't do much. Can we combine startFrame and endFrame as writeFrame()?

@@ +324,5 @@
>  
> +    if (!encode(snapshot->recover()))
> +        return false;
> +
> +    RecoverOffset recoverOffset = snapshot->recover()->recoverOffset();

Nit: MOZ_ASSERT(recoverOffset != INVALID_RECOVER_OFFSET);
Attachment #8398940 - Flags: review?(jdemooij) → review+
Comment on attachment 8398958 [details] [diff] [review]
[part 2] Share LRecover between LSnapshot

Review of attachment 8398958 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/jit/shared/Lowering-shared.cpp
@@ +56,5 @@
>      lir->setOperand(inputPosition, LUse(operand->virtualRegister(), LUse::ANY));
>  }
>  
>  LRecover *
>  LIRGeneratorShared::buildRecover(MResumePoint *rp)

Renaming this to getRecover now would make it more clear that it's not always returning a new LRecover.
Attachment #8398958 - Flags: review?(jdemooij) → review+
As discussed on IRC, LRecoverInfo would be nice.
(In reply to Jan de Mooij [:jandem] from comment #3)
> Comment on attachment 8398940 [details] [diff] [review]
> [part 1] Extract LRecover from LSnapshot.
> 
> ::: js/src/jit/shared/CodeGenerator-shared.cpp
> @@ +311,1 @@
> >          recovers_.endFrame();
> 
> AFAICS, endFrame doesn't do much. Can we combine startFrame and endFrame as
> writeFrame()?

I did so, and removed the nallocs_ field of RecoverWriter, as it is only used within writeFrame.
Blocks: 989667
https://hg.mozilla.org/mozilla-central/rev/2aeb2f123f8e
https://hg.mozilla.org/mozilla-central/rev/feae125fca6f
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: