The default bug view has changed. See this FAQ.

IonMonkey: Track Bailout rate and provide localization data in debug builds.

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: nbp, Assigned: nbp)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
The idea of this bug is to provide a mean to highlight abnormal bailout rate and to help us find what is the instruction (JSOP, MIR, LIR) involved in the production of this bailout.

The reported number can be the number of start/loop header the script hit before hitting the bailout. (opposite of the rate, but the idea is the same)  A repeated small number of hit for one bailout will likely indicate a point which need to be optimized or debug.

Localization data would be extremely useful to avoid tracking them by hand which can become unpractical especially on benchmarks.
(Assignee)

Updated

5 years ago
Assignee: general → nicolas.b.pierron
Status: NEW → ASSIGNED
(Assignee)

Comment 1

5 years ago
Created attachment 588562 [details] [diff] [review]
Copy the Opcodes which lead to a snapshot.

This patch copy the history of opcodes used until the encoding of a snapshot.
This history is printed each time the snapshot is read, which is convenient for tracking unexpected bailouts.
Attachment #588562 - Flags: review?(dvander)
Comment on attachment 588562 [details] [diff] [review]
Copy the Opcodes which lead to a snapshot.

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

Instead of:
#ifdef DEBUG // TRACK_BAILOUT
Could we have:
#ifdef TRACK_BAILOUT
And conditionally #define it in Ion.h or something? The comment is kind of jarring and doesn't help to explain the code.

::: js/src/ion/LIR.h
@@ +703,5 @@
> +        return ins_;
> +    }
> +
> +  public:
> +    void setInstruction(LInstruction *ins) {

This will need a non-DEBUG implementation.
Attachment #588562 - Flags: review?(dvander) → review+
hg.mozilla.org/projects/ionmonkey/rev/81769819d9e6
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
http://hg.mozilla.org/projects/ionmonkey/rev/e6091710117c

As an addendum: also prints instruction IDs and moves output to 'bailouts'.
You need to log in before you can comment on or make changes to this bug.