PGO Build Support in UXP?
Posted: 2019-07-23, 21:39
I surfed around on the forums trying to find if there was any particular reason UXP does not use PGO and/or why Mozilla removed it from their Makefile.
Other than cited stability concerns and the lack of manpower (per Mozilla, even though they actually still patch it themselves on Windows builds), I didn't find much.
PGO Builds (after patching the Makefile to restore the compile time option) do still work in the tree, up until the linker haults with undefined reference to `gfxShapedWord* gfxFont::GetShapedWord. This was a known issue that occured in GCC6+ and was fixed in m-c 1389436.
Per the bug report:
Other than cited stability concerns and the lack of manpower (per Mozilla, even though they actually still patch it themselves on Windows builds), I didn't find much.
PGO Builds (after patching the Makefile to restore the compile time option) do still work in the tree, up until the linker haults with undefined reference to `gfxShapedWord* gfxFont::GetShapedWord. This was a known issue that occured in GCC6+ and was fixed in m-c 1389436.
Per the bug report:
Applying the patch with minor modifications allows PGO to again build.The reason this happens is that there's a template method declared in gfxFont.h and defined in gfxFont.cpp, and used in both gfxFont.cpp and gfxTextRun.cpp. The split was done 3 years ago, and we've been lucky until now, that the instantiation of the template in gfxFont.cpp was not optimized out... until GCC 6 PGO, which, apparently, happily inlines the function in gfxFont.cpp, such that there's nothing left for gfxTextRun to find.
Off-topic:
After spending some time researching this, it appears PGO and other tricks were used to cheat on browser benchmark scores:
https://arstechnica.com/information-tec ... t-33151305
If this is a feature we would like to provide teir3 support for in the tree I can get an Issue/PR going. Obviously this is not needed for all applications, and is primarily a GNU/Linux optimization. I was just curious if there was any downside to patching our applications with PGO support.After spending some time researching this, it appears PGO and other tricks were used to cheat on browser benchmark scores:
https://arstechnica.com/information-tec ... t-33151305