Commit Graph

110 Commits

Author SHA1 Message Date
Emanuel Hoogeveen
8210833803 Bug 1294732 - Back out all of bug 1271165 as it has served its purpose. r=glandium 2016-08-23 08:45:00 -04:00
Emanuel Hoogeveen
581ecef4dd Bug 1271165 - Part 6: Change the new functions to MFBT_API to export them on OSX. r=jandem
--HG--
extra : rebase_source : cc3d6cd7cec9c822904364ace811d2c0dff98eff
2016-08-16 07:12:00 -04:00
Emanuel Hoogeveen
57b1d1e8f2 Bug 1271165 - Part 2: Hook the new functions up and provide dummy implementations where needed. r=ehoogeveen 2016-08-12 07:37:00 -04:00
Tom Tromey
5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Mike Hommey
16529670ac Bug 1284677 - Change how the default OSX malloc zone is found. r=njn
--HG--
extra : rebase_source : b5ea2bfb37047fa9f8d4d833186694407c73adda
2016-07-08 14:48:16 +09:00
Chris Peterson
8a9e2d2bd4 Bug 1272513 - Part 2: Remove redundant -Wshadow CXXFLAGS from moz.build files. r=glandium 2016-05-14 00:54:55 -07:00
Ted Mielczarek
68bd5e8c4d bug 1244743 - Replace MOZ_NATIVE_X with MOZ_SYSTEM_X. r=gps
MozReview-Commit-ID: 9ip3qeAXFEe

--HG--
extra : commitid : H6aEkHprVyX
extra : rebase_source : e20d5f4b297caf66711c72cd55dd76f7f9ef9d9c
extra : histedit_source : 47545e0ea61eb66f16545f70e6d3792a389bedb1
2016-02-01 10:49:34 -05:00
Ms2ger
d1f112a81b Bug 1254948 - Remove makefiles used to transition from jemalloc_config.c to jemalloc_config.cpp; r=glandium 2016-03-10 15:53:58 +01:00
Nicholas Nethercote
57bef6b196 Bug 1232219 (part 3) - Fix remaining -Wunused warnings. r=glandium.
--HG--
extra : rebase_source : 357474b4c7729b78a3030dfefd720aad4e1b2576
2015-12-16 22:57:51 -08:00
Jan Beich
16a744dd9f Bug 1229395 - Part 2 - Rely on MALLOC_H to provide function prototypes for MOZ_NATIVE_JEMALLOC. r=glandium 2015-12-01 16:54:44 +00:00
Jan Beich
93cec6dc70 Bug 1229395 - Part 1 - Unbreak MOZ_NATIVE_JEMALLOC after bug 1141079. r=glandium 2015-12-01 16:39:33 +00:00
Mike Hommey
762aba02cd Bug 1221453 - Use ObjDirPaths for GENERATED_INCLUDES and merge with LOCAL_INCLUDES. r=gps 2015-11-06 09:59:21 +09:00
Mike Hommey
538706caba Bug 1203840 - Trigger dirty pages purge after CC. r=njn,r=smaug,r=mccr8
Jemalloc 4 purges dirty pages regularly during free() when the ratio of dirty
pages compared to active pages is higher than 1 << lg_dirty_mult.  We set
lg_dirty_mult in jemalloc_config to limit RSS usage, but it also has an impact
on performance.

So instead of enforcing a high ratio to force more pages being purged, we keep
jemalloc's default ratio of 8, and force a regular purge of all dirty pages,
after cycle collection.

Keeping jemalloc's default ratio avoids cycle-collection-triggered purge to
have to go through really all dirty pages when there are a lot, in which case
the normal jemalloc purge during free() will already have kicked in. It also
takes care of everything that doesn't run the cycle collector still having
a level of purge, like plugins in the plugin-container.

At the same time, since jemalloc_purge_freed_pages does nothing with jemalloc 4,
repurpose the MEMORY_FREE_PURGED_PAGES_MS telemetry probe to track the time
spent in this cycle-collector-triggered purge.
2015-09-20 17:43:43 +09:00
David Major
cc3cd34e27 Bug 1174250: Allow the CommitHook to fail without crashing. r=glandium 2015-09-15 13:53:38 -04:00
Mike Hommey
0cf8973ede Bug 1202523 - Use the default chunk size with jemalloc 4. r=njn 2015-09-08 13:10:22 +09:00
Mike Hommey
0efccdc82c Bug 1201792 - s/MOZ_JEMALLOC3/MOZ_JEMALLOC4/. r=njn 2015-09-04 15:15:47 +09:00
Mike Hommey
748d14b77a Bug 1141079 - Setup custom jemalloc chunk hooks to keep RSS usage low. r=njn 2015-09-04 14:35:54 +09:00
Mike Hommey
4fb6c55f9d Bug 1141079 - Make jemalloc_config.c a C++ source file. r=ted
--HG--
rename : memory/build/jemalloc_config.c => memory/build/jemalloc_config.cpp
2015-09-04 14:35:54 +09:00
Jan Beich
1df901bdce Bug 1201462 - Don't count arena allocated metadata once per bin. r=glandium 2015-09-04 14:35:52 +09:00
Nicholas Nethercote
f44287005f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.

--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
2015-08-27 20:44:53 -07:00
Chris Peterson
1416e566de Bug 1198124 - Enable -Wshadow in directories that have no -Wshadow warnings. r=glandium 2015-08-25 09:14:38 -07:00
Guilherme Goncalves
148b18ba80 Bug 1125514 - Use jemalloc's metadata statistics to compute bookkeeping. r=glandium 2015-08-20 10:05:44 +09:00
Birunthan Mohanathas
a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Mike Hommey
985ca5fd67 Bug 1168719 - Generic replace-malloc library. r=njn 2015-06-05 10:40:58 +09:00
Mike Hommey
c917606f95 Bug 1043692 - Move DIST_INSTALL to moz.build. r=gps 2015-05-12 07:55:22 +09:00
Paul Rouget
d60a1bd75e Bug 1156628 - Don't limit the number of unused dirty pages kept by jemalloc on B2G desktop. r=gsvelto, r=glandium 2015-04-24 03:58:00 -04:00
Mike Hommey
6dd0c8c299 Bug 762449 - Fix "result of 32-bit shift implicitly converted to 64 bits" on win64. r=njn 2015-03-02 07:35:28 +09:00
Mike Hommey
03b3291d3f Bug 1120272 - Expose _aligned_alloc and _aligned_free from mozglue. r=njn 2015-01-20 13:10:00 +09:00
Masatoshi Kimura
bf312ad056 Bug 1120062 - Part 1: Remove most Nullptr.h includes. r=waldo 2015-01-11 11:34:52 +09:00
Brad Lassey
0e7333b6e7 bug 1083116 - build fails: malloc_decls.h conflicting types for 'malloc_usable_size' r=glandium 2015-01-06 19:58:36 -05:00
Guilherme Goncalves
c6a10e7bb5 Bug 899126 - Part 2 - Measure bookkeeping in jemalloc3. r=glandium. 2014-12-29 13:42:14 -08:00
Jan Beich
f4828d35f5 Bug 1115078 - Unbreak MOZ_JEMALLOC3 build on FreeBSD after bug 899126. r=glandium 2014-12-23 12:32:00 -05:00
Guilherme Goncalves
1fb7597a1b Bug 1110514 - Use arena.<i>.purge to free jemalloc3's dirty pages. r=glandium 2014-12-23 02:41:00 -05:00
Guilherme Goncalves
802cb55877 Bug 1108045 - Junk memory with jemalloc3. r=glandium 2014-12-23 07:44:00 -05:00
Guilherme Goncalves
f9d70a5255 Bug 762448 - Bump opt.lg_dirty_mult in jemalloc3 to reduce number of dirty pages. r=glandium 2014-12-23 06:01:00 -05:00
Guilherme Goncalves
5ff0106324 Bug 762448 - Deduct bin_unused from waste in jemalloc3's stats. r=glandium 2014-11-12 13:00:00 -05:00
Ryan VanderMeulen
42a3e6c0ea Merge m-c to inbound. a=merge 2014-12-23 13:18:02 -05:00
Vladimir Vukicevic
a910628209 Bug 1112566 - Use jemalloc C99 msvc compat headers when building mozjemalloc compat glue and jemalloc3 replace-malloc library. r=glandium 2014-12-23 15:27:18 +09:00
Guilherme Goncalves
22c6a4800b Bug 899126 - Part 1: Implement bin_unused for jemalloc3. r=glandium 2014-12-19 09:15:00 -05:00
Guilherme Goncalves
60eb32a82c Bug 1094275 - Update the in-tree copy of jemalloc3 to commit b4acf73. r=glandium 2014-12-17 09:14:48 +09:00
Mike Hommey
c04636bda3 Bug 1104173 - Properly export jemalloc_* symbols from the jemalloc3 replace-malloc library. r=njn
Bug 818922 made MOZ_REPLACE_MALLOC a global define, and that changed the
defines set when building mozjemalloc_compat.c for the jemalloc3
replace-malloc library. In turn, this made the symbol munging wrong for
that library, making the jemalloc_* functions exported as je_jemalloc_*
instead of replace_jemalloc_*.
2014-11-26 16:04:25 +09:00
Mike Hommey
3cbc3cf69f Bug 1087245 part 1 - Allow replace-malloc libraries to register debug file handles to poison IO interposer. r=nfroyd 2014-11-18 19:21:06 +09:00
Mike Hommey
7def0f9cd3 Bug 1097507 - Make libxul independent of libdmd when DMD is enabled. r=njn
This also effectively changes how DMD is enabled from requiring both
replace-malloc initialization and the DMD environment variable to
requiring only the former. The DMD environment variable can still be
used to specify options, but not to disable entirely.

This however doesn't touch all the parts that do enable DMD by setting
the DMD environment variable to 1, so the code to handle this value
is kept.
2014-11-18 19:21:06 +09:00
Mike Hommey
6d15698158 Bug 818922 - Add bidirectional method calls with replace-malloc library. r=njn 2014-11-18 19:21:06 +09:00
Guilherme Goncalves
f843e98e47 Bug 762448 - Disable tcache in jemalloc3. r=glandium 2014-10-23 02:36:00 -04:00
Mike Hommey
47c853314f Bug 1077148 part 4 - Add and use new moz.build templates for Gecko programs and libraries. r=gps
There are, sadly, many combinations of linkage in use throughout the tree.
The main differentiator, though, is between program/libraries related to
Gecko or not. Kind of. Some need mozglue, some don't. Some need dependent
linkage, some standalone.

Anyways, these new templates remove the need to manually define the
right dependencies against xpcomglue, nspr, mozalloc and mozglue
in most cases.

Places that build programs and were resetting MOZ_GLUE_PROGRAM_LDFLAGS
or that build libraries and were resetting MOZ_GLUE_LDFLAGS can now
just not use those Gecko-specific templates.
2014-10-30 13:06:12 +09:00
Mike Hommey
746f48e4a4 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
Guilherme Goncalves
258ec900a4 Bug 1082199 - Recompute stats in jemalloc_stats when using jemalloc3. r=glandium 2014-10-17 15:55:00 +02:00
Mike Hommey
b77d0f1d19 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
ed70c5f377 Bug 1041941 - Use templates for programs, simple programs, libraries and C++ unit tests. r=gps 2014-09-03 14:10:54 +09:00