30楼#
发布于:2011-09-26 19:25
很奇怪
你是使用 make -f client.mk profiledbuild 编译的么 请给出你编译时编译某个cpp的命令行 |
|
31楼#
发布于: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 ![]() |
|
32楼#
发布于:2011-09-26 19:25
只看到warning,没看到error
|
|
33楼#
发布于:2011-09-26 19:25
貼錯圖了...
图片:123.png ![]() |
|
34楼#
发布于: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 |
|
35楼#
发布于:2011-09-26 19:25
貌似我的編譯環境有問題
我的mozconfig沒有什麼太大的改變 這次一次編譯完後,手動進行pgo採集 已經可以在obj目錄下發現pgc, pgd文件.... 文件好多,看得我眼花撩亂 jemalloc的patch謝謝您 我等這次編譯結束再打上這個patch 我先採集pgo信息 謝謝您的幫助! |
|
36楼#
发布于:2011-09-26 19:25
再問個問題
請問您自己在編譯的時候pgc, pgd文件都產生在同個目錄嗎? 因為我的pgc, pgd都分散在各個文件夾,也就是在obj目錄內 我追蹤了obj內關於pgc, pgd文件,散落在個個文件夾中 請問這樣是否就不必再複製了? |
|
37楼#
发布于:2011-09-26 19:25
我懂了...
原來pgc要複製到跟同名的pgd目錄一起 |
|
38楼#
发布于:2011-09-26 19:25
……是放在一起啊
我在前面就是一直说的这个…… |
|
39楼#
发布于:2011-09-26 19:25
究竟編譯需要多少內存啊?
我的win7 x32 4Gb 兩次了,都是在同一個地方提示空間不夠... 图片:1234.jpg ![]() |
|
40楼#
发布于:2011-09-26 19:25
编译Firefox使用32位系统都是一种痛苦啊,win32只是2G+2G的空间,应用程序只能到最大2G(win7应该是3G+1G,你的4G有些小,我原来在win7 64bit+6G时成功过),链接FF时需要3G多内存(包含链接器和临时内存),反正我用32位windows从来就没编译成功过PGO优化的Firefox(VC2008以后,据说2005可以,不用PGO和GL可以编译成功)
现在我是使用win7 64bit + 8G内存编译的…… |
|
41楼#
发布于:2011-09-26 19:25
如果4Gb還夠用,那我呆會就把目前的OS改成64bit了
就怕內存不夠,改成64bit一樣悲劇... |
|
42楼#
发布于:2011-09-26 19:25
-GL我在別的帖子已經搜到了
我想再問64bit上邊一32bit binary 需要在mozconfig添加下列項目嗎? ac_add_options --target=i686-pc-mingw32 ac_add_options --host= |
|
43楼#
发布于:2011-09-26 19:25
Re: VC2010編譯Firefox 7.0 PGO卡在二次編譯
Lawliet:改成-j1後還真的編譯成功了 用PyMake,参见 https://developer.mozilla.org/en/pymake |
|
44楼#
发布于:2011-09-26 19:25
|
|