Ubuntuã®ããã±ã¼ã¸ã¨Mozillaçããããã®Firefoxã®ãã«ãæã®ãªãã·ã§ã³ã¨å¿«é©ããªã©ã«ã¤ãã¦(ãã¼ã¸ã§ã³27æç¹)
Ubuntuã®ããã±ã¼ã¸ã¨Mozillaçã®ãã«ãæã®ãªãã·ã§ã³ã®æ¯è¼
Ubuntuã®ããã±ã¼ã¸ã®ãã¼ã¸ã§ã³27ã®ãã«ãæã®ãªãã·ã§ã³
Ubuntuã®ãã£ã¹ããªã®ããã±ã¼ã¸ã¨ãã¦æä¾ããã¦ããFirefoxã®ãã«ãæã®æé©åãªãã·ã§ã³ããµã¨æ°ã«ãªã£ãã®ã§ãabout:buildconfigã§èª¿ã¹ã¦ã¿ãã
é ç® | å¤ |
---|---|
GCCã®ãã¼ã¸ã§ã³ | 4.8.1-10ubuntu8 |
gccã®ãªãã·ã§ã³ | -Wall -Wpointer-arith -Wdeclaration-after-statement -Werror=return-type -Wtype-limits -Wempty-body -Wsign-compare -Wno-unused -Wcast-align -std=gnu99 -fgnu89-inline -fno-strict-aliasing -fno-math-errno -pthread -pipe -DNDEBUG -DTRIMMED -g -Os -freorder-blocks -fomit-frame-pointer |
g++ã®ãªãã·ã§ã³ | -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body -Wsign-compare -Wno-invalid-offsetof -Wcast-align -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe -DNDEBUG -DTRIMMED -g -Os -freorder-blocks -fomit-frame-pointer |
configureã¹ã¯ãªããã®ãªãã·ã§ã³ | --host=x86_64-linux-gnu --prefix=/usr --libexecdir=/usr/lib/firefox --with-l10n-base=/build/buildd/firefox-27.0+build1/./l10n --srcdir=/build/buildd/firefox-27.0+build1/. --disable-install-strip --disable-updater --enable-application=browser --enable-startup-notification --with-distribution-id=com.ubuntu --enable-optimize --enable-tests --enable-crashreporter --with-branding=browser/branding/official --disable-gnomevfs --enable-gio --enable-update-channel=release --disable-debug --disable-elf-hack |
Mozillaçã®ãã¼ã¸ã§ã³27ã®ãã«ãæã®ãªãã·ã§ã³
ftp.mozilla.org/pub/mozilla.org/mozilla.org/firefox/releases/27.0/linux-x86_64/ja/
ã«ãããã¼ã¸ã§ã³27ã®x86_64çãã¤ããªã«ã¤ãã¦ããã«ãæã®ãªãã·ã§ã³ãåæ§ã«èª¿ã¹ã¦ã¿ãã
é ç® | å¤ |
---|---|
GCCã®ãã¼ã¸ã§ã³ | 4.7.3 |
gccã®ãªãã·ã§ã³ | -Wall -Wpointer-arith -Wdeclaration-after-statement -Werror=return-type -Wtype-limits -Wempty-body -Wsign-compare -Wno-unused -Wcast-align -Wno-error=uninitialized -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -std=gnu99 -fgnu89-inline -fno-strict-aliasing -ffunction-sections -fdata-sections -fno-math-errno -pthread -pipe -DNDEBUG -DTRIMMED -g -fprofile-use -fprofile-correction -Wcoverage-mismatch -O3 -fomit-frame-pointer |
g++ã®ãªãã·ã§ã³ | -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body -Wsign-compare -Wno-invalid-offsetof -Wcast-align -Wno-error=uninitialized -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe -DNDEBUG -DTRIMMED -g -fprofile-use -fprofile-correction -Wcoverage-mismatch -O3 -fomit-frame-pointer |
configureã¹ã¯ãªããã®ãªãã·ã§ã³ | --enable-update-channel=release --enable-update-packaging --with-google-api-keyfile=/builds/gapi.data --enable-crashreporter --enable-release --enable-elf-hack --enable-stdcxx-compat --enable-warnings-as-errors --enable-official-branding |
æé©åãªãã·ã§ã³ã®æ¯è¼
-Osã¨-O3
GCCã®-O[æ°åãs]ã®æé©åãªãã·ã§ã³ã®å ãUbuntuã®ããã±ã¼ã¸ã§ã¯-Os(æ¨æºçãªæé©åãªãã·ã§ã³-O2ã®æå®ãããæ©æ¢°èªãã¡ã¤ã«ã®ãµã¤ãºãå°ãããªãããã«å¹¾ã¤ãã®ãªãã·ã§ã³ãé¤ãããã®)ãç¨ãããã¦ããããMozillaçã§ã¯ããæé©åã¬ãã«ã®é«ã-O3ãªãã·ã§ã³ãç¨ãããã¦ããã
PGO
Mozillaçã§ã¯Profile-guided optimization (PGO)ã¨å¼ã°ããæé©åãæå¹ã«ãªã£ã¦ããããUbuntuã®ããã±ã¼ã¸ã§ã¯æå¹ã«ãªã£ã¦ããªã(ãªãã·ã§ã³æå®ãªã©ã«ã¤ãã¦ã¯å¾è¿°)ã
ä½æå·®
Mozillaçã¯ãã¾ã使ã£ããã¨ããªãã£ãããä»å試ãã«åããã¦ã¿ãã¨ãããä¸è¨ã®2ã¤ã®éãããã£ããã¨ããããåä½ã軽ããªã£ã¦ããã®ãå®æã§ãããUbuntuã®ããã±ã¼ã¸ãä»å¾ããã2ã¤ã«ã¤ãã¦Mozillaçã¨åãããã«ãã«ããããããã«ãªãã¾ã§ã¯Mozillaçã使ããã¨ã«ãªãããã
é¢é£:PGOã¨ããã«é¢ä¿ããGCCã®ãªãã·ã§ã³æå®ã«ã¤ãã¦
PGOã¯ãå®éã«ããã°ã©ã ãåããããã®ã¨ãã®åããæ¹ã«ããã°ã©ã ãæé©åãããã¨ããææ³ã§ãæéã¨æéããããä¸æ¹ã§åä½é度ã®åä¸ãå³ããã
1åç®ã®ãã«ã
ãåã½ã¼ã¹ãã¡ã¤ã«ã®ã³ã³ãã¤ã«æãã¨ããªã³ã¯æãã®ä¸¡æ¹ã«-fprofile-generateãªãã·ã§ã³ãä»ãããã¨ã«ãããããã°ã©ã å®è¡æã«ãããã¡ã¤ã«ã®ãã¡ã¤ã«ç¾¤ãæ¸ãåºãããå¤æ´ãå ãã(ããããã¤ã³ã¹ãã¥ã«ã¡ã³ããã¨å¼ã¶)ã
-fprofile-generate=[åºåå
]æå®ã§ãã¡ã¤ã«ã®åºåå
ãã£ã¬ã¯ããªãæå®ãããã¨ãã§ãã(åºåå
æå®ãªãã®å ´åã¯åã½ã¼ã¹ã®ãã¡ã¤ã«ã¨åããã£ã¬ã¯ããªã«ãªã)ã
MozillaçFirefoxã®about:buildconfigã§ã¯1åç®ã®ãã«ãæã«ã®ã¿ä»ã-fprofile-generateãªãã·ã§ã³ã¯ç¢ºèªã§ããªãããããã¯2åç®ã®ãã«ãæã«ä»ãå¾è¿°ã®ãªãã·ã§ã³ã®ã¿ãabout:buildconfigã«åºãããã
å®è¡
å®è¡ãã¡ã¤ã«ãã§ããããæé©åããããåããæ¹ã§ãããå®è¡ãããããã«ãããèªåçã«ãããã¡ã¤ã«ã®ãã¡ã¤ã«ç¾¤(*.gcda)ãæ¸ãåºããããæé©åããããåããæ¹ãè¤æ°ããã°ãã®åã ãåããã
Firefoxãå¾è¿°ã®æé ã§ãã«ãããå ´åã¯build/pgo/profileserver.pyãèªåçã«å®è¡ããããåããæ¹ãã«ã¹ã¿ãã¤ãºããã«ã¯ããã®ã¹ã¯ãªãããããããå¼ã³åºãè¨è¿°ãå«ãtesting/testsuite-targets.mkã®ãpgo-profile-runãã¿ã¼ã²ãããç·¨éããã
2åç®ã®ãã«ã
ãåã½ã¼ã¹ãã¡ã¤ã«ã®ã³ã³ãã¤ã«æãã¨ããªã³ã¯æãã®ä¸¡æ¹ã«-fprofile-useãªãã·ã§ã³ãä»ããã
-fprofile-use=[åºåå
]æå®ã§.gcdaãã¡ã¤ã«ã®æ¢ç´¢ãã£ã¬ã¯ããªãæå®ãããã¨ãã§ããã
ãã«ãã¹ã¬ããã®ããã°ã©ã ã§ã¯ãããã¡ã¤ã«ã®ãã¡ã¤ã«ãæ£ããæ¸ãåºãããªããã¨ãããããããä¿®æ£ãã¦ç¨ããããã«-fprofile-correctionãªãã·ã§ã³ãä»ããã
ãããã¡ã¤ã«ã®ãã¡ã¤ã«ãçæãããå¾ã§ã½ã¼ã¹ãä¿®æ£ãããã¨ããªã©ããããã¡ã¤ã«ã®ãã¡ã¤ã«ãã½ã¼ã¹ãã¡ã¤ã«ã«æ£ãã対å¿ãã¦ããªãå ´åã«ã¯ã¨ã©ã¼ãçºçãã-Wcoverage-mismatchãªãã·ã§ã³ãä»ããã¨ã¨ã©ã¼ã§æ¢ã¾ã代ããã«è¦åãåºãããã«ãªãããããã§ãã«ããéã£ã¦ãæé©åã®åº¦åãã¯è½ã¡ãã
MozillaçFirefoxã®about:buildconfigã§ã¯-fprofile-useã¨-fprofile-correctionã®ãªãã·ã§ã³ã確èªã§ããPGOã«ããæé©åãããããã®ã§ããã¨åããã
Firefoxã®ãã«ãæã®æé
- ã½ã¼ã¹ã®æä¸ä½ãã£ã¬ã¯ããªã«ãac_add_options --enable-application=browserããå«ã¿ãac_add_options --disable-testsããå«ã¾ãªã.mozconfigãä½æ
- åãã£ã¬ã¯ããªã§ãmake -f client.mk profiledbuildããå®è¡
以ä¸ã¯ä½è«ã
以å試ãã¦ãã«ãã¨ã©ã¼ã«ãªã£ããã¨ããã£ãã®ã§ãã®æ©ä¼ã«è©¦ãã¦ã¿ãã®ã ããæ®å¿µãªãã1åç®ã®ãã«ãã®libxul.soã®ãªã³ã¯ã§ã¡ã¢ãªãä¸è¶³ããã¹ã¯ããã®èªã¿æ¸ãããããã ãã«ãªã£ã¦å¦çãé²ã¾ãªããªã£ãããã«æ念ãããã½ã¼ã¹ã®è¦æ¨¡ãååã½ã¼ã¹ãããã«ãããæ°å¹´åã¨æ¯ã¹é常ã«å¤§ãããªã£ã¦ãããå½æ(Athlon64ã使ç¨)ããCPUãé«éã«ãªã£ãã«ãé¢ããããã«ãæéã¯ãããé·ããªã£ã¦ãã¦ãããã«å ãã¦æ°ãã¼ã¸ã§ã³ãåºããã¼ã¹ãä¸ãã£ã¦ãããã¨ããããå人çã«ã¯Firefoxãã½ã¼ã¹ãããã«ããããã¨ã¯ä»å¾ããªãæåã
é¢é£URL: