Closed Bug 1632067 Opened 5 years ago Closed 5 years ago

Generate a CacheIR spewer for JitSpew

Categories

(Core :: JavaScript Engine: JIT, task, P1)

task

Tracking

()

RESOLVED FIXED
mozilla77
Tracking Status
firefox77 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 1 open bug)

Details

Attachments

(6 files)

Now that we have CacheIROps.yaml and code generation for it (bug 1629791) we can use it to generate a text spewer for the warp-snapshots channel. Output looks like this:

    IR:
      GuardShape                    objId 0, shapeOffset 0
      LoadEnclosingEnvironment      objId 0, resultId 1
      GuardShape                    objId 1, shapeOffset 8
      LoadDynamicSlotResult         objId 1, offsetOffset 16
      TypeMonitorResult             

We can also improve the JSON spewer a bit.

I also have various follow-up cleanups for bug 1629791 that I'll post here.

This was used for reused stub fields.

"operand" is a bit confusing for this considering not all operands are OperandIds.

'args' matches CacheIROpFormat::ArgLengths.

Depends on D71900

This changes the JSON spewer to include a bit more information. I'm not sure if
this breaks anything that's actively being used, but it should be easy to fix.

Most of the enums are just converted to an integer, but we could now easily dump
a string representation for them like what we do for JSOp.

Hopefully this won't affect code size too much. JS_CACHEIR_SPEW is only defined in
debug and Nightly builds so there should be no effect on beta/release builds.

Depends on D71901

Define the lengths directly in the Python script. Make CacheIRWriter assert the
written arguments match this information to ensure everything stays in sync.

Depends on D71903

Blocks: 1632127
Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4cd9de2b9ab1 part 1 - Remove unused FieldOffset. r=iain https://hg.mozilla.org/integration/autoland/rev/80b904c34740 part 2 - Make *Id in the YAML file consistent with *OperandId. r=iain https://hg.mozilla.org/integration/autoland/rev/e96bc9140614 part 3 - Rename operands to args. r=iain https://hg.mozilla.org/integration/autoland/rev/04b3647283a2 part 4 - Generate spewer code and use it for text and JSON spewers. r=iain https://hg.mozilla.org/integration/autoland/rev/1b1a0b516762 part 5 - Move CacheIrOpNames definition to the cpp file. r=iain https://hg.mozilla.org/integration/autoland/rev/1a37730d1bd1 part 6 - Simplify arguments length code. r=iain
Priority: -- → P1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: