Closed
Bug 521193
Opened 16 years ago
Closed 15 years ago
jemalloc support for Windows x64 build (VC 2005 / 2008)
Categories
(Core :: Memory Allocator, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9.3a5
People
(Reporter: m_kato, Assigned: m_kato)
References
Details
Attachments
(1 file, 2 obsolete files)
12.97 KB,
patch
|
ted
:
review+
|
Details | Diff | Splinter Review |
need more patches to crt source code
Assignee | ||
Comment 1•16 years ago
|
||
VC8 patch is old. I have to update it for about:memory
Assignee | ||
Comment 2•15 years ago
|
||
Attachment #405374 -
Attachment is obsolete: true
Comment 3•15 years ago
|
||
Comment on attachment 428423 [details] [diff] [review]
patch v1
Some drive-by comments here.
>diff --git a/configure.in b/configure.in
>--- a/configure.in
>+++ b/configure.in
>@@ -6749,6 +6749,9 @@ if test "$MOZ_MEMORY"; then
> i*86)
> _WIN32_CRT_CPU=intel
> ;;
>+ x86_64)
>+ _WIN32_CRT_CPU=amd64
>+ ;;
You should probably just put this into MOZ_CRT_CPU_ARCH and AC_SUBST it into autoconf.mk, so you can avoid doing the same check in the Makefile below.
> *)
> AC_MSG_ERROR([--enable-jemalloc not supported on ${target}])
> ;;
>diff --git a/memory/jemalloc/Makefile.in b/memory/jemalloc/Makefile.in
>--- a/memory/jemalloc/Makefile.in
>+++ b/memory/jemalloc/Makefile.in
>@@ -52,13 +52,18 @@ VISIBILITY_FLAGS=
> ifeq (WINNT,$(OS_TARGET))
> # Building the CRT from source
> CRT_OBJ_DIR = $(CURDIR)/crtsrc
>+ifeq ($(TARGET_CPU), x86_64)
>+MOZ_CRT_CPU_ARCH=amd64
>+else
>+MOZ_CRT_CPU_ARCH=intel
>+endif
> MOZ_CRT_DLL_NAME = mozcrt19
> MOZ_CRTCPP_DLL_NAME = mozcpp19
> MOZ_CRT_STATIC_LIBS = libcmt libcpmt
>-MOZ_CRT_DLL = $(CRT_OBJ_DIR)/build/intel/$(MOZ_CRT_DLL_NAME).dll
>-MOZ_CRT_IMPORT_LIB = $(CRT_OBJ_DIR)/build/intel/$(MOZ_CRT_DLL_NAME).lib
>-MOZ_CRTCPP_DLL = $(CRT_OBJ_DIR)/build/intel/$(MOZ_CRTCPP_DLL_NAME).dll
>-MOZ_CRTCPP_IMPORT_LIB = $(CRT_OBJ_DIR)/build/intel/$(MOZ_CRTCPP_DLL_NAME).lib
>+MOZ_CRT_DLL = $(CRT_OBJ_DIR)/build/$(MOZ_CRT_CPU_ARCH)/$(MOZ_CRT_DLL_NAME).dll
>+MOZ_CRT_IMPORT_LIB = $(CRT_OBJ_DIR)/build/$(MOZ_CRT_CPU_ARCH)/$(MOZ_CRT_DLL_NAME).lib
>+MOZ_CRTCPP_DLL = $(CRT_OBJ_DIR)/build/$(MOZ_CRT_CPU_ARCH)/$(MOZ_CRTCPP_DLL_NAME).dll
>+MOZ_CRTCPP_IMPORT_LIB = $(CRT_OBJ_DIR)/build/$(MOZ_CRT_CPU_ARCH)/$(MOZ_CRTCPP_DLL_NAME).lib
>
> # copy the CRT DLLs to dist/bin,
> # copy the import libs to dist/lib
>@@ -69,15 +74,17 @@ libs:: $(MOZ_CRT_DLL) $(MOZ_CRT_IMPORT_L
> $(MOZ_CRT_IMPORT_LIB): $(MOZ_CRT_DLL)
>
> define EXTRACT_CMD
>-cd $(CRT_OBJ_DIR)/intel/$(i)_lib && lib "-extract:..\\build\\intel\\$(i)_obj\\unhandld.obj" eh.lib
>+cd $(CRT_OBJ_DIR)/$(MOZ_CRT_CPU_ARCH)/$(i)_lib && lib "-extract:..\\build\\$(MOZ_CRT_CPU_ARCH)\\$(i)_obj\\unhandld.obj" eh.lib
Do the amd64 libs have the same problem as intel here?
> # patch if necessary
> ifeq ($(CC_VERSION), 14.00.50727.762)
> CRTDIFF=crtvc8sp1.diff
>+CRTDIFF_AMD64=crtvc8sp1-amd64.diff
> else
> CRTDIFF=crtvc9sp1.diff
>+CRTDIFF_AMD64=crtvc9sp1-amd64.diff
> endif
You could just rename the existing patches to crtvc8sp1-intel.diff and name your new patches crtvc8sp1-amd64.diff, and then make this CRTDIFF=crtvc8sp1-$(MOZ_CRT_CPU_ARCH).diff.
Assignee | ||
Comment 4•15 years ago
|
||
(In reply to comment #3)
> Do the amd64 libs have the same problem as intel here?
Yes. But we cannot use same workaround that linking unhandld.obj. So the patch removes the reference __CxxSetUnhandledExceptionFilter.
Assignee | ||
Comment 5•15 years ago
|
||
Attachment #428423 -
Attachment is obsolete: true
Assignee | ||
Updated•15 years ago
|
Attachment #446671 -
Flags: review?(ted.mielczarek)
Updated•15 years ago
|
Attachment #446671 -
Flags: review?(ted.mielczarek) → review+
Updated•15 years ago
|
Summary: jemalloc support for Windows x64 build → jemalloc support for Windows x64 build (VC 2005 / 2008)
Assignee | ||
Comment 6•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a5
You need to log in
before you can comment on or make changes to this bug.
Description
•