[go: up one dir, main page]

Page MenuHomePhabricator

Bug 2036825 part 3 - Add and use AutoJitSpewMessage. r?iain!
ClosedPublic

Authored by jandem on May 27 2026, 3:54 PM.
Referenced Files
Unknown Object (File)
Wed, Sep 30, 7:54 AM
Unknown Object (File)
Tue, Sep 22, 2:31 PM
Unknown Object (File)
Aug 24 2026, 3:23 AM
Unknown Object (File)
Aug 22 2026, 6:42 PM
Unknown Object (File)
Aug 19 2026, 5:18 AM
Unknown Object (File)
Aug 18 2026, 8:07 PM
Unknown Object (File)
Aug 16 2026, 4:49 AM
Unknown Object (File)
Jul 22 2026, 4:29 PM
Subscribers

Details

Summary

JIT spew is currently backed by a file output stream (such as stderr) so it's
possible to just call JitSpewPrinter() and write to it. When we start using
MOZ_LOG/JS_LOG this will no longer work because we want to log a single
message/line at a time with logPrint.

This patch replaces these uses (and uses of JitSpew{Start,Cont,Finish}) with an
AutoJitSpewMessage RAII class that buffers the spew and writes it in its destructor.
This lets us switch to MOZ_LOG/JS_LOG in the next patch.

Diff Detail

Event Timeline

phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: secure-revision.
nbp added a subscriber: nbp.

I do not see the reason for changing the argument order in DumpBlockTableRows, and I do not really care to be honest.
Overall, this is change sounds good to me.

I do not see the reason for changing the argument order in DumpBlockTableRows, and I do not really care to be honest.

Oops yeah that was leftover from a refactoring for a different approach. I've reverted that change.

mgaudet added inline comments.
js/src/jit/shared/CodeGenerator-shared.cpp
323

Should you perhaps pass msg to this?

This revision is now accepted and ready to land.Jun 1 2026, 5:50 PM
jandem added inline comments.
js/src/jit/shared/CodeGenerator-shared.cpp
323

It's writing separate lines so not passing is okay.

Actually I think this one could just be a plain JitSpew(...) call; it doesn't need AutoJitSpewMessage. The JitSpewStart call that was here before was unnecessary because there wasn't anything else on the same line.

jandem marked an inline comment as done.

I changed a few other places to use plain JitSpew for stand-alone lines. It reduces the scope of some AutoJitSpewMessages a bit.