dongyuanxun 寫:
我FF6跑过这两个测试,没有当过
因为这两个测试时间太长,所以我FF7就没有引入过
不知道你打了额外的补丁没,我记得要打个SSE2强制到SSE的patch,也是为了避免PGO的crash
就是这个bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=595653ff6 = seamonkey 2.3.x
ff7 = seamonkey 2.4.x
ff8 = seamonkey 2.5.x
您舉 ff6 只是得到我 seamonkey 2.3.x 可以正常的結論而已
ff7 或 ff8 beta 您可以試試,pgi 跑其中一個站就可以,不用全部調教。
我因為這個問題所以 seamonkey 2.4 一直在 pgo 後,啟動當掉 (mozjs.dll fault)
下面是我用的 seamonkey 2.4.x 補丁:
代碼:
diff -urN comm-release/mozilla/security/coreconf/WIN32.mk comm-release-sm/mozilla/security/coreconf/WIN32.mk
--- comm-release/mozilla/security/coreconf/WIN32.mk 2010-05-05 03:18:33 +0800
+++ comm-release-sm/mozilla/security/coreconf/WIN32.mk 2010-06-23 23:54:06 +0800
@@ -101,11 +101,15 @@
_GEN_IMPORT_LIB=-Wl,--out-implib,$(IMPORT_LIBRARY)
DLLFLAGS += -mno-cygwin -o $@ -shared -Wl,--export-all-symbols $(if $(IMPORT_LIBRARY),$(_GEN_IMPORT_LIB))
ifdef BUILD_OPT
+ ifeq ($(MOZ_OPTIMIZE),2)
+ OPTIMIZER += $(MOZ_OPTIMIZE_FLAGS)
+ else
ifeq (11,$(ALLOW_OPT_CODE_SIZE)$(OPT_CODE_SIZE))
OPTIMIZER += -Os
else
OPTIMIZER += -O2
endif
+ endif
DEFINES += -UDEBUG -U_DEBUG -DNDEBUG
else
OPTIMIZER += -g
@@ -125,11 +129,15 @@
endif
ifdef BUILD_OPT
OS_CFLAGS += -MD
+ ifeq ($(MOZ_OPTIMIZE),2)
+ OPTIMIZER += $(MOZ_OPTIMIZE_FLAGS)
+ else
ifeq (11,$(ALLOW_OPT_CODE_SIZE)$(OPT_CODE_SIZE))
OPTIMIZER += -O1
else
OPTIMIZER += -O2
endif
+ endif
DEFINES += -UDEBUG -U_DEBUG -DNDEBUG
DLLFLAGS += -OUT:"$@"
ifdef MOZ_DEBUG_SYMBOLS
diff -urN comm-release/mozilla/security/coreconf/WINCE.mk comm-release-sm/mozilla/security/coreconf/WINCE.mk
--- comm-release/mozilla/security/coreconf/WINCE.mk 2010-05-05 03:18:33 +0800
+++ comm-release-sm/mozilla/security/coreconf/WINCE.mk 2010-06-23 23:54:06 +0800
@@ -87,7 +87,11 @@
ifdef BUILD_OPT
# OS_CFLAGS += -MD
+ ifeq ($(MOZ_OPTIMIZE),2)
+ OPTIMIZER += $(MOZ_OPTIMIZE_FLAGS)
+ else
OPTIMIZER += -O2
+ endif
DEFINES += -UDEBUG -U_DEBUG -DNDEBUG
DLLFLAGS += -OUT:"$@"
else
diff -urN comm-release/mozilla/security/manager/Makefile.in comm-release-sm/mozilla/security/manager/Makefile.in
--- comm-release/mozilla/security/manager/Makefile.in 2010-05-05 03:18:33 +0800
+++ comm-release-sm/mozilla/security/manager/Makefile.in 2010-06-23 23:54:07 +0800
@@ -43,6 +43,8 @@
include $(DEPTH)/config/autoconf.mk
+export MOZ_OPTIMIZE MOZ_OPTIMIZE_FLAGS MOZ_OPTIMIZE_LDFLAGS MOZ_OPTIMIZE_SIZE_TWEAK
+
MODULE = psm
ifndef MOZ_NATIVE_NSS
diff -urN comm-release/mozilla/js/src/ctypes/libffi/ltmain.sh comm-release-sm/mozilla/js/src/ctypes/libffi/ltmain.sh
--- comm-release/mozilla/js/src/ctypes/libffi/ltmain.sh
+++ comm-release-sm/mozilla/js/src/ctypes/libffi/ltmain.sh
@@ -4469,16 +4469,26 @@ func_mode_link ()
no/*-*-irix* | /*-*-irix*)
func_append compile_command " $arg"
func_append finalize_command " $arg"
;;
esac
continue
;;
+ # Avoid matching MSVC linker option.
+ -LARGEADDRESSAWARE)
+ continue
+ ;;
+
+ # Avoid matching MSVC linker option.
+ -LTCG)
+ continue
+ ;;
+
-L*)
func_stripname '-L' '' "$arg"
dir=$func_stripname_result
if test -z "$dir"; then
if test "$#" -gt 0; then
func_fatal_error "require no space between \`-L' and \`$1'"
else
func_fatal_error "need path for \`-L' option"
diff -urN comm-release/config/rules.mk comm-release-sm/config/rules.mk
--- comm-release/config/rules.mk 2010-05-05 03:14:54 +0800
+++ comm-release-sm/config/rules.mk 2010-06-23 23:54:01 +0800
@@ -963,7 +963,7 @@
$(PROGRAM:$(BIN_SUFFIX)=) $(DIST)/$(MOZ_APP_NAME)
endif
ifdef SHARED_LIBRARY
- $(PYTHON) $(topsrcdir)/build/win32/pgomerge.py \
+ $(PYTHON) $(MOZILLA_SRCDIR)/build/win32/pgomerge.py \
$(SHARED_LIBRARY_NAME) $(DIST)/$(MOZ_APP_NAME)
endif
endif # SHARED_LIBRARY || PROGRAM
diff -urN comm-release/mozilla/js/src/Makefile.in comm-release-sm/mozilla/js/src/Makefile.in
--- comm-release/mozilla/js/src/Makefile.in
+++ comm-release-sm/mozilla/js/src/Makefile.in
@@ -102,19 +102,16 @@ else # not GNU_CXX
ifeq ($(OS_ARCH),SunOS)
MODULE_OPTIMIZE_FLAGS = -xO4
endif
ifeq ($(OS_ARCH),WINNT)
MODULE_OPTIMIZE_FLAGS = -O2
endif
endif
-ifeq ($(OS_ARCH),WINNT)
-NO_PROFILE_GUIDED_OPTIMIZE = 1
-endif
# JavaScript must be built shared, even for static builds, as it is used by
# other modules which are always built shared. Failure to do so results in
# the js code getting copied into xpinstall and jsd as well as mozilla-bin,
# and then the static data cells used for locking no longer work.
#
# In fact, we now build both a static and a shared library, as the
# JS shell would like to link to the static library.
@@ -1074,4 +1074,11 @@
#
# END kludges for the Nitro assembler
###############################################
+# Optimizer bug with MSVC PGO (Bug 595653)
+ifeq (WINNT_1,$(OS_ARCH)_$(MOZ_PROFILE_GENERATE)$(MOZ_PROFILE_USE))
+RegexCompiler.$(OBJ_SUFFIX): RegexCompiler.cpp $(GLOBAL_DEPS)
+ $(REPORT_BUILD)
+ @$(MAKE_DEPS_AUTO_CXX)
+ $(ELOG) $(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS:arch:SSE2=arch:SSE) $(_VPATH_SRCS)
+endif
diff --git a/configure.in b/configure.in
--- a/configure.in
+++ b/configure.in
@@ -5915,10 +5915,16 @@
*-msvc*|*-mks*|*-mingw*)
AC_DEFINE(MOZ_MEMORY_WINDOWS)
dnl This is sort of awful. Will revisit if we add support for more versions
- if test "$CC_VERSION" != "14.00.50727.762" -a "$CC_VERSION" != "15.00.30729.01"; then
- AC_MSG_ERROR([Building jemalloc requires exactly Visual C++ 2005 SP1 or 2008 SP1 currently.])
+ if test "$CC_VERSION" == "14.00.50727.762" -o "$CC_VERSION" == "15.00.30729.01"; then
+ WIN32_OLD_STYLE_JEMALLOC=1
+ AC_DEFINE(WIN32_OLD_STYLE_JEMALLOC)
+ elif test "$CC_VERSION" == "16.00.30319.01" -o "$CC_VERSION" == "16.00.40219.01"; then
+ WIN32_NEW_STYLE_JEMALLOC=1
+ AC_DEFINE(WIN32_NEW_STYLE_JEMALLOC)
+ else
+ AC_MSG_ERROR([Building jemalloc requires exactly Visual C++ 2005 SP1 or 2008 SP1 or 2010 currently.])
fi
- if test -z "$WIN32_CRT_SRC_DIR"; then
+ if test -z "$WIN32_CRT_SRC_DIR" -a -n "$WIN32_OLD_STYLE_JEMALLOC"; then
if test -z "$VCINSTALLDIR" -o ! -d "$VCINSTALLDIR"; then
AC_MSG_ERROR([When building jemalloc, set WIN32_CRT_SRC_DIR to the path to the Visual C++ CRT source (usually VCINSTALLDIR\crt\src, but VCINSTALLDIR is not set, so I can't autodetect it for you).])
else
@@ -5939,13 +5945,22 @@
AC_SUBST(MOZ_CRT_CPU_ARCH)
- if test ! -d "$WIN32_CRT_SRC_DIR"; then
- AC_MSG_ERROR([Invalid Win32 CRT source directory: ${WIN32_CRT_SRC_DIR}])
+ if test -n "$WIN32_OLD_STYLE_JEMALLOC"; then
+ if test ! -d "$WIN32_CRT_SRC_DIR"; then
+ AC_MSG_ERROR([Invalid Win32 CRT source directory: ${WIN32_CRT_SRC_DIR}])
+ fi
+ WIN32_CRT_SRC_DIR=`cd "$WIN32_CRT_SRC_DIR" && pwd -W`
+ _objdir_win=`pwd -W`
+ WIN32_CUSTOM_CRT_DIR="$_objdir_win/memory/jemalloc/crtsrc/build/$MOZ_CRT_CPU_ARCH"
+ MOZ_MEMORY_LDFLAGS="-MANIFEST:NO -LIBPATH:\"$WIN32_CUSTOM_CRT_DIR\" -NODEFAULTLIB:msvcrt -NODEFAULTLIB:msvcrtd -NODEFAULTLIB:msvcprt -NODEFAULTLIB:msvcprtd -DEFAULTLIB:mozcrt19 -DEFAULTLIB:mozcpp19"
+ else
+ MOZ_MEMORY_LDFLAGS='-MANIFEST:NO -LIBPATH:$(DIST)/lib -NODEFAULTLIB:msvcrt -NODEFAULTLIB:msvcrtd -NODEFAULTLIB:msvcprt -NODEFAULTLIB:msvcprtd -DEFAULTLIB:mozcrt'
+ if test -z "$MOZ_DEBUG"; then
+ WIN32_CRT_LIBS="msvcrt.lib msvcprt.lib"
+ else
+ WIN32_CRT_LIBS="msvcrtd.lib msvcprtd.lib"
+ fi
fi
- WIN32_CRT_SRC_DIR=`cd "$WIN32_CRT_SRC_DIR" && pwd -W`
- _objdir_win=`pwd -W`
- WIN32_CUSTOM_CRT_DIR="$_objdir_win/mozilla/memory/jemalloc/crtsrc/build/$MOZ_CRT_CPU_ARCH"
- MOZ_MEMORY_LDFLAGS="-MANIFEST:NO -LIBPATH:\"$WIN32_CUSTOM_CRT_DIR\" -NODEFAULTLIB:msvcrt -NODEFAULTLIB:msvcrtd -NODEFAULTLIB:msvcprt -NODEFAULTLIB:msvcprtd -DEFAULTLIB:mozcrt19 -DEFAULTLIB:mozcpp19"
dnl Also pass this to NSPR/NSS
DLLFLAGS="$DLLFLAGS $MOZ_MEMORY_LDFLAGS"
export DLLFLAGS
@@ -5970,6 +5985,8 @@
fi
AC_SUBST(MOZ_MEMORY)
AC_SUBST(MOZ_MEMORY_LDFLAGS)
+AC_SUBST(WIN32_OLD_STYLE_JEMALLOC)
+AC_SUBST(WIN32_CRT_LIBS)
AC_SUBST(WIN32_CRT_SRC_DIR)
dnl Need to set this for make because NSS doesn't have configure
AC_SUBST(DLLFLAGS)
diff -urN a/mozilla/memory/jemalloc/Makefile.in b/mozilla/memory/jemalloc/Makefile.in
--- a/mozilla/memory/jemalloc/Makefile.in 2011-09-16 21:52:49 +0800
+++ b/mozilla/memory/jemalloc/Makefile.in 2011-09-17 13:50:44 +0800
@@ -213,12 +213,13 @@
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
_________________
想讓 Internet Explorer 當掉嗎?
「方法一」 - 被 google 檔掉的樣子,開不起來
「方法二」