Closed Bug 1004220 Opened 6 years ago Closed 6 years ago

Add a dump() for MResumePoint

Categories

(Core :: JavaScript Engine: JIT, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla32

People

(Reporter: sunfish, Assigned: sunfish)

Details

Attachments

(2 files)

I recently debugged a tricky bug involving resume points, and found it useful to be able to call dump() on them to see their operands, and to have them show up in the dump() output for MBasicBlocks.

The attached patch implements this, and also moves dump() up to be a virtual function on MNode, which is also a handy place to have a dump() method.
Attachment #8415602 - Flags: review?(nicolas.b.pierron)
Comment on attachment 8415602 [details] [diff] [review]
resumepoint-dump.patch

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

::: js/src/jit/MIRGraph.cpp
@@ +1309,5 @@
>          iter->dump(fp);
>      }
> +    for (MResumePointIterator iter(resumePointsBegin()); iter != resumePointsEnd(); iter++) {
> +        iter->dump(fp);
> +    }

nit: I think it makes more sense to see the resume points with the instructions which are capturing them (except for the block one), as we do in the JSONSpewer[1].

[1] http://dxr.mozilla.org/mozilla-central/source/js/src/jit/JSONSpewer.cpp?from=JSONSpewer.cpp#238
Attachment #8415602 - Flags: review?(nicolas.b.pierron) → review+
This patch implements your suggestion to print the resume point along with the instruction, and adds printing of the mode and caller block. It's different enough that I'm resubmitting it for review.
Attachment #8418870 - Flags: review?(nicolas.b.pierron)
Attachment #8418870 - Flags: review?(nicolas.b.pierron) → review+
https://hg.mozilla.org/mozilla-central/rev/4cff28c41a2f
Assignee: nobody → sunfish
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
You need to log in before you can comment on or make changes to this bug.