(In reply to comment #57)
> This looks like a GCC problem. I think given the sheer number of comments here,
> GCC's PGO is so buggy/fickle as to be unusable.
That may be, but we have enough gcc-brains in mozilla now that we have little excuse to not try to deploy it. Here is why.
I am building with gcc 4.4.3 on fedora, didn't run into any issues mentioned in this bug(may be luck).
Here are some cold startup numbers. First is the name where ordered=(application of bug 549749), static=(bug 525013), and pgo=(pgo with debloating -freorder-blocks-and-partition). Second column is cold startup time. Third column is RSS(ie how much ram is paged in via mmap, in this experiment it basically demonstrates how horribly inefficiently our code is laid out right now).
firefox.stock: 2515ms 49452
firefox.ordered 1919ms 45344
firefox.static 2321ms 49616
firefox.static.ordered 1577ms 37072
firefox.static.pgo 1619ms 38436
The improvements in startup stem completely from improved seeking behavior. There is a 3x reduction in pagefaults between the slowest and fastest build.
The reason why pgo is fast(as far as I can tell it does not lay out the binary chronologically) is because -freorder-blocks-and-partition breaks up functions into their useful part(ie the part that executes) and a bloated part(ie error checking that isn't needed 99% of the time.
Unfortunately I haven't yet figured out how to chronologically order symbols in a pgo build, that would result in the fastest-feasible-firefox-binary.
Conclusion: PGO wins are massive and very real. Because of -freorder-blocks-and-partition pgo can effectively debloat our functions resulting in a nimbler-smaller firefox. This combined with likely more efficient-runtime performance means we should aggressively pursue PGO.
Aside: All this made me wonder if it's possible to build on top of -freorder-blocks-and-partition to output cold functions as thumb for mobile. From my limited understanding of arm stuff, that should give us a very nice footprint win.
(In reply to comment #57)
> This looks like a GCC problem. I think given the sheer number of comments here,
> GCC's PGO is so buggy/fickle as to be unusable.
That may be, but we have enough gcc-brains in mozilla now that we have little excuse to not try to deploy it. Here is why.
I am building with gcc 4.4.3 on fedora, didn't run into any issues mentioned in this bug(may be luck).
Here are some cold startup numbers. First is the name where ordered= (application of bug 549749), static=(bug 525013), and pgo=(pgo with debloating -freorder- blocks- and-partition) . Second column is cold startup time. Third column is RSS(ie how much ram is paged in via mmap, in this experiment it basically demonstrates how horribly inefficiently our code is laid out right now).
firefox.stock: 2515ms 49452
firefox.ordered 1919ms 45344
firefox.static 2321ms 49616
firefox. static. ordered 1577ms 37072
firefox.static.pgo 1619ms 38436
The improvements in startup stem completely from improved seeking behavior. There is a 3x reduction in pagefaults between the slowest and fastest build. blocks- and-partition breaks up functions into their useful part(ie the part that executes) and a bloated part(ie error checking that isn't needed 99% of the time. feasible- firefox- binary.
The reason why pgo is fast(as far as I can tell it does not lay out the binary chronologically) is because -freorder-
Unfortunately I haven't yet figured out how to chronologically order symbols in a pgo build, that would result in the fastest-
Conclusion: PGO wins are massive and very real. Because of -freorder- blocks- and-partition pgo can effectively debloat our functions resulting in a nimbler-smaller firefox. This combined with likely more efficient-runtime performance means we should aggressively pursue PGO.
Aside: All this made me wonder if it's possible to build on top of -freorder- blocks- and-partition to output cold functions as thumb for mobile. From my limited understanding of arm stuff, that should give us a very nice footprint win.