Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Jun 2012 12:07:40 GMT
From:      svn-freebsd-gecko@chruetertee.ch
To:        freebsd-gecko@freebsd.org
Subject:   [SVN-Commit] r781 - in branches/experimental/www/firefox-nightly: . files
Message-ID:  <201206191207.q5JC7e2I031242@trillian.chruetertee.ch>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Tue Jun 19 12:07:40 2012
New Revision: 781

Log:
redo r766 in a way that fixes 'heap-allocated' warning in about:memory

Added:
   branches/experimental/www/firefox-nightly/files/patch-memory-build-mozjemalloc_compat.c
   branches/experimental/www/firefox-nightly/files/patch-memory-jemalloc-Makefile.in
   branches/experimental/www/firefox-nightly/files/patch-memory-mozjemalloc-jemalloc.h
Deleted:
   branches/experimental/www/firefox-nightly/files/patch-storage-src-mozStorageService.cpp
Modified:
   branches/experimental/www/firefox-nightly/Makefile
   branches/experimental/www/firefox-nightly/files/patch-toolkit_library_Makefile.in

Modified: branches/experimental/www/firefox-nightly/Makefile
==============================================================================
--- branches/experimental/www/firefox-nightly/Makefile	Tue Jun 19 06:53:11 2012	(r780)
+++ branches/experimental/www/firefox-nightly/Makefile	Tue Jun 19 12:07:40 2012	(r781)
@@ -65,6 +65,11 @@
 
 WRKSRC:=	${WRKSRC}-central-${HGREV:C/.*://}
 
+.if ${OSVERSION} > 1000011
+MOZ_OPTIONS+=	--enable-jemalloc
+CONFIGURE_ENV+=	MOZ_JEMALLOC=1
+.endif
+
 .if ${ARCH} == powerpc64
 .if ${OSVERSION} < 900033
 BROKEN=		Needs binutils 2.17.50 to build

Added: branches/experimental/www/firefox-nightly/files/patch-memory-build-mozjemalloc_compat.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/experimental/www/firefox-nightly/files/patch-memory-build-mozjemalloc_compat.c	Tue Jun 19 12:07:40 2012	(r781)
@@ -0,0 +1,15 @@
+--- memory/build/mozjemalloc_compat.c~
++++ memory/build/mozjemalloc_compat.c
+@@ -5,7 +5,12 @@
+ #include "mozilla/Types.h"
+ #include "jemalloc_types.h"
+ 
++#ifdef __FreeBSD__
++#include <malloc_np.h>
++#define je_mallctl mallctl
++#else
+ extern int je_mallctl(const char*, void*, size_t*, void*, size_t);
++#endif
+ 
+ MOZ_EXPORT_API (void)
+ jemalloc_stats(jemalloc_stats_t *stats)

Added: branches/experimental/www/firefox-nightly/files/patch-memory-jemalloc-Makefile.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/experimental/www/firefox-nightly/files/patch-memory-jemalloc-Makefile.in	Tue Jun 19 12:07:40 2012	(r781)
@@ -0,0 +1,15 @@
+--- memory/jemalloc/Makefile.in~
++++ memory/jemalloc/Makefile.in
+@@ -19,10 +19,12 @@ SDK_LIBRARY = $(REAL_LIBRARY)
+ DIST_INSTALL = 1
+ endif
+ 
++ifneq ($(OS_TARGET),FreeBSD)
+ CSRCS := $(notdir $(wildcard $(srcdir)/src/src/*.c))
+ ifneq ($(OS_TARGET),Darwin)
+ CSRCS := $(filter-out zone.c,$(CSRCS))
+ endif
++endif
+ 
+ include $(topsrcdir)/config/rules.mk
+ 

Added: branches/experimental/www/firefox-nightly/files/patch-memory-mozjemalloc-jemalloc.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/experimental/www/firefox-nightly/files/patch-memory-mozjemalloc-jemalloc.h	Tue Jun 19 12:07:40 2012	(r781)
@@ -0,0 +1,15 @@
+--- memory/mozjemalloc/jemalloc.h~
++++ memory/mozjemalloc/jemalloc.h
+@@ -52,7 +52,12 @@ void	jemalloc_stats(jemalloc_stats_t *st
+ __attribute__((weak))
+ #endif
+ #if defined(MOZ_JEMALLOC)
++#ifdef __FreeBSD__
++#include <malloc_np.h>
++#define je_nallocm nallocm
++#else
+ int je_nallocm(size_t *rsize, size_t size, int flags);
++#endif
+ #else
+ size_t je_malloc_good_size(size_t size);
+ #endif

Deleted: branches/experimental/www/firefox-nightly/files/patch-storage-src-mozStorageService.cpp
==============================================================================
--- branches/experimental/www/firefox-nightly/files/patch-storage-src-mozStorageService.cpp	Tue Jun 19 12:07:40 2012	(r780)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,38 +0,0 @@
---- storage/src/mozStorageService.cpp~
-+++ storage/src/mozStorageService.cpp
-@@ -36,6 +36,25 @@
- #include "mozilla/FunctionTimer.h"
- #include "mozilla/Util.h"
- 
-+#if !defined(MOZ_MEMORY) && defined(__FreeBSD__)
-+#include <malloc_np.h>
-+#include <osreldate.h>
-+
-+#define MOZ_STORAGE_MEMORY
-+
-+static inline size_t
-+je_malloc_usable_size_in_advance(size_t size) {
-+#if __FreeBSD_version > 1000011
-+  size_t ret;
-+  if (size == 0)
-+    size = 1;
-+  if (!nallocm(&ret, size, 0))
-+    return ret;
-+#endif
-+  return size;
-+}
-+#endif
-+
- namespace {
- 
- class QuotaCallbackData
-@@ -497,7 +516,9 @@ Service::shutdown()
- sqlite3_vfs *ConstructTelemetryVFS();
- 
- #ifdef MOZ_STORAGE_MEMORY
-+#ifdef MOZ_MEMORY
- #  include "jemalloc.h"
-+#endif
- 
- namespace {
- 

Modified: branches/experimental/www/firefox-nightly/files/patch-toolkit_library_Makefile.in
==============================================================================
--- branches/experimental/www/firefox-nightly/files/patch-toolkit_library_Makefile.in	Tue Jun 19 06:53:11 2012	(r780)
+++ branches/experimental/www/firefox-nightly/files/patch-toolkit_library_Makefile.in	Tue Jun 19 12:07:40 2012	(r781)
@@ -9,3 +9,14 @@
  
  ifndef MOZ_ENABLE_LIBXUL
  EXTRA_DSO_LDOPTS += \
+@@ -619,6 +619,10 @@ DEFINES += -DENABLE_LAYOUTDEBUG
+ endif
+ endif
+ 
++ifdef MOZ_MEMORY
++EXTRA_DSO_LDOPTS += -lmemory
++endif
++
+ ifeq (WINNT_1,$(OS_TARGET)_$(MOZ_PROFILE_USE))
+ # Wrap linker to measure peak virtual memory usage.
+ LD := $(PYTHON) $(topsrcdir)/build/link.py $(CURDIR)/linker-vsize $(LD)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206191207.q5JC7e2I031242>