Closed Bug 1777965 Opened 2 years ago Closed 2 years ago

LUL initialisation: inline `DoInstruction` into its calling loop

Categories

(Core :: Gecko Profiler, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
104 Branch
Tracking Status
firefox104 --- fixed

People

(Reporter: jseward, Assigned: jseward)

References

Details

Attachments

(2 files)

When reading Dwarf unwind info, CallFrameInfo::State::DoInstruction is
called once per CFI instruction. At both call sites, the call is driven by a
simple loop. Because each call doesn't do much work, the call overhead is
quite high, and there are huge numbers of CFI instructions to be processed.

This patch moves the loop into its own method DoInstructions, and adds
annotations in the hope of getting DoInstruction inlined into the loop.

On an Intel Core i5 1135G7 at circa 4 GHz, this reduces the Dwarf read time
from 0.27 seconds (after bugs 1754932, 1777540 and 1777949 have landed) to
0.26 seconds. Not much of a win, but on the other hand, the insn count falls
from 3852 million to 3562 million, which seems like a worthwhile win for what
is a trivial change.

Attached file WIP patch
Severity: -- → N/A
Priority: -- → P3

When reading Dwarf unwind info, CallFrameInfo::State::DoInstruction is
called once per CFI instruction. At both call sites, the call is driven by a
simple loop. Because each call doesn't do much work, the call overhead is
quite high, and there are huge numbers of CFI instructions to be processed.

This patch moves the loop into its own method DoInstructions, and adds
annotations in the hope of getting DoInstruction inlined into the loop.

On an Intel Core i5 1135G7 at circa 4 GHz, this reduces the Dwarf read time
from 0.27 seconds (after bugs 1754932, 1777540 and 1777949 have landed) to
0.26 seconds. Not much of a win, but on the other hand, the insn count falls
from 3906 million to 3640 million, which seems like a worthwhile win for what
is a trivial change.

Depends on D151261

Pushed by jseward@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6809c4596465
LUL initialisation: inline `DoInstruction` into its calling loop.  r=mstange.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: