Environment: vs2010sp1, ICC 12.0.2.154, core i5-480M, 4 GB RAM
Results: The performance of Firefox 4 was improved from 10 to 20%.
Http://115.com/file/czdy8cwu
Steps:
1. Modify JS/src/ctypes/libffi/msvcc. Sh in the source code and replace CL with ICL.
2. After running Autoconf, modify the following configure script:
Configure
JS/src/configure
JS/src/ctypes/libffi/configure
Nsprpub/configure
Use a patch similar to the following:
*** configure-org Mon Mar 21 18:14:10 2011--- configure Mon Mar 21 18:54:02 2011****************** 4,9 ****--- 4,13 ---- msyshost=1 fi + export CC=icl+ export CXX=icl+ export AR='xilib -NOLOGO -OUT:"$@"'+ export LD=xilink # Read the user's .mozconfig script. We can't do this in # configure.in: autoconf puts the argument parsing code above anything****************** 3242,3248 **** #define _CRT_NONSTDC_NO_WARNINGS 1 EOF ! elif test "$_CC_MAJOR_VERSION" = "16"; then _CC_SUITE=10 CXXFLAGS="$CXXFLAGS -Zc:wchar_t-" cat >> confdefs.h <<\EOF--- 3246,3252 ---- #define _CRT_NONSTDC_NO_WARNINGS 1 EOF ! else _CC_SUITE=10 CXXFLAGS="$CXXFLAGS -Zc:wchar_t-" cat >> confdefs.h <<\EOF****************** 3253,3260 **** #define _CRT_NONSTDC_NO_WARNINGS 1 EOF - else- { echo "configure: error: This version ($CC_VERSION) of the MSVC compiler is unsupported. See https://developer.mozilla.org/en/Windows_Build_Prerequisites." 1>&2; exit 1; } fi _MOZ_RTTI_FLAGS_ON='-GR'--- 3257,3262 ----
3 first time configure and make:
../mozilla/configure --enable-application=browser --enable-official-branding --with-l10n-base=/lang --enable-ui-locale=zh-CN\ --enable-optimize="-fast -Qprof-gen -Qprof-dird:/temp/ffprof -W0" --disable-accessibility --disable-debug --disable-tests\ --disable-installer --disable-updater --disable-update-channel --disable-crashreporter
Make must be modified as follows (in the OBJ directory ):
Makefile: Comment out $ (RM) under the all rule)
Replace config/Autoconf. mk lib with xilib
Replace JS/src/config/Autoconf. mk lib with xilib
Replace nsprpub/config/Autoconf. mk Cl, link, and Lib with ICL, xilink, and xilib respectively.
In addition, the problem that xptcall is incompatible with ICC still exists. Therefore, you need to execute the following command after make to start Firefox with profiling:
cd xpcom/reflect/xptcall/src/md/win32make clean; make CC="cl.exe" CXX="cl.exe" MOZ_OPTIMIZE_FLAGS="-O2";\cd ../../..; make; cd ..; make; cd ..; make; cd ../toolkit/library; make
4. Run Firefox to generate profiling data
5 The second time configure and make
../mozilla/configure --enable-application=browser --enable-official-branding --with-l10n-base=/lang --enable-ui-locale=zh-CN\ --enable-optimize="-fast -Qprof-use -Qprof-dird:/temp/ffprof -W0" --disable-accessibility --disable-debug --disable-tests\ --disable-installer --disable-updater --disable-update-channel --disable-crashreporter
Make repeats the modification in step 3. When XUL. dll is started, stop make and execute the following command:
cd modules/libpr0n/decoders; rm nsGIFDecoder2.obj nsJPEGDecoder.obj nsPNGDecoder.obj;make MOZ_OPTIMIZE_FLAGS="-QxHOST -O2 -Qprec-div- -Qprof-use -Qprof-dird:/temp/ffprof -W0";
Then proceed with make. This is a bug in ICC 12.
6. Execute make package to obtain the Firefox compiled by PGO.