Open Bug 1825001 Opened 1 year ago Updated 1 year ago

Add MIR & LIR output to Perf DEBUG_INFO.

Categories

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

enhancement

Tracking

()

ASSIGNED

People

(Reporter: nbp, Assigned: nbp)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

IonMonkey had long been debug with tools such as iongraph, which generates png/pdf view of the various stages of compilation which are happening while compiling a given function.

In the past (Bug 1147403), this instrumentation got converted to generate its JSON spew asynchronously, by storing the content of the spew in the buffer used to compile each function.

This asynchronous output got used as a mean to investigate the behavior of IonMonkey while running web-pages within the browser, via the dev-tools. This provided some insight that the controlled environment like the JS Shell shelter us from.

This bug is to replicate a similar exfiltration of MIR & LIR to the Gecko profiler, to get a better understanding of optimization within the browser, by first starting with perf instrumentation.

This change modifies how IonPerfSpewer is used within IonMonkey to move it next
to the GraphSpewer.

It renames IONFILTER to ION_FILTER_NAME environment variable, in order to
add ION_FILTER_PASS, which is aimed at filtering the compilation passes which
are produced while compiling functions. It defaults to the first and last
passes, as testing all passes highlighted a huge overhead caused by the
traversal of the MIR graph after each stages of the compiler.

At the moment, the spew name is indexed in the *.so file JIT_CODE_DEBUG_INFO
section, as-if this was a source. In the future, a better place might be
necessary depending on how we decide on using it in the Firefox Profiler UI.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: