Commit Graph

640 Commits

Author SHA1 Message Date
Nicholas Nethercote
aa550f23b8 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
4da9fc8b33 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
c88a9066ca Backed out changeset d6b0ffe1a7b3 (bug 1231378) 2016-01-12 15:48:54 +01:00
Andrea Marchesini
a692c8f184 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
afc6e87efc 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
8982d3ff52 Bug 1232219 (part 3) - Fix remaining -Wunused warnings. r=glandium. 2015-12-16 22:57:51 -08:00
Mike Hommey
d95483e5fc 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
a414195515 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
37746bbe9c Bug 1186934 - update jemalloc to upstream HEAD; r=glandium 2015-12-14 10:05:32 -05:00
Jan Beich
faa3451700 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
2ee4eafa9f Bug 1229395 - Part 1 - Unbreak MOZ_NATIVE_JEMALLOC after bug 1141079. r=glandium 2015-12-01 16:39:33 +00:00
Chris Peterson
164d2cca6a 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
9b4e8bae0a 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
b53827f1c5 Bug 1160272 - DMD build should include |mfbt/Poison.cpp|. r=glandium 2015-04-30 15:13:05 -07:00
Mike Hommey
7fd290435b Bug 1221453 - Use ObjDirPaths for GENERATED_INCLUDES and merge with LOCAL_INCLUDES. r=gps 2015-11-06 09:59:21 +09:00
Nicholas Nethercote
4b27ee8c29 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
9c5965b035 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
e504437747 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
9f1c0bf17d 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
9eaa0d1abc 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
53a85861c1 Bug 1202902 - Scripted fix the world. 2015-10-06 14:00:31 -07:00
Mike Hommey
63e6851011 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
8fc79cbb72 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
3f067cd557 Bug 1200642 - Add checkSimulatedOOM() to AllocPolicy r=Waldo 2015-09-30 11:34:44 +01:00
Nathan Froyd
db6b82828e 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
b06d7f99a7 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
5cd6b3d15e 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
d8faa01cea 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
3aebc51cea Bug 1174250: Allow the CommitHook to fail without crashing. r=glandium 2015-09-15 13:53:38 -04:00
Nicholas Nethercote
b0fdb0c663 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
6e95549d4e Bug 1202965 (part 2) - Use MOZ_UNUSED in FdPrintf.c. r=glandium. 2015-09-09 17:01:32 -07:00
Nigel Babu
c616f616fc Backed out changeset a67867200ec3 (bug 1142403) for Linuxx64 M-e10s(2) bustage. 2015-09-08 13:14:05 +05:30
Mike Hommey
ab80d7148a 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
93cabdf242 Bug 1202523 - Use the default chunk size with jemalloc 4. r=njn 2015-09-08 13:10:22 +09:00
Mike Hommey
0bc04f0a70 Bug 1201792 - s/MOZ_JEMALLOC3/MOZ_JEMALLOC4/. r=njn 2015-09-04 15:15:47 +09:00
Mike Hommey
4d63c200f8 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
4ced2acda9 Bug 1141079 - Setup custom jemalloc chunk hooks to keep RSS usage low. r=njn 2015-09-04 14:35:54 +09:00
Mike Hommey
043256b30d Bug 1141079 - Make jemalloc_config.c a C++ source file. r=ted 2015-09-04 14:35:54 +09:00
Jan Beich
32539fe56a Bug 1201462 - Don't count arena allocated metadata once per bin. r=glandium 2015-09-04 14:35:52 +09:00
Nicholas Nethercote
ed78c32215 Bug 1200623 - Fix FdPrintf.o link error in --disable-optimize builds. r=glandium. 2015-09-01 17:52:56 -07:00
Nicholas Nethercote
a7eaacb3fa Bug 1044077 - Tweak some jemalloc constants. r=glandium. 2015-07-14 20:35:37 -07:00
Nicholas Nethercote
0506145bc1 Bug 1200097 - Fix warnings in logalloc. r=glandium. 2015-08-31 16:53:13 -07:00
Nicholas Nethercote
10d95cca57 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
40a65bd331 Bug 1198124 - Enable -Wshadow in directories that have no -Wshadow warnings. r=glandium 2015-08-25 09:14:38 -07:00
Mike Hommey
e67b4f4cf1 Bug 1189967 - Avoid conflicting declarations for our raise wrappers on Windows. r=nfroyd 2015-08-23 22:22:26 +09:00
Mike Hommey
d4f561da93 Bug 1120793 - Remove obsolete _Throw wrapping. r=froydnj 2015-08-21 14:28:41 +09:00
Guilherme Goncalves
3d6fedf828 Bug 1125514 - Use jemalloc's metadata statistics to compute bookkeeping. r=glandium 2015-08-20 10:05:44 +09:00
Andrew McCreight
d19c1ec731 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
2e37926f5f Bug 1142412 - Remove last jemalloc patch by using a workaround when running its configure. r=mshal 2015-08-18 08:42:24 +09:00
Mike Hommey
ce8308831f Bug 1142412 - Update memory/jemalloc to 4.0.0 release. r=njn 2015-08-18 08:42:23 +09:00