dongyuanxun
非常火狐
非常火狐
  • UID28632
  • 注册日期2009-04-19
  • 最后登录2013-02-14
  • 发帖数898
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
30楼#
发布于:2011-09-26 19:25
哦,这个是他makefile的bug
你到ff-pgo/memory/jemalloc下
输入lib -out:mozcrt.lib jemalloc.lib msvc_modified.lib
然后重新build即可,注意rebuild前备份jemalloc.pgd,否则他会被删除,造成最后编译失败

或者使用这个补丁
diff --git a/memory/jemalloc/Makefile.in b/memory/jemalloc/Makefile.in
--- a/memory/jemalloc/Makefile.in
+++ b/memory/jemalloc/Makefile.in
@@ -208,22 +208,23 @@ ifndef WIN32_OLD_STYLE_JEMALLOC
 #
 # The result?  A binary that uses jemalloc, doesn't crash, and leaks a tiny
 # amount of memory (32 words per DLL in the 2010 CRT) at shutdown.
 #
 ###############################################################################
 
 libs:: $(DIST)/lib/mozcrt.lib
 
-$(DIST)/lib/mozcrt.lib:: mozcrt.lib
-	$(INSTALL) $(IFLAGS2) mozcrt.lib $(DIST)/lib
+$(DIST)/lib/mozcrt.lib:: mozcrt_mod.lib
+	$(INSTALL) $(IFLAGS2) mozcrt?mod.lib $(DIST)/lib
+	mv $(DIST)/lib/mozcrt_mod.lib $(DIST)/lib/mozcrt.lib
 
 # And finally combine that with the jemalloc import library to get an import
 # library that has our malloc/free/etc and the CRT's everything else
-mozcrt.lib:: $(IMPORT_LIBRARY) msvc_modified.lib
+mozcrt_mod.lib:: $(IMPORT_LIBRARY) msvc_modified.lib
 	lib -OUT:$@ $^
 
 # Put the fixed object file back in
 msvc_modified.lib:: msvc_removed.lib crtdll_fixed.obj
 	lib -OUT:$@ $^
 
 # Fix the object file
 crtdll_fixed.obj:: crtdll.obj

重新rebuild,同样需要备份pgd
Lawliet
火狐狸
火狐狸
  • UID34414
  • 注册日期2010-11-03
  • 最后登录2017-04-02
  • 发帖数201
  • 经验13枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 社区居民
  • 忠实会员
31楼#
发布于:2011-09-26 19:25
貼錯圖了...

图片:123.png

dongyuanxun
非常火狐
非常火狐
  • UID28632
  • 注册日期2009-04-19
  • 最后登录2013-02-14
  • 发帖数898
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
32楼#
发布于:2011-09-26 19:25
只看到warning,没看到error
Lawliet
火狐狸
火狐狸
  • UID34414
  • 注册日期2010-11-03
  • 最后登录2017-04-02
  • 发帖数201
  • 经验13枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 社区居民
  • 忠实会员
33楼#
发布于:2011-09-26 19:25
是的,我是用make -f client.mk profiledbuild編譯的

我剛剛又編譯了一次,mozconfig只添加
ac_add_options --enable-jemalloc
但是編譯開始後五分鐘就會錯誤
我的mozconfig
. $topsrcdir/browser/config/mozconfig
#mk_add_options MOZ_PACKAGE_NSIS=1
ac_add_options --enable-application=browser
ac_add_options --disable-debug
ac_add_options --disable-tests
ac_add_options --disable-installer --disable-updater --disable-update-channel
ac_add_options --disable-accessibility
#
#
## optimize
ac_add_options --enable-profile-guided-optimization
#ac_add_options --enable-optimize="-O2 -GL -arch:SSE2"
ac_add_options --enable-optimize="-O2 -Ot -Ob2 -Oy -GF -GL -arch:SSE2"
#ac_add_options --enable-optimize="-O2 -Ot -Oy -Gy -GF -GL -GS- -GR- -arch:SSE2"
ac_add_options --enable-jemalloc
export MOZ_OPTIMIZE_LDFLAGS="-opt:ref,icf"
mk_add_options MOZ_OPTIMIZE_LDFLAGS="-opt:ref,icf"
#
#
#ac_add_options --enable-update-packaging
#ac_add_options --disable-vista-sdk-requirements
#ac_add_options --disable-static
#ac_add_options --with-l10n-base=/lang
#ac_add_options --enable-ui-locale=zh-TW
ac_add_options --enable-official-branding
#ac_add_options --enable-extensions=default 
#ac_add_options --enable-strip --enable-install-s  trip
#
#
## form tete009
#ac_add_options --disable-auto-deps
#ac_add_options --disable-jemalloc
ac_add_options --disable-crashreporter
#ac_add_options --disable-activex-scripting
#ac_add_options --disable-activex
#
#  auto PGO build
mk_add_options MOZ_MAKE_FLAGS="-j1"
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/ff-pgo
#mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) $(MOZ_OBJDIR)/_profile/pgo/profileserver.py'
#mk_add_options PROFILE_GEN_SCRIPT='cscript C:/Users/Lawliet/Desktop/c_Firefox/PgoMsg.vbs'
mk_add_options PROFILE_GEN_SCRIPT="sh C:/Users/Lawliet/Desktop/c_Firefox/run-firefox.sh"
mk_add_options PYTHONPATH='$(OBJDIR)/_profile/pgo'
#mk_add_options MOZ_CO_PROJECT=browser


图片:123.png

dongyuanxun
非常火狐
非常火狐
  • UID28632
  • 注册日期2009-04-19
  • 最后登录2013-02-14
  • 发帖数898
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
34楼#
发布于:2011-09-26 19:25
很奇怪
你是使用
make -f client.mk profiledbuild
编译的么

请给出你编译时编译某个cpp的命令行
Lawliet
火狐狸
火狐狸
  • UID34414
  • 注册日期2010-11-03
  • 最后登录2017-04-02
  • 发帖数201
  • 经验13枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 社区居民
  • 忠实会员
35楼#
发布于:2011-09-26 19:25
現在一次編譯結速後,進行採集過程
obj目錄內會隨著過程增加檔案
但依然找不到*.pgc *.pgd(貌似增加的檔案其實是temp)
我等等還會再編譯一次

謝謝指教
dongyuanxun
非常火狐
非常火狐
  • UID28632
  • 注册日期2009-04-19
  • 最后登录2013-02-14
  • 发帖数898
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
36楼#
发布于:2011-09-26 19:25
恩,是的
二次编译的好像不放到dist/bin里面
我忘记了
反正最后用make package打包即可……
Lawliet
火狐狸
火狐狸
  • UID34414
  • 注册日期2010-11-03
  • 最后登录2017-04-02
  • 发帖数201
  • 经验13枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 社区居民
  • 忠实会员
37楼#
发布于:2011-09-26 19:25
我現在的問題是一次編譯跟二次編譯產生的binary
它們的md5是一樣的,既沒有採集到任何pgo信息

採集pgo信息,應該就是在一次編譯結束以後
開啟/obj/dist下的firefox,並進入v8, sunspider等相關網站吧?
dongyuanxun
非常火狐
非常火狐
  • UID28632
  • 注册日期2009-04-19
  • 最后登录2013-02-14
  • 发帖数898
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
38楼#
发布于:2011-09-26 19:25
Lawliet:我剛找到另一個firefox.exe
在C:\mozilla-release\ff-pgo\browser\app
無法直接執行,看起來缺少很多lib
是否應該從vs2010那裡複製lib?
又應該複製哪個檔呢?
回到原帖

这个是编译目录的exe,不要从这里运行

我是从dist/bin运行的,采集到pgc信息后,再把pgc文件复制到相关目录,
比如firefox*.pgc就复制到obj/browser/app目录,因为该目录有firefox.pgd
Lawliet
火狐狸
火狐狸
  • UID34414
  • 注册日期2010-11-03
  • 最后登录2017-04-02
  • 发帖数201
  • 经验13枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 社区居民
  • 忠实会员
39楼#
发布于:2011-09-26 19:25
我剛找到另一個firefox.exe
在C:\mozilla-release\ff-pgo\browser\app
無法直接執行,看起來缺少很多lib
是否應該從vs2010那裡複製lib?
又應該複製哪個檔呢?
Lawliet
火狐狸
火狐狸
  • UID34414
  • 注册日期2010-11-03
  • 最后登录2017-04-02
  • 发帖数201
  • 经验13枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 社区居民
  • 忠实会员
40楼#
发布于:2011-09-26 19:25
……
不是在源碼目錄裡找哇,在你obj目錄裡找……

我的obj是在/ff-pgo,這應該沒錯啊
我剛又跑了v8 benchmark,把窗口關掉又打開
還是沒有發現生成



[quote="dongyuanxun"]採集完複製到目錄後
再按Yes[/quote]
所有的pgc與pgd是否都是出現在同一個資料夾
但是放的位置卻不太一樣?
dongyuanxun
非常火狐
非常火狐
  • UID28632
  • 注册日期2009-04-19
  • 最后登录2013-02-14
  • 发帖数898
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
41楼#
发布于:2011-09-26 19:25
采集完复制到目录后
再按Yes
dongyuanxun
非常火狐
非常火狐
  • UID28632
  • 注册日期2009-04-19
  • 最后登录2013-02-14
  • 发帖数898
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
42楼#
发布于:2011-09-26 19:25
……
不是在源码目录里找哇,在你obj目录里找……
Lawliet
火狐狸
火狐狸
  • UID34414
  • 注册日期2010-11-03
  • 最后登录2017-04-02
  • 发帖数201
  • 经验13枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 社区居民
  • 忠实会员
43楼#
发布于:2011-09-26 19:25
我現在一次編譯已經結速
目前編譯暫停可以進行手動採集
但我在/dist/bin, /dist/firefox開啟各跑了一次sunspider 9.1
追蹤整個mozilla-release資料夾,沒有找到*.pgc *.pgd的文件
整個文件夾的大小與文件數也沒有變化

這是我的.mozconfig
. $topsrcdir/browser/config/mozconfig
#mk_add_options MOZ_PACKAGE_NSIS=1
ac_add_options --enable-application=browser
#ac_add_options --enable-profile-guided-optimization
ac_add_options --disable-debug
ac_add_options --disable-tests
ac_add_options --disable-installer --disable-updater --disable-update-channel
ac_add_options --disable-accessibility
#ac_add_options --enable-jemalloc
#
## optimize
#ac_add_options --enable-optimize="-O2 -GL -arch:SSE2 -GS"
#ac_add_options --enable-optimize="-O2 -GL -arch:SSE2"
ac_add_options --enable-optimize="-O2 -Ot -Ob2 -Oy -GF -GL -arch:SSE2"
#ac_add_options --enable-optimize="-O2 -Ot -Ob2 -Oy -GF -arch:SSE2"
#export MOZ_OPTIMIZE_LDFLAGS="-opt:ref,icf"
#mk_add_options MOZ_OPTIMIZE_LDFLAGS="-opt:ref,icf"
#
#
#ac_add_options --enable-update-packaging
#ac_add_options --disable-vista-sdk-requirements
#ac_add_options --disable-static
#ac_add_options --with-l10n-base=/lang
#ac_add_options --enable-ui-locale=zh-TW
#ac_add_options --enable-official-branding
#
## from tete009
#ac_add_options --disable-auto-deps
#ac_add_options --disable-jemalloc
ac_add_options --disable-crashreporter
#ac_add_options --disable-activex-scripting
#ac_add_options --disable-activex
#
#  auto PGO build
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/ff-pgo
#mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) $(MOZ_OBJDIR)/_profile/pgo/profileserver.py'
mk_add_options PROFILE_GEN_SCRIPT='cscript C:/Users/Lawliet/Desktop/c_Firefox/PgoMsg.vbs'
#mk_add_options PYTHONPATH='$(OBJDIR)/_profile/pgo'
#mk_add_options MOZ_CO_PROJECT=browser
mk_add_options MOZ_MAKE_FLAGS="-j1"


那個vbs中斷窗口的意思是採集完了,才按"Yes"
還是要先按"Yes"再採集?
如果採集過程順利,編譯窗口是否會刷新?
就像跑老版本sunspider那樣?


另外我在link的時候出現這樣的提示
對PGO編譯有影響嗎?
LINK : warning LINK4256: Profile Guided Optimization is no available of the product: ignoring related options
dongyuanxun
非常火狐
非常火狐
  • UID28632
  • 注册日期2009-04-19
  • 最后登录2013-02-14
  • 发帖数898
  • 经验10枚
  • 威望0点
  • 贡献值0点
  • 好评度0点
44楼#
发布于:2011-09-26 19:25
终于链接完成了
我做个简单的测试后上传
游客

返回顶部