[SVN-Commit] r1072 - in trunk: mail/thunderbird/files www/firefox-nightly/files www/firefox/files www/seamonkey/files
svn-freebsd-gecko at chruetertee.ch
svn-freebsd-gecko at chruetertee.ch
Sat Oct 13 00:08:08 UTC 2012
Author: jbeich
Date: Sat Oct 13 00:08:01 2012
New Revision: 1072
Log:
get rid of red paint in about:memory
Added:
trunk/mail/thunderbird/files/patch-z-bug762445
trunk/www/firefox-nightly/files/patch-z-bug762445
trunk/www/firefox/files/patch-z-bug762445
trunk/www/seamonkey/files/patch-z-bug762445
Added: trunk/mail/thunderbird/files/patch-z-bug762445
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/mail/thunderbird/files/patch-z-bug762445 Sat Oct 13 00:08:01 2012 (r1072)
@@ -0,0 +1,57 @@
+commit b44dc8e
+Author: Jan Beich <jbeich at tormail.org>
+Date: Fri Oct 12 18:49:59 2012 +0000
+
+ Bug 762445 - Add jemalloc3 glue for heap-committed, heap-dirty in about:memory.
+---
+ memory/build/mozjemalloc_compat.c | 34 ++++++++++++++++++++++++++++------
+ 1 file changed, 28 insertions(+), 6 deletions(-)
+
+diff --git memory/build/mozjemalloc_compat.c memory/build/mozjemalloc_compat.c
+index 94ad96e..7adfef5 100644
+--- mozilla/memory/build/mozjemalloc_compat.c
++++ mozilla/memory/build/mozjemalloc_compat.c
+@@ -11,15 +11,37 @@
+ #define wrap(a) je_ ## a
+ #endif
+
+-extern MOZ_IMPORT_API(int)
++#define CTL_GET(n, v) do { \
++ size_t sz = sizeof(v); \
++ wrap(mallctl)(n, &v, &sz, NULL, 0); \
++} while (0)
++
++#define CTL_I_GET(n, v) do { \
++ size_t mib[6]; \
++ size_t miblen = sizeof(mib) / sizeof(size_t); \
++ size_t sz = sizeof(v); \
++ wrap(mallctlnametomib)(n, mib, &miblen); \
++ mib[2] = i; \
++ wrap(mallctlbymib)(mib, miblen, &v, &sz, NULL, 0); \
++} while (0)
++
++MOZ_IMPORT_API(int)
+ wrap(mallctl)(const char*, void*, size_t*, void*, size_t);
++MOZ_IMPORT_API(int)
++wrap(mallctlnametomib)(const char *name, size_t *mibp, size_t *miblenp);
++MOZ_IMPORT_API(int)
++wrap(mallctlbymib)(const size_t *mib, size_t miblen, void *oldp, size_t *oldlenp, void *newp, size_t newlen);
+
+ MOZ_EXPORT_API(void)
+ jemalloc_stats(jemalloc_stats_t *stats)
+ {
+- size_t size = sizeof(stats->mapped);
+- wrap(mallctl)("stats.mapped", &stats->mapped, &size, NULL, 0);
+- wrap(mallctl)("stats.allocated", &stats->allocated, &size, NULL, 0);
+- stats->committed = -1;
+- stats->dirty = -1;
++ unsigned i;
++ size_t page;
++ CTL_GET("arenas.narenas", i);
++ CTL_GET("arenas.page", page);
++ CTL_GET("stats.active", stats->committed);
++ CTL_GET("stats.allocated", stats->allocated);
++ CTL_GET("stats.mapped", stats->mapped);
++ CTL_I_GET("stats.arenas.0.pdirty", stats->dirty);
++ stats->dirty *= page;
+ }
Added: trunk/www/firefox-nightly/files/patch-z-bug762445
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/www/firefox-nightly/files/patch-z-bug762445 Sat Oct 13 00:08:01 2012 (r1072)
@@ -0,0 +1,57 @@
+commit b44dc8e
+Author: Jan Beich <jbeich at tormail.org>
+Date: Fri Oct 12 18:49:59 2012 +0000
+
+ Bug 762445 - Add jemalloc3 glue for heap-committed, heap-dirty in about:memory.
+---
+ memory/build/mozjemalloc_compat.c | 34 ++++++++++++++++++++++++++++------
+ 1 file changed, 28 insertions(+), 6 deletions(-)
+
+diff --git memory/build/mozjemalloc_compat.c memory/build/mozjemalloc_compat.c
+index 94ad96e..7adfef5 100644
+--- memory/build/mozjemalloc_compat.c
++++ memory/build/mozjemalloc_compat.c
+@@ -11,15 +11,37 @@
+ #define wrap(a) je_ ## a
+ #endif
+
+-extern MOZ_IMPORT_API(int)
++#define CTL_GET(n, v) do { \
++ size_t sz = sizeof(v); \
++ wrap(mallctl)(n, &v, &sz, NULL, 0); \
++} while (0)
++
++#define CTL_I_GET(n, v) do { \
++ size_t mib[6]; \
++ size_t miblen = sizeof(mib) / sizeof(size_t); \
++ size_t sz = sizeof(v); \
++ wrap(mallctlnametomib)(n, mib, &miblen); \
++ mib[2] = i; \
++ wrap(mallctlbymib)(mib, miblen, &v, &sz, NULL, 0); \
++} while (0)
++
++MOZ_IMPORT_API(int)
+ wrap(mallctl)(const char*, void*, size_t*, void*, size_t);
++MOZ_IMPORT_API(int)
++wrap(mallctlnametomib)(const char *name, size_t *mibp, size_t *miblenp);
++MOZ_IMPORT_API(int)
++wrap(mallctlbymib)(const size_t *mib, size_t miblen, void *oldp, size_t *oldlenp, void *newp, size_t newlen);
+
+ MOZ_EXPORT_API(void)
+ jemalloc_stats(jemalloc_stats_t *stats)
+ {
+- size_t size = sizeof(stats->mapped);
+- wrap(mallctl)("stats.mapped", &stats->mapped, &size, NULL, 0);
+- wrap(mallctl)("stats.allocated", &stats->allocated, &size, NULL, 0);
+- stats->committed = -1;
+- stats->dirty = -1;
++ unsigned i;
++ size_t page;
++ CTL_GET("arenas.narenas", i);
++ CTL_GET("arenas.page", page);
++ CTL_GET("stats.active", stats->committed);
++ CTL_GET("stats.allocated", stats->allocated);
++ CTL_GET("stats.mapped", stats->mapped);
++ CTL_I_GET("stats.arenas.0.pdirty", stats->dirty);
++ stats->dirty *= page;
+ }
Added: trunk/www/firefox/files/patch-z-bug762445
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/www/firefox/files/patch-z-bug762445 Sat Oct 13 00:08:01 2012 (r1072)
@@ -0,0 +1,57 @@
+commit b44dc8e
+Author: Jan Beich <jbeich at tormail.org>
+Date: Fri Oct 12 18:49:59 2012 +0000
+
+ Bug 762445 - Add jemalloc3 glue for heap-committed, heap-dirty in about:memory.
+---
+ memory/build/mozjemalloc_compat.c | 34 ++++++++++++++++++++++++++++------
+ 1 file changed, 28 insertions(+), 6 deletions(-)
+
+diff --git memory/build/mozjemalloc_compat.c memory/build/mozjemalloc_compat.c
+index 94ad96e..7adfef5 100644
+--- memory/build/mozjemalloc_compat.c
++++ memory/build/mozjemalloc_compat.c
+@@ -11,15 +11,37 @@
+ #define wrap(a) je_ ## a
+ #endif
+
+-extern MOZ_IMPORT_API(int)
++#define CTL_GET(n, v) do { \
++ size_t sz = sizeof(v); \
++ wrap(mallctl)(n, &v, &sz, NULL, 0); \
++} while (0)
++
++#define CTL_I_GET(n, v) do { \
++ size_t mib[6]; \
++ size_t miblen = sizeof(mib) / sizeof(size_t); \
++ size_t sz = sizeof(v); \
++ wrap(mallctlnametomib)(n, mib, &miblen); \
++ mib[2] = i; \
++ wrap(mallctlbymib)(mib, miblen, &v, &sz, NULL, 0); \
++} while (0)
++
++MOZ_IMPORT_API(int)
+ wrap(mallctl)(const char*, void*, size_t*, void*, size_t);
++MOZ_IMPORT_API(int)
++wrap(mallctlnametomib)(const char *name, size_t *mibp, size_t *miblenp);
++MOZ_IMPORT_API(int)
++wrap(mallctlbymib)(const size_t *mib, size_t miblen, void *oldp, size_t *oldlenp, void *newp, size_t newlen);
+
+ MOZ_EXPORT_API(void)
+ jemalloc_stats(jemalloc_stats_t *stats)
+ {
+- size_t size = sizeof(stats->mapped);
+- wrap(mallctl)("stats.mapped", &stats->mapped, &size, NULL, 0);
+- wrap(mallctl)("stats.allocated", &stats->allocated, &size, NULL, 0);
+- stats->committed = -1;
+- stats->dirty = -1;
++ unsigned i;
++ size_t page;
++ CTL_GET("arenas.narenas", i);
++ CTL_GET("arenas.page", page);
++ CTL_GET("stats.active", stats->committed);
++ CTL_GET("stats.allocated", stats->allocated);
++ CTL_GET("stats.mapped", stats->mapped);
++ CTL_I_GET("stats.arenas.0.pdirty", stats->dirty);
++ stats->dirty *= page;
+ }
Added: trunk/www/seamonkey/files/patch-z-bug762445
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/www/seamonkey/files/patch-z-bug762445 Sat Oct 13 00:08:01 2012 (r1072)
@@ -0,0 +1,57 @@
+commit b44dc8e
+Author: Jan Beich <jbeich at tormail.org>
+Date: Fri Oct 12 18:49:59 2012 +0000
+
+ Bug 762445 - Add jemalloc3 glue for heap-committed, heap-dirty in about:memory.
+---
+ memory/build/mozjemalloc_compat.c | 34 ++++++++++++++++++++++++++++------
+ 1 file changed, 28 insertions(+), 6 deletions(-)
+
+diff --git memory/build/mozjemalloc_compat.c memory/build/mozjemalloc_compat.c
+index 94ad96e..7adfef5 100644
+--- mozilla/memory/build/mozjemalloc_compat.c
++++ mozilla/memory/build/mozjemalloc_compat.c
+@@ -11,15 +11,37 @@
+ #define wrap(a) je_ ## a
+ #endif
+
+-extern MOZ_IMPORT_API(int)
++#define CTL_GET(n, v) do { \
++ size_t sz = sizeof(v); \
++ wrap(mallctl)(n, &v, &sz, NULL, 0); \
++} while (0)
++
++#define CTL_I_GET(n, v) do { \
++ size_t mib[6]; \
++ size_t miblen = sizeof(mib) / sizeof(size_t); \
++ size_t sz = sizeof(v); \
++ wrap(mallctlnametomib)(n, mib, &miblen); \
++ mib[2] = i; \
++ wrap(mallctlbymib)(mib, miblen, &v, &sz, NULL, 0); \
++} while (0)
++
++MOZ_IMPORT_API(int)
+ wrap(mallctl)(const char*, void*, size_t*, void*, size_t);
++MOZ_IMPORT_API(int)
++wrap(mallctlnametomib)(const char *name, size_t *mibp, size_t *miblenp);
++MOZ_IMPORT_API(int)
++wrap(mallctlbymib)(const size_t *mib, size_t miblen, void *oldp, size_t *oldlenp, void *newp, size_t newlen);
+
+ MOZ_EXPORT_API(void)
+ jemalloc_stats(jemalloc_stats_t *stats)
+ {
+- size_t size = sizeof(stats->mapped);
+- wrap(mallctl)("stats.mapped", &stats->mapped, &size, NULL, 0);
+- wrap(mallctl)("stats.allocated", &stats->allocated, &size, NULL, 0);
+- stats->committed = -1;
+- stats->dirty = -1;
++ unsigned i;
++ size_t page;
++ CTL_GET("arenas.narenas", i);
++ CTL_GET("arenas.page", page);
++ CTL_GET("stats.active", stats->committed);
++ CTL_GET("stats.allocated", stats->allocated);
++ CTL_GET("stats.mapped", stats->mapped);
++ CTL_I_GET("stats.arenas.0.pdirty", stats->dirty);
++ stats->dirty *= page;
+ }
More information about the freebsd-gecko
mailing list