Commit Graph

641 Commits

Author SHA1 Message Date
Lee Salzman
321fe6bce0 Bug 1248416 - add symbols for bad_function_call exception for C++ runtimes. r=nfroyd 2016-02-24 20:00:10 -05:00
Nicholas Nethercote
0f2b743ea0 Bug 1144842 (part 2) - Make --enable-dmd imply --enable-profiling. r=glandium.
This requires moving the --enable-dmd code earlier, before MOZ_PROFILING starts
being used.
2016-01-21 16:58:50 -08:00
Andrea Marchesini
2d7253a040 Bug 1231378 - part 4 - Fix uninitialized members of classes in netwerk/widget/storage/uriloader/memory/tools, r=smaug 2016-01-12 18:16:59 +00:00
Carsten "Tomcat" Book
8ce45e3221 Backed out changeset d6b0ffe1a7b3 (bug 1231378) 2016-01-12 15:48:54 +01:00
Andrea Marchesini
f98d215bd8 Bug 1231378 - part 4 - Fix uninitialized members of classes in netwerk/widget/storage/uriloader/memory/tools, r=smaug 2016-01-12 13:57:37 +00:00
Nicholas Nethercote
88dd3dcc0e Bug 1232219 (part 4) - Enable -Wunused for C code, except where it's too annoying. r=glandium. 2015-12-16 22:59:42 -08:00
Nicholas Nethercote
470fa3e830 Bug 1232219 (part 3) - Fix remaining -Wunused warnings. r=glandium. 2015-12-16 22:57:51 -08:00
Mike Hommey
0c3d01c934 Bug 1235738 - Move MOZ_DEBUG_DEFINES to build frontend. r=gps
MOZ_DEBUG_DEFINES are essentially defines used everywhere. So treat them as
feeding the initial value for DEFINES in each moz.build sandbox. This allows
the kind overrides that was done in the past by resetting MOZ_DEBUG_DEFINES
in Makefiles.
2015-12-31 07:27:23 +09:00
Jon Coppeard
1335bae427 Bug 1232672 - Use MOZ_WARN_UNUSED_RESULT to make hash table clients check for failure r=luke r=billm r=njn 2015-12-22 13:29:43 +00:00
Nathan Froyd
e286e06899 Bug 1186934 - update jemalloc to upstream HEAD; r=glandium 2015-12-14 10:05:32 -05:00
Jan Beich
76d627ed5a 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
7053df31b9 Bug 1229395 - Part 1 - Unbreak MOZ_NATIVE_JEMALLOC after bug 1141079. r=glandium 2015-12-01 16:39:33 +00:00
Chris Peterson
c07b197ba2 Bug 1226907 - Part 2: Fix warnings in mozjemalloc and remove ALLOW_COMPILER_WARNINGS. r=glandium 2015-11-15 13:21:56 -08:00
Chris Peterson
6bfa219b60 Bug 1226907 - Part 1: Check _write and strerror_r return values in mozjemalloc. r=njn 2015-11-27 13:24:56 -08:00
Eric Rahm
258334855a Bug 1160272 - DMD build should include |mfbt/Poison.cpp|. r=glandium 2015-04-30 15:13:05 -07:00
Mike Hommey
405622a83e Bug 1221453 - Use ObjDirPaths for GENERATED_INCLUDES and merge with LOCAL_INCLUDES. r=gps 2015-11-06 09:59:21 +09:00
Nicholas Nethercote
e49efba560 Bug 1216020 - Comment all ALLOW_COMPILER_WARNINGS lines. r=glandium.
DONTBUILD because it only changes comments.

This will hopefully prevent confusion like that in bug 1215903.
2015-10-19 18:05:20 -07:00
Nathan Froyd
e4e2da55c9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi
2015-10-18 01:24:48 -04:00
Nathan Froyd
5254890206 Bug 1207245 - part 3 - switch all uses of mozilla::RefPtr<T> to nsRefPtr<T>; r=ehsan
This commit was generated using the following script, executed at the
top level of a typical source code checkout.

 # Don't modify select files in mfbt/ because it's not worth trying to
 # tease out the dependencies currently.
 #
 # Don't modify anything in media/gmp-clearkey/0.1/ because those files
 # use their own RefPtr, defined in their own RefCounted.h.
find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    grep -v 'mfbt/RefPtr.h' | \
    grep -v 'mfbt/nsRefPtr.h' | \
    grep -v 'mfbt/RefCounted.h' | \
    grep -v 'media/gmp-clearkey/0.1/' | \
    xargs perl -p -i -e '
 s/mozilla::RefPtr/nsRefPtr/g; # handle declarations in headers
 s/\bRefPtr</nsRefPtr</g; # handle local variables in functions
 s#mozilla/RefPtr.h#mozilla/nsRefPtr.h#; # handle #includes
 s#mfbt/RefPtr.h#mfbt/nsRefPtr.h#;       # handle strange #includes
'

 # |using mozilla::RefPtr;| is OK; |using nsRefPtr;| is invalid syntax.
find . -name '*.cpp' -o -name '*.mm' | xargs sed -i -e '/using nsRefPtr/d'

 # RefPtr.h used |byRef| for dealing with COM-style outparams.
 # nsRefPtr.h uses |getter_AddRefs|.
 # Fixup that mismatch.
find . -name '*.cpp' -o -name '*.h'| \
    xargs perl -p -i -e 's/byRef/getter_AddRefs/g'
2015-10-18 00:40:10 -04:00
Carsten "Tomcat" Book
d7f143eaad Backed out 2 changesets (bug 1202902) to recking bug 1202902 to be able to reopen inbound on a CLOSED TREE
Backed out changeset 647025383676 (bug 1202902)
Backed out changeset d70c7fe532c6 (bug 1202902)
2015-10-07 14:03:21 +02:00
Carsten "Tomcat" Book
b9e5717f50 Backed out 1 changesets (bug 1202902) for causing merge conflicts to mozilla-central
Backed out changeset cfc1820361f5 (bug 1202902)
2015-10-07 12:13:45 +02:00
Shu-yu Guo
b5f316de44 Bug 1202902 - Scripted fix the world. 2015-10-06 14:00:31 -07:00
Mike Hommey
b910106253 Bug 1209875 - Get rid of XULPPFLAGS. r=gps
The flags added in toolkit/locales/Makefile.in turn out not to be actually
used, so just remove that.

The remaining uses of XULPPFLAGS are to set debug flags depending on whether
MOZ_DEBUG is set or not. Just set a dedicated variable with the right value
from configure.
2015-10-01 07:30:48 +09:00
Jon Coppeard
53861afa80 Bug 1207519 - Prevent HashTable shrink from ignoring allocation failures that may have been reported r=Waldo 2015-09-30 11:34:49 +01:00
Jon Coppeard
d36da99d53 Bug 1200642 - Add checkSimulatedOOM() to AllocPolicy r=Waldo 2015-09-30 11:34:44 +01:00
Nathan Froyd
490e851ea9 Bug 1207245 - part 1 - move RefCounted<T> to its own file
Various bits depend on RefPtr.h to provide RefCounted<T> and RefPtr<T>.
It will be easier to manage an automatic conversion from RefPtr<T> to
nsRefPtr<T> if we split out the dependency on RefCounted<T> first.
2015-09-22 21:27:34 -04:00
Chris Peterson
dd2fcb9b7d Bug 1207030 - Enable -Wshadow flag in more directories that have no -Wshadow warnings. r=glandium 2015-09-22 21:39:03 -07:00
Mike Hommey
3ef8be4fa4 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
Shu-yu Guo
45211869c8 Bug 1202902 - Mass replace toplevel 'let' with 'var' in preparation for global lexical scope. (rs=jorendorff) 2015-09-15 11:19:45 -07:00
David Major
71d9efb917 Bug 1174250: Allow the CommitHook to fail without crashing. r=glandium 2015-09-15 13:53:38 -04:00
Nicholas Nethercote
9efec569c6 Bug 1203476 - Fix an Android-only warning in mozalloc_abort.cpp. r=glandium.
And remove the corresponding and now-unnecessary ALLOW_COMPILER_WARNINGS=True.
2015-09-10 16:20:19 -07:00
Nicholas Nethercote
dd77cebf66 Bug 1202965 (part 2) - Use MOZ_UNUSED in FdPrintf.c. r=glandium. 2015-09-09 17:01:32 -07:00
Nigel Babu
139efd35f8 Backed out changeset a67867200ec3 (bug 1142403) for Linuxx64 M-e10s(2) bustage. 2015-09-08 13:14:05 +05:30
Mike Hommey
fc3657e12a Bug 1142403 - Don't build jemalloc3 with unified sources when built with --enable-debug. r=mshal
When built with --enable-debug, jemalloc3 makes headers define functions that
are normally inlined, and that prevents unified sources from working.
2015-09-08 13:13:25 +09:00
Mike Hommey
c35de69eb6 Bug 1202523 - Use the default chunk size with jemalloc 4. r=njn 2015-09-08 13:10:22 +09:00
Mike Hommey
eab3f37f73 Bug 1201792 - s/MOZ_JEMALLOC3/MOZ_JEMALLOC4/. r=njn 2015-09-04 15:15:47 +09:00
Mike Hommey
fc63bd2148 Bug 1201738 - Update jemalloc4 to 594c759 + two pending patches. r=njn
Also do a dummy change to configure.in to trigger a reconfigure, working
around bug 1021347.
2015-09-04 14:35:55 +09:00
Mike Hommey
fa1b93476f Bug 1141079 - Setup custom jemalloc chunk hooks to keep RSS usage low. r=njn 2015-09-04 14:35:54 +09:00
Mike Hommey
7c905bcc2e Bug 1141079 - Make jemalloc_config.c a C++ source file. r=ted 2015-09-04 14:35:54 +09:00
Jan Beich
0061505ccb Bug 1201462 - Don't count arena allocated metadata once per bin. r=glandium 2015-09-04 14:35:52 +09:00
Nicholas Nethercote
de75feaad9 Bug 1200623 - Fix FdPrintf.o link error in --disable-optimize builds. r=glandium. 2015-09-01 17:52:56 -07:00
Nicholas Nethercote
180b0ebfe6 Bug 1044077 - Tweak some jemalloc constants. r=glandium. 2015-07-14 20:35:37 -07:00
Nicholas Nethercote
834a8ed235 Bug 1200097 - Fix warnings in logalloc. r=glandium. 2015-08-31 16:53:13 -07:00
Nicholas Nethercote
69d088e45f 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.
2015-08-27 20:44:53 -07:00
Chris Peterson
cd0fd3466a Bug 1198124 - Enable -Wshadow in directories that have no -Wshadow warnings. r=glandium 2015-08-25 09:14:38 -07:00
Mike Hommey
57e1452704 Bug 1189967 - Avoid conflicting declarations for our raise wrappers on Windows. r=nfroyd 2015-08-23 22:22:26 +09:00
Mike Hommey
11d02cf7d6 Bug 1120793 - Remove obsolete _Throw wrapping. r=froydnj 2015-08-21 14:28:41 +09:00
Guilherme Goncalves
2a9634fd42 Bug 1125514 - Use jemalloc's metadata statistics to compute bookkeeping. r=glandium 2015-08-20 10:05:44 +09:00
Andrew McCreight
53575e9483 Bug 1179042 - Add a script for analyzing memory blocks using a heap scan DMD log. r=njn DONTBUILD
Based on:
0a68e57a2c/dmd/block_analyzer.py
2015-08-17 16:48:10 -07:00
Mike Hommey
8af99a52b9 Bug 1142412 - Remove last jemalloc patch by using a workaround when running its configure. r=mshal 2015-08-18 08:42:24 +09:00