LUL initialisation: inline `CmpExtentsByOffsetLE` so as to speed up sorting of `SecMap::mExtents`
Categories
(Core :: Gecko Profiler, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox104 | --- | fixed |
People
(Reporter: jseward, Assigned: jseward)
References
Details
Attachments
(1 file)
After parsing Dwarf unwind info, the resulting mExtents
array must be sorted
by start address. This forms a significant part of the overall unwind-info
reading costs.
This is done by calling std::sort
. Unfortunately the way it is coded, the
comparison function is not inlined, which results in 91 million calls to it
when reading info up to and including for libxul.so.
This small patch turns it into a closure, which is inlined. For (performance)
safety, Extent::offset()
is marked inline too.
On an Intel Core i5 1135G7 at circa 4 GHz, this reduces the Dwarf read time
from 0.42 seconds (after bug 1754932 has landed) to 0.35 seconds. Insn count
falls from 5630 million to 4775 million.
Assignee | ||
Comment 1•2 years ago
|
||
After parsing Dwarf unwind info, the resulting mExtents array must be sorted
by start address. This forms a significant part of the overall unwind-info
reading cost.
This is done by calling std::sort. Unfortunately the way it is coded, the
comparison function is not inlined, which results in 91 million calls to it
when reading info up to and including for libxul.so.
This small patch turns it into a closure, which is inlined. For (performance)
safety, Extent::offset() is marked inline too.
On an Intel Core i5 1135G7 at circa 4 GHz, this reduces the Dwarf read time
from 0.42 seconds (after bug 1754932 has landed) to 0.35 seconds. Insn count
falls from 5630 million to 4775 million.
Comment 3•2 years ago
|
||
bugherder |
Description
•