Closed
Bug 1369420
Opened 9 years ago
Closed 3 years ago
Identical failure paths should be collapsed
Categories
(Core :: CSS Parsing and Computation, enhancement, P3)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: away, Unassigned)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [Stylo])
In the disassembly of style::properties::PropertyDeclaration::parse_into, at the end there is an area with hundreds of repetitions of:
142476 00000001`80437946 e8b5490f00 call xul!alloc::oom::oom (00000001`8052c300)
142476 00000001`8043794b 0f0b ud2
142476 00000001`8043794d e8ae490f00 call xul!alloc::oom::oom (00000001`8052c300)
142476 00000001`80437952 0f0b ud2
142476 00000001`80437954 e8a7490f00 call xul!alloc::oom::oom (00000001`8052c300)
142476 00000001`80437959 0f0b ud2
...
I'm guessing what's happening is that the compiler places unlikely fatal codepaths at the end of the function, outside of the normal control flow (which is good) but it would be good if it could recognize when several of these paths will lead to the same place and collapse them to save space.
(Such an optimization would be incorrect if we're using the return address as a differentiator for which particular OOM occurred, but I don't believe that's the case here.)
This was on a Win64 opt build, if it matters.
Comment 1•9 years ago
|
||
This sounds like something Rust or LLVM should optimize? It doesn't seem to me this is something optimizable in our code.
Comment 2•9 years ago
|
||
Marking this a tooling bug per comment 1, NI dmajor to verify.
Blocks: stylo-tooling
Flags: needinfo?(dmajor)
Summary: stylo: Identical failure paths should be collapsed → Identical failure paths should be collapsed
Whiteboard: [Stylo]
Comment 4•9 years ago
|
||
Should we ask some Rust guys to take a look at this problem?
Hard to say; it varies based on function.
style::properties::PropertyDeclaration::parse_into is about 1% repeated-oom-gunk (5KB).
style::properties::{{impl}}::clone has about 6 pages of oom-gunk compared to 3 pages of actual code!
Some other random functions I dumped don't have any repetition at all.
Wild guess, maybe that 1% number is reasonable to extrapolate from?
Flags: needinfo?(dmajor)
Comment 7•9 years ago
|
||
That seems significant enough to pursue. Brian, can you route this and bring it up with the right people?
Flags: needinfo?(andersrb)
Comment 8•9 years ago
|
||
I have cross-posted a bug and pinged somebody who might be interested: https://github.com/rust-lang/rust/issues/42666
Flags: needinfo?(andersrb)
Updated•8 years ago
|
Priority: -- → P3
Updated•8 years ago
|
status-firefox57:
--- → wontfix
status-firefox58:
--- → fix-optional
Comment 9•8 years ago
|
||
status-firefox59:
--- → ?
Comment 10•3 years ago
|
||
This doesn't seem to be happening anymore.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•