Commit Graph

512 Commits

Author SHA1 Message Date
Mike Hommey
f892df624f Bug 1083686 - Tool to capture and reproduce Firefox's memory allocations. r=njn,r=mshal
--HG--
rename : mozglue/build/Makefile.in => mozglue/build/replace_malloc.mk
2014-10-24 13:08:01 +09:00
Mike Hommey
bfbc5ed6e3 Bug 1083686 part 0 - Don't set MOZ_MEMORY_API to static for OSX in replace_malloc.c. r=njn
It appears to be an unnecessary optimization, since the compiler is still inlining
the functions when they're not marked static. OTOH, following patches will require
the _impl functions not to be static.
2014-10-24 13:08:01 +09:00
Nicholas Nethercote
86bfbf4c47 Bug 1085727 (part 3) - Print dmd.py's invocation at the top of its output. r=mccr8.
--HG--
extra : rebase_source : 939ad38842c4e7a93a0a15e88d63ad7adf40a02c
2014-10-20 17:45:58 -07:00
Nicholas Nethercote
b159cb3a06 Bug 1085727 (part 2) - Remove dmd.py's -b option and make its behaviour the default. r=mccr8.
--HG--
extra : rebase_source : 8edce2b3d2d09b2ace2a7946a2b705ff44ed4cfa
2014-10-20 17:45:45 -07:00
Nicholas Nethercote
60a4b977a5 Bug 1085727 (part 1) - DMD: make some very short functions one-liners. r=mccr8.
--HG--
extra : rebase_source : 6b92db54973b57f23d2231b92b9d567da054333e
2014-10-20 17:45:09 -07:00
Nicholas Nethercote
ab03733e35 Bug 1014343 - Add diff support to dmd.py. r=mccr8.
--HG--
extra : rebase_source : d91abce6ec9a3b81419f997ed5dfc1b23c89cc7c
2014-10-16 19:06:45 -07:00
Nicholas Nethercote
53d3bce418 Bug 1076446 - Make the DMD test work on Windows. r=glandium.
--HG--
extra : rebase_source : 7cc8d3b18b0539ff170a98fa1c5706ff46e20d32
2014-10-09 19:28:33 -07:00
Guilherme Goncalves
85d38b4e9c Bug 1082199 - Recompute stats in jemalloc_stats when using jemalloc3. r=glandium 2014-10-17 15:55:00 +02:00
Mike Hommey
4203016ca8 Bug 1084210 - Simplify tree traversal for memory/replace. r=mshal 2014-10-18 16:16:20 +09:00
Mike Hommey
bf80a113ab Bug 1077366 - Remove most symbol wrapping from Android builds. r=nfroyd
Since essentially everything is linked to libmozglue and libmozglue takes
precedence in symbol resolution in our dynamic linker, there is no need
to wrap most symbols. PR_GetEnv/PR_SetEnv still needs wrapping because
there's no other way to actually wrap the calls from NSPR itself and NSS,
as well as the symbols wrapped because our dynamic linker can't find them
in system libraries on some devices because they're weak.
2014-10-14 07:17:13 +09:00
Mike Hommey
351403e243 Bug 1081011 - Remove memory/replace/defs.mk. r=mshal 2014-10-14 07:14:34 +09:00
Nicholas Nethercote
0667d7b0ab Bug 1078981 - Teach dmd.py how to handle gzipped files. r=mccr8. 2014-10-03 00:52:27 -07:00
Nicholas Nethercote
69599fa4a3 Bug 1078979 - Add more testing of dmd.py. r=erahm.
--HG--
rename : memory/replace/dmd/test/full-heap-expected1.txt => memory/replace/dmd/test/full-heap-empty-expected.txt
rename : memory/replace/dmd/test/full-heap-expected4.txt => memory/replace/dmd/test/full-heap-sampled-expected.txt
rename : memory/replace/dmd/test/full-heap-expected2.txt => memory/replace/dmd/test/full-heap-unsampled1-expected.txt
rename : memory/replace/dmd/test/full-heap-expected3.txt => memory/replace/dmd/test/full-heap-unsampled2-expected.txt
rename : memory/replace/dmd/test/full-reports-expected1.txt => memory/replace/dmd/test/full-reports-empty-expected.txt
rename : memory/replace/dmd/test/full-reports-expected4.txt => memory/replace/dmd/test/full-reports-sampled-expected.txt
rename : memory/replace/dmd/test/full-reports-expected2.txt => memory/replace/dmd/test/full-reports-unsampled1-expected.txt
rename : memory/replace/dmd/test/full-reports-expected3.txt => memory/replace/dmd/test/full-reports-unsampled2-expected.txt
extra : rebase_source : 6fc66545db4422a9cd38d734db2b76d3b9b25880
2014-10-09 16:50:12 -07:00
Nicholas Nethercote
16e02a392f Bug 1077230 - Enable the DMD test on Mac 10.8. r=glandium.
--HG--
extra : rebase_source : c298dd524ab29644f93dc204128b8ab5a2a7383c
2014-10-07 23:29:07 -07:00
Nicholas Nethercote
7f8aca24fa Bug 1079660 - DMD: don't call malloc et al. directly in the test. r=glandium.
--HG--
extra : rebase_source : 619e57f5624e5fb4fe370608bb4c04cf43a9be00
2014-10-07 21:44:42 -07:00
Nicholas Nethercote
07aaa8641a Bug 1073312 - Test DMD on TBPL (Linux-only). r=glandium.
--HG--
extra : rebase_source : c35cc2bfd6720db35ece715dc7ef900ab5864409
2014-09-28 20:50:52 -07:00
Nicholas Nethercote
eb9ded4cb6 Bug 1079657 - DMD: Remove the "stress" mode. r=erahm.
--HG--
extra : rebase_source : d0b233a62c1b50facb27d781f9942628f100180e
2014-10-08 14:56:46 -07:00
Nicholas Nethercote
e426468e21 Bug 1074008 - Add a --fix-stacks option to dmd.py. r=glandium.
--HG--
extra : rebase_source : 6ecfdf21ed09671bf9e1e65072dafc1402052a65
2014-09-28 18:36:49 -07:00
Nicholas Nethercote
623282e324 Bug 1044709 - DMD: emit JSON output and use Python for post-processing. r=mccr8.
--HG--
extra : rebase_source : ddc94d9be1ee0acc6dda30540defd5f40db0adcb
2014-09-02 20:34:58 -07:00
Nicholas Nethercote
40038ad251 Bug 1062709 (part 1, attempt 2) - Add a frame number argument to NS_WalkStackCallback. r=dbaron.
--HG--
extra : rebase_source : 4f7060a9ae0bed180899651c50e8ea8857e72d63
2014-09-10 21:47:01 -07:00
Ed Morley
26287ab8a9 Backed out changeset a0b82c954206 (bug 1062709) for Windows mochitest 5 hangs 2014-10-03 15:06:16 +01:00
Nicholas Nethercote
c436bd02ed Bug 1062709 (part 1) - Add a frame number argument to NS_WalkStackCallback. r=dbaron.
--HG--
extra : rebase_source : 0f9b2d6310433ed56f5552706fcf2a96571aee25
2014-09-10 21:47:01 -07:00
Nicholas Nethercote
46721ded69 Bug 1074062 - Fix a DMD link error that only affects some Macs. r=froydnj. 2014-09-29 19:08:45 -07:00
Cervantes Yu
1d61b4360f Bug 1051633: Make sure magic file descriptors in the content process will not be taken for other uses. r=khuey
--HG--
extra : rebase_source : 5e2dedb855dd5e0e6637d6f42c80c69df8081971
2014-09-30 00:00:00 +08:00
Jim Chen
abefa7382e Bug 1067018 - Always specify throw() for nothrow placement new/delete; r=glandium 2014-09-26 15:45:45 -04:00
Jim Chen
3e22f80613 Bug 1066760 - Use more detailed abort message on Android; r=snorp 2014-09-24 14:12:54 -04:00
Jim Chen
595110b463 Bug 1066760 - Redirect mozalloc_abort through Java exception handling; r=snorp 2014-09-24 14:12:54 -04:00
Carsten "Tomcat" Book
20a19b8364 Backed out changeset 1e25cd3e8219 (bug 1051633) for B2G ICS Emulator Opt m4 test failures 2014-09-24 11:28:37 +02:00
Cervantes Yu
c78afc09ad Bug 1051633: Make sure magic file descriptors in the content process will not be taken for other uses. r=khuey
--HG--
extra : rebase_source : 2c9baf6ac87744d7049c90284990c0aa48e0f058
2014-08-15 17:19:05 +08:00
Seth Fowler
33bbdb155d Bug 1057894 (Part 1) - Make VolatileBufferPtr's moveable. r=mwu 2014-09-10 17:06:37 -07:00
Nicholas Nethercote
78fc8dcc45 Bug 1063321 - Print to the console the paths of all files that DMD opens. r=mccr8.
--HG--
extra : rebase_source : 50a18a0a074f929ab934c5b3eade1c69e6ba4510
2014-09-04 20:45:22 -07:00
Nicholas Nethercote
75c230aba2 Bug 1050601 - Remove fix-linux-stack.pl. r=ted.
--HG--
extra : rebase_source : f344aa5db9e16575835a7de3df34c311635c128b
2014-09-03 09:24:38 -07:00
Mike Hommey
92deb5899a Bug 1059113 - Use templates for shared libraries and frameworks. r=gps
Also force to use the existing template for XPCOM components.
2014-09-04 09:04:45 +09:00
Mike Hommey
c2a27deef9 Bug 1059090 - Don't require SOURCES to be set for CPP_UNIT_TESTS and SIMPLE_PROGRAMS. r=mshal 2014-09-03 14:16:37 +09:00
Mike Hommey
8fd95ad480 Bug 1041941 - Use templates for programs, simple programs, libraries and C++ unit tests. r=gps 2014-09-03 14:10:54 +09:00
Nicholas Nethercote
4214aef0f1 Bug 1061385 - Remove |Writer| parameter from CodeAddressService. r=mccr8.
--HG--
extra : rebase_source : 0ed67121aac5c9f63ed647e31cd5321eca0b25b7
2014-09-01 20:03:06 -07:00
Andrew McCreight
861fda311d Bug 1058169 - Add explicit ctor annotations in DMD.cpp. r=njn 2014-08-28 12:53:47 -07:00
Nicholas Nethercote
6271884e8a Bug 1057754 (follow-up) - Allow Valgrind + jemalloc to be combined, because it makes sense when running Cachegrind. r=me. 2014-08-25 20:38:29 -07:00
Nicholas Nethercote
7cfc0607fe Bug 1057754 - Remove the bogus Valgrind annotations from mozjemalloc. r=glandium.
--HG--
extra : rebase_source : c6b32f064181d28bf65d291189d87e516f5e0076
2014-08-25 16:59:43 -07:00
Michael Wu
d92cabb9c6 Bug 1045977 - Clear heap allocated volatile buffers, r=njn,seth 2014-08-19 15:30:55 -04:00
Terrence Cole
3fbb2fe80f Bug 1033442 - Remove non-pod realloc from MallocProvider and AllocPolicy; r=jonco
--HG--
extra : rebase_source : 507ab10313127ffcbf905c42438882aa9074c38a
2014-08-05 14:06:35 -07:00
Terrence Cole
7a1e954358 Bug 1033442 - Remove non-pod malloc from MallocProvider and AllocPolicy; r=jonco 2014-08-08 13:22:39 -07:00
Terrence Cole
5bb53b0708 Bug 1033442 - Remove non-pod calloc from MallocProvider and AllocPolicy; r=jonco 2014-08-05 14:06:35 -07:00
Mike Hommey
cbe32e4bb3 Bug 1047267 - Move remaining OS_LIBS and EXTRA_LIBS to moz.build. r=gps
* * *
Bug 1047267 - To fold with "Move remaining OS_LIBS and EXTRA_LIBS to moz.build"
2014-08-07 14:21:03 +09:00
Mike Hommey
1cb5547cd1 Bug 1045783 - Move most OS_LIBS to moz.build and do some related cleanup. r=mshal 2014-08-06 07:25:33 +09:00
Michael Wu
597e1d3236 Bug 1044193 - Always cleanup on heap allocation path, r=glandium 2014-08-05 02:19:59 -04:00
Mike Hommey
d463a7d289 Bug 1046045 - Remove ${srcroot} from cfghdrs_in, cfgoutputs_in and cfghdrs_tup in jemalloc's configure. r=mshal 2014-08-01 15:55:56 +09:00
Andrew McCreight
4670b2ceeb Bug 1004609, part 9 - Rename DMDLocationService to CodeAddressService. r=njn 2014-07-31 16:39:26 -07:00
Andrew McCreight
c5bc575865 Bug 1004609, part 7 - Move LocationService into xpcom. r=njn,froydnj 2014-07-31 16:39:25 -07:00
Andrew McCreight
d2ca49b62b Bug 1004609, part 5 - Templatize LocationService over the lock. r=njn 2014-07-31 16:39:25 -07:00
Andrew McCreight
21c02a8b44 Bug 1004609, part 4 - Templatize LocationService over the string allocator. r=njn 2014-07-31 16:39:25 -07:00
Andrew McCreight
108b6ec430 Bug 1004609, part 3 - Templatize LocationService over the string interner. r=njn 2014-07-31 16:39:24 -07:00
Andrew McCreight
119b70dc87 Bug 1004609, part 2 - Templatize LocationService over the writer. r=njn 2014-07-31 16:39:24 -07:00
Andrew McCreight
bbe95ec364 Bug 1004609, part 1 - Inline the W() macro in LocationService. r=njn
This will make it easier to move it later.
2014-07-31 16:39:24 -07:00
Andrew McCreight
aecc822aae Bug 1045241 - Make memory reporting for LocationService more normal. r=njn 2014-07-31 16:39:24 -07:00
Mike Hommey
42f57b6138 Bug 1043802 - Remove TOOLS_DIRS and TEST_TOOLS_DIRS. r=gps 2014-07-29 08:55:55 +09:00
Nicholas Nethercote
a8a0e397c5 Bug 1035570 (part 3) - DMD: Add DMDAnalyzeHeap(), a heap snapshot function. r=erahm,mccr8.
The patch also adds DMDAnalyzeReports() as a synonym for DMDReportAndDump(),
and deprecates the latter.

--HG--
extra : rebase_source : 651246aa7a0a301f804c124f25beb0e8ed6cd67f
2014-05-29 23:46:09 -07:00
Nicholas Nethercote
a52caf9330 Bug 1035570 (part 2) - DMD: make output easier for machines to parse. r=erahm.
There are likely to be post-processing scripts for DMD added in the future. In
anticipation, this patch tweaks DMD's output to be a little more conducive to
machine parsing.

The basic idea is this:

- Lines beginning with '#' are comments and can be ignored, as can blank lines.

- All top level blocks consist of a string ending with '{', and then one or
  more indented lines, and then a closing '}' on its own line. Any multi-line
  things within a block are themselves enclosed in braces.

The diff for memory/replace/dmd/test-expected.dmd shows what this looks like in
practice.

It's a long way from a formal grammar or anything like that, but that would be
overkill. In this form it's quite easy to parse with simple scripts that just
do line-based regexp matching, rather than proper parsing. And it's still very
readable to humans, so I think it's a reasonable balance overall.

--HG--
extra : rebase_source : 64085babd79de3cce13295aa5f16a34dc3ad7697
2014-06-05 19:06:50 -07:00
Nicholas Nethercote
f0cdb5aa7d Bug 1035570 (part 1) - DMD: Rename TraceRecord as Record. r=erahm.
DMD used to have "stack trace records" and "stack frame records". Bug 1013011
removed the latter, and now "stack trace record" and |TraceRecord| are a bit
unwieldy. This patch changes them to "heap block record" and |Record|.

--HG--
extra : rebase_source : 1d674db9866221f6a170d0eb05aa77fc9f4a1924
2014-06-05 18:57:02 -07:00
Mike Hommey
7ca0de0fb4 Bug 1041936 part 2 - Directly use the static library "xul" to link into "xul-gtest" instead of having an intermediate library "xul" used by "xul-shared" and "xul-gtest". r=gps 2014-07-23 13:33:09 +09:00
Mike Hommey
5659a611dd Bug 1036894 part 8 - Move most in-tree library linkage information to moz.build, as USE_LIBS. r=gps 2014-07-23 13:30:52 +09:00
Mike Hommey
af37eab57f Bug 1036894 part 6 - Emit SimplePrograms for CPP_UNIT_TESTs, and make the corresponding moz.build config look like that of SIMPLE_PROGRAMS. r=gps 2014-07-23 13:29:44 +09:00
Mike Hommey
bc97b68005 Bug 1036894 part 1 - Move MAKE_FRAMEWORK, SDK_LIBRARY, SHARED_LIBRARY_NAME and STATIC_LIBRARY_NAME to moz.build. r=gps
At the same time, make the Library data more useful in the build frontend.
2014-07-23 13:29:09 +09:00
Makoto Kato
627c71b9d3 Bug 1030899 - Remove issetugid usage on jemalloc. r=glandium 2014-07-08 17:52:09 +09:00
Chris Peterson
b9de01c141 Bug 1033188 - #include <stdlib.h> for getenv() function declaration. r=glandium 2014-07-01 18:49:52 -07:00
Patrick Wang (Chih-Kai Wang)
b2f5d9c01e Bug 1026864: prevent malloc from calling wrapped pthread_mutex_lock and get rid of LibcAllocator. r=cyu,r=glandium,r=khuey 2014-06-25 10:44:58 +08:00
Ehsan Akhgari
cc58665009 Bug 1028684 - Fix the signature of _msize in jemalloc.c; r=glandium
This function accepts a void* argument, not a const void*.

--HG--
extra : rebase_source : 9c5cd5066b3730871e06465a84f9a27a6adc6204
2014-06-24 07:20:22 -07:00
Jed Davis
eabd9062d2 Bug 1011350 - Use TaggedAnonymousMemory to distinguish our various mmap call sites. r=njn
We can probably get more granular information than this, given that we
can re-tag memory after the initial mapping, or tag subregions of an
individual mmap() call differently.  But this is a start.
2014-06-17 17:55:00 +02:00
Ehsan Akhgari
ccdd4bf6dd Bug 1025906 - Include intrin.h in jemalloc.c; r=glandium
This fixes a linking error with clang-cl.
2014-06-16 22:34:26 -04:00
Mike Hommey
6112b7d5ad Bug 1024097 - Allow jemalloc to build with clang-cl. r=njn 2014-06-13 08:44:19 +09:00
Mike Hommey
38fd9e1317 Bug 1019881 - Ensure the default purgeable zone is after the default zone on OS X. rs=njn 2014-06-11 11:07:27 +09:00
Michael Wu
8faa5ec882 Bug 994081 - [1/3] Make VolatileBufferPtrs more flexible, r=glandium 2014-04-18 12:26:49 -04:00
Chris Peterson
dcce483a80 Bug 1019381 - Cherrypick clang and gcc warning fixes from upstream jemalloc. r=glandium 2014-05-28 19:02:11 -07:00
Mike Hommey
e5d63cd0b2 Bug 965870 - Check for __builtin_ffsl before ffsl. r=mshal
Cherry-picked from 1a3eafd1b0
2014-06-06 08:17:02 +09:00
Mike Hommey
90ff451c5a Bug 965870 - Try to use __builtin_ffsl if ffsl is unavailable. r=mshal
Cherry-picked from 9c3a10fdf6
2014-06-06 08:15:58 +09:00
Mike Hommey
9e320ff764 Bug 945582 - Don't use jemalloc3 C99 headers with MSVC versions that have (some) C99 support. r=mshal
--HG--
rename : memory/jemalloc/src/include/msvc_compat/inttypes.h => memory/jemalloc/src/include/msvc_compat/C99/inttypes.h
rename : memory/jemalloc/src/include/msvc_compat/stdbool.h => memory/jemalloc/src/include/msvc_compat/C99/stdbool.h
rename : memory/jemalloc/src/include/msvc_compat/stdint.h => memory/jemalloc/src/include/msvc_compat/C99/stdint.h
2014-05-31 09:54:23 +09:00
Nicholas Nethercote
e754ebe47b Bug 1017911 - DMD: don't use alloca(), because it's a pain to get working on multiple platforms. r=mccr8.
DONTBUILD because DMD is NPOTB.

--HG--
extra : rebase_source : 0b400b76583032f30a9a4b8c935b03c015fc9772
2014-05-29 17:04:23 -07:00
Jan Beich
c0e1b525ed Bug 1015602 - Populate chunksize/bin_unused for MOZ_JEMALLOC3 as they're now used after bug 1006769. r=erahm 2014-05-24 06:41:00 -04:00
Ehsan Akhgari
014df8031e Bug 1015012 - Make the VolatileBuffer constructors explicit; r=froydnj 2014-05-25 21:25:33 -04:00
Eric Rahm
56e0190c90 Bug 1006769 - Part 2: Backport jemalloc3 run_size_calc logic. r=glandium 2014-05-21 17:34:07 -07:00
Eric Rahm
cc0ba9c941 Bug 1006769 - Part 1: Improve heap-overhead memory reporting. r=njn 2014-05-21 17:34:06 -07:00
Nicholas Nethercote
c360e10994 Bug 1014249 - Beef up the "is DMD enabled?" and "is DMD running?" checks. r=mccr8.
--HG--
extra : rebase_source : 868ce1a1e470e45f51447f5126982aaeb51905f1
2014-05-22 19:45:14 -07:00
Nicholas Nethercote
2665a9896d Bug 1013014 (attempt 2) - Disable Trace Malloc on TBPL debug builds. r=glandium.
--HG--
extra : rebase_source : 08fa200fd205225f85b9845bf8c18ac38fe26e0d
2014-05-19 18:16:42 -07:00
Mike Hommey
85c6417ab2 Bug 1014308 - Update jemalloc3 to upstream 3.6.0. r=njn,r=mshal 2014-05-23 07:26:40 +09:00
Mike Hommey
df321a040e Bug 1014300 - Ship replace_jemalloc library (jemalloc3) when replace-malloc is enabled. r=mshal 2014-05-23 07:24:22 +09:00
Nicholas Nethercote
7e96ed6dba Bug 1013011 - DMD: Remove stack frame records. r=erahm.
DONTBUILD because DMD is NPOTB.
2014-05-19 19:57:50 -07:00
Eric Rahm
571ebf0713 Bug 1000621 - Check if DMD is enabled before dumping. r=njn. DONTBUILD 2014-04-24 12:43:11 -07:00
Nathan Froyd
3262d22d1e Bug 993522 - fix comment in DMD.h; r=njn 2014-04-08 13:07:46 -04:00
Michael Wu
c62e4a0856 Bug 985017 - [1/2] Support null VolatileBufferPtrs, r=glandium 2014-04-02 21:32:54 -04:00
Mike Hommey
136f02ac45 Bug 984447 - Properly handle forks in mozjemalloc after bug 694896. r=smichaud 2014-03-29 16:53:49 +09:00
Thomas Zimmermann
2ac234407a Bug 979887: Fix GCC warning about undeclared function |vsnprintf|, r=glandium 2014-03-06 11:20:00 +01:00
Thomas Zimmermann
1a335a7c9c Bug 979887: Fix GCC warnings about inline variable declarations, r=glandium
Some code is compiled in C90 mode, where inline declarations of
variables are not allowed.
2014-03-06 11:19:57 +01:00
Ehsan Akhgari
444a26ed8e Bug 976896 - Port STL_FLAGS to moz.build; r=mshal 2014-03-04 19:39:06 -05:00
Masatoshi Kimura
fa7493eea4 Bug 978442 - Use WindowsVersion.h from VolatileBuffer. r=mwu 2014-03-02 10:29:13 +09:00
Frank Wein
d4838a5c54 Bug 977667 - VolatileBufferFallback.cpp:16:10: error: ‘nullptr’ was not declared in this scope, r=glandium 2014-02-28 12:32:14 +01:00
Ehsan Akhgari
83afc1afae Bug 935778 - Part 0.4: Spray even more MOZ_DECLARE_REFCOUNTED_TYPENAME across the tree 2014-02-21 09:11:33 -05:00
Jacek Caban
3ad1b4cc71 Bug 748598 - Fixed cross compilation on case sensitive OSes. 2014-02-20 17:22:42 +01:00
Michael Wu
40e9b9b3b9 Bug 972693 - Explicitly ignore return values from moz_posix_memalign, r=glandium 2014-02-14 02:15:44 -05:00
Ehsan Akhgari
da11692a23 Bug 973403 - Move the LOCAL_INCLUDES in memory to moz.build; r=glandium 2014-02-18 01:05:51 -05:00
Ms2ger
aa9d7b52b4 Bug 968856 - Move unconditional LOCAL_INCLUDES into moz.build; r=mshal 2014-02-15 21:24:59 +01:00