Closed
Bug 666465
Opened 13 years ago
Closed 13 years ago
IonMonkey: Add JSON dump for easier parsing by visualization tools
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: adrake, Assigned: adrake)
Details
Attachments
(1 file)
11.92 KB,
patch
|
dvander
:
review+
|
Details | Diff | Splinter Review |
Parsing C1Visualizer spew is difficult and the format is insufficiently expressive for everything we'd like to do with IonMonkey data visualization. This patch adds a JSON formatted spew for use by visualization tools which can be easily changed and extended.
Assignee | ||
Comment 1•13 years ago
|
||
Emits some basic instruction and block information. Also serves as a base for interval spewing for the register allocator.
Comment 2•13 years ago
|
||
Didn't you write a visualizer for live ranges as well?
Comment on attachment 541246 [details] [diff] [review] Patch v0 Review of attachment 541246 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/ion/Ion.cpp @@ +163,5 @@ > spew.spew("Generate LIR"); > + jsonspew.beginPass("Generate LIR"); > + jsonspew.spewMIR(&graph); > + jsonspew.spewLIR(&graph); > + jsonspew.endPass(); Hrm. This will get kind of annoying. Could you piggyback the jsonspew through the C1 spew? Alternately, create some kind of generic spew interface (spewer->SpewPass("blah")) and choose a spew mechanism ahead of time. ::: js/src/ion/JSONSpewer.h @@ +51,5 @@ > +namespace ion { > + > +class JSONSpewer > +{ > +private: Nit: two-space indent here, and for the "public" below. @@ +76,5 @@ > + > +public: > + JSONSpewer() : > + first_(true) > + { } Extreme nit: I'm not sure what the house style is for constructors anymore, but it'd be good to have consistency. I've been doing: Name() : singleItem(singleItem) { } Or, Name() : item1(item1), item2(item2) { } @@ +92,5 @@ > + void endPass(); > + > + void endFunction(); > + > + void finish(); Nit: I would cram all these functions together, no need to separate them all with newlines.
Attachment #541246 -
Flags: review?(dvander) → review+
Assignee | ||
Comment 4•13 years ago
|
||
(In reply to comment #2) > Didn't you write a visualizer for live ranges as well? Yes, but live ranges don't exist outside of the patch in my queue yet. Also, that would be a new bug.
Assignee | ||
Comment 5•13 years ago
|
||
http://hg.mozilla.org/users/danderson_mozilla.com/ionmonkey/rev/45251f570996
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•