Граф коммитов

194 Коммитов

Автор SHA1 Сообщение Дата
Eric Rahm 6bb5fd3d99 Bug 1341621 - Avoid deadlocks in DMD when forking. r=njn
In order to avoid the possibility of a deadlock if the DMD state lock is
currently acquired when forking a |pthread_atfork| hook is added to wait for
and acquire the lock prior to forking, then release it after forking.
2017-02-23 17:47:02 -08:00
Alexandre Lissy 0af5b943b6 Bug 1284674 - Remove NUWA r=cyu
MozReview-Commit-ID: GyMRNzOBKw6

--HG--
extra : rebase_source : 293af1cd55f2035ce6a99f4ebf144059c32a2b8f
2016-08-02 14:54:00 +02: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
Nicholas Nethercote 6f4e7b36f5 Bug 1282185 (part 2) - Fix an assertion failure in DMD. r=erahm.
--HG--
extra : rebase_source : cb2ae2a5a6fdc84bbcaba64759b0dbce1e161249
2016-07-13 19:32:27 +10:00
Nicholas Nethercote dcf407f2a8 Bug 1282185 (part 1) - Remove a bogus assertion in DMD. r=erahm.
Since bug 1253512 landed, it's possible for DeadBlocks to lack an allocation
stack.

--HG--
extra : rebase_source : 0efc60192ed0992d2f68838d95586cd888765586
2016-07-13 18:10:56 +10: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
Chris Peterson 353ee65255 Bug 1272513 - Part 1: Suppress -Wshadow warnings-as-errors in some directories. r=glandium 2016-05-11 00:00:01 -07:00
Nicholas Nethercote b1378bc5e8 Bug 1260329 - Properly escape the frameTable when running |dmd.py --clamp-contents|. r=mccr8.
--HG--
extra : rebase_source : 7a55328abb0a79cfa6de21734ee3d440b7625f79
2016-03-29 13:34:57 +11:00
Nicholas Nethercote 43969ea737 Bug 1181142 - Part 0: Update DMD tests to handle a minimum alloc size of 16 on Win64. r=erahm. 2016-03-29 16:31:21 +11:00
Nicholas Nethercote eb9d46b90f Bug 1253512 (part 2) - Aggregate live blocks. r=erahm.
Due to the change in part 1, DMD now prints an entry for every live block,
which increases the output file size significantly in the default case. However,
a lot of those entries are identical and so can be aggregated via the existing
"num" property.

This patch does that, reducing output size by more than half.

--HG--
extra : rebase_source : 6a3709d068f2fb9bbfe3344d7406f05af896380b
2016-03-29 10:41:06 +11:00
Nicholas Nethercote 0f418f3874 Bug 1253512 (part 1) - Overhaul DMD's "sampling". r=erahm.
DMD currently uses a very hacky form of "sampling" by default to avoid
recording stack traces for all blocks. This makes DMD run faster than when it
records all stack traces.

This patch changes the sampling method used; in fact, it avoids "sampling" at
all. The existence of all heap blocks is now recorded exactly, but by default
we only record an allocation stack for each heap block if a Bernoulli trial
succeeds. This choice works well because getting the stack trace is ~100x
slower than recording the block's existence.

Overall, this approach is simpler and it also gives better output -- the choice
of which blocks to record allocation stacks for is mathematically sound, no
stack trace gets blamed for allocations it didn't do, and block counts and
sizes are now always exact.

Other specific things changed.

- All notion of sampling is removed from the various data structures.

- The --sample-below option is removed in favour of --stacks={partial,full}.

- The format of the JSON output file has changed.

- The names of various test files have changed to reflect concept changes.

--HG--
rename : memory/replace/dmd/test/full-empty-cumulative-expected.txt => memory/replace/dmd/test/complete-empty-cumulative-expected.txt
rename : memory/replace/dmd/test/full-empty-dark-matter-expected.txt => memory/replace/dmd/test/complete-empty-dark-matter-expected.txt
rename : memory/replace/dmd/test/full-empty-live-expected.txt => memory/replace/dmd/test/complete-empty-live-expected.txt
rename : memory/replace/dmd/test/full-unsampled1-dark-matter-expected.txt => memory/replace/dmd/test/complete-full1-dark-matter-expected.txt
rename : memory/replace/dmd/test/full-unsampled1-live-expected.txt => memory/replace/dmd/test/complete-full1-live-expected.txt
rename : memory/replace/dmd/test/full-unsampled2-cumulative-expected.txt => memory/replace/dmd/test/complete-full2-cumulative-expected.txt
rename : memory/replace/dmd/test/full-unsampled2-dark-matter-expected.txt => memory/replace/dmd/test/complete-full2-dark-matter-expected.txt
rename : memory/replace/dmd/test/full-sampled-live-expected.txt => memory/replace/dmd/test/complete-partial-live-expected.txt
extra : rebase_source : 47d287405dc5e9075f08addaba49e879c2c6e23f
2016-02-24 14:42:22 +11:00
Jonathan Watt a9c7d25928 Bug 1253094, part 10 - Stop using DebugOnly for class/struct members in memory/. r=njn
MozReview-Commit-ID: LLSCgDES38Q
2016-02-26 15:52:08 +00:00
Nicholas Nethercote 460cabb8f7 Bug 1253526 (part 2) - Gut DMD's usage message. r=erahm
It's rare anyone would see it, and it just duplicates the info present in |mach
run|.

--HG--
extra : rebase_source : fbb1716616ca1ff007af4202757586627c8612b4
2016-03-04 17:12:37 +11:00
Nicholas Nethercote ebc23cf4dc Bug 1253526 (part 1) - Remove DMD's --max-frames option. r=erahm.
Nobody uses it.

--HG--
extra : rebase_source : 6fe2af5f2b7ec19fad8f8cd49871a63599d7ebba
2016-03-04 17:02:20 +11:00
Nicholas Nethercote 160743c7c2 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.

--HG--
extra : rebase_source : acfdc6c4c82436c0a1834e11ddc567e37318da60
2016-01-21 16:58:50 -08:00
Jon Coppeard 498b421261 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
Eric Rahm ce27e9a516 Bug 1160272 - DMD build should include |mfbt/Poison.cpp|. r=glandium
--HG--
extra : rebase_source : 01dbcc2f41aa8325a9e0859e7848ce673457d4a7
2015-04-30 15:13:05 -07:00
Carsten "Tomcat" Book 08997000eb 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 e7ef778c9d Backed out 1 changesets (bug 1202902) for causing merge conflicts to mozilla-central
Backed out changeset cfc1820361f5 (bug 1202902)

--HG--
extra : rebase_source : 5d3db72337754bc7ab0ed0c30b2896100411ff92
2015-10-07 12:13:45 +02:00
Shu-yu Guo d06b6030f6 Bug 1202902 - Scripted fix the world. 2015-10-06 14:00:31 -07:00
Jon Coppeard 204777d13d 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 0b41e069f3 Bug 1200642 - Add checkSimulatedOOM() to AllocPolicy r=Waldo 2015-09-30 11:34:44 +01:00
Chris Peterson 71920a9550 Bug 1207030 - Enable -Wshadow flag in more directories that have no -Wshadow warnings. r=glandium 2015-09-22 21:39:03 -07:00
Shu-yu Guo 64db2267cf Bug 1202902 - Mass replace toplevel 'let' with 'var' in preparation for global lexical scope. (rs=jorendorff) 2015-09-15 11:19:45 -07: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
Andrew McCreight ae06b3dd9d 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
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
Andrew McCreight 6e608d39d9 Bug 1058178, part 2 - Implement address clamping analysis for DMD scan logs. r=njn
This adds a new option --clamp-contents to dmd.py. This replaces every value
contained in the memory contents in the log with a pointer to the start of a live
block, if the value is a pointer into the middle of that block. All other values
are replaced with 0. This conservative analysis makes it easier to determine
which blocks point to other blocks.
2015-06-30 11:54:15 -07:00
Andrew McCreight 1f8cde6f73 Bug 1058178, part 1 - Implement DMD heap scanning mode. r=njn
This implements a new "scan" mode for DMD that records the address
and contents of every live unsampled block in the DMD log. This
enables the low-level analysis of references from one block to
another, which can help leak investigations.
2015-06-30 11:54:15 -07:00
Benoit Girard 8d6a67f6d3 Bug 1172216 - Move nsStackwalk to mozglue. r=glandium
--HG--
rename : xpcom/base/nsStackWalk.cpp => mozglue/misc/StackWalk.cpp
rename : xpcom/base/nsStackWalk.h => mozglue/misc/StackWalk.h
extra : commitid : EMbWGfjKvdq
extra : rebase_source : b7308eb569cc1a019d3b7a92aaff0de7a49b5682
2015-06-10 16:32:45 -04:00
Andrew McCreight e1908881c5 Bug 1172568 - Run test_dmd.js on OS X. r=njn 2015-06-10 07:24:00 -04:00
Andrew McCreight 2a29c1b921 Bug 1171647, part 2 - Remove redundant assertion for dark matter mode. r=njn 2015-06-06 14:44:19 -07:00
Andrew McCreight 7cb7fe1ebd Bug 1171647, part 1 - Define a new function to convert the mode to a string. r=njn 2015-06-06 14:44:19 -07:00
Mike Hommey 924c9eb636 Bug 1134923 - Remove NS_Alloc/NS_Realloc/NS_Free. r=nfroyd
They are kept around for the sake of the standalone glue, which is used
for e.g. webapprt, which doesn't have direct access to jemalloc, and thus
still needs a wrapper to go through the xpcom function list and get to
jemalloc from there.
2015-05-01 09:40:30 +09:00
ziyunfei e1db0f779e Bug 1102219 - Part 4: Replace `String.prototype.contains` with `String.prototype.includes` in chrome code. r=till 2015-04-30 00:32:05 +09:00
Jed Davis 5841b01411 Bug 1102388 - Fix DMD static constructor ordering dependency. r=mccr8
Sometimes, at least on Linux, DMDFuncs::sSingleton's static initializer
(in libxul) was being called before sDMDBridge's (in libdmd).
Thus sDMDBridge wasn't constructed yet in the path where its
address is taken, passed down through {replace_,}get_bridge to
ReplaceMallocBridge::Get, and its mVersion field is read.

This patch uses dynamic allocation, following what's done for other
globals in the same situation in this file.

Also, naming convention fix: leading "s" is for C++ class statics;
C-style static globals should be "g".

--HG--
extra : rebase_source : 4a6447760555aa11109749c612094ba1694b41f6
2015-04-20 23:05:00 +02:00
Jed Davis 83dc2d2c83 Bug 1128705 - Don't redefine PAGE_SIZE in DMD if it's already defined. r=erahm
--HG--
extra : rebase_source : 978b2d5440e448dec97affa98c8f5c712fcbb051
2015-04-20 14:15:00 +02:00
Ehsan Akhgari 883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Anish 4063a569ed Bug 958147 - Choose one of run-if or skip-if and get rid of the other.r=jmaher, mwargers 2015-03-03 08:46:37 -05:00
Chris Peterson a7dcfcca64 Bug 1129326 - Remove nonstandard let blocks from memory/replace/dmd/test/test_dmd.js. r=njn 2015-01-24 23:37:31 -08:00
Nicholas Nethercote a479e9ccad Bug 1121830 - DMD: add "num" property to blocks in the output. r=mccr8.
The new "num" property lets identical blocks be aggregated in the output. This
patch only uses the "num" property for dead blocks, because that's where the
greatest potential benefit lies, but it could be used for live blocks as well.

On one test case (a complex PDF file) running with --mode=cumulative
--sample-below=1 this patch had the following effects.

- Change in running speed was negligible.

- Compressed output file size dropped from 8.8 to 5.0 MB.

- Compressed output file size dropped from 297 to 50 MB.

- dmd.py runtime (without stack fixing) dropped from 30 to 8 seconds.

--HG--
extra : rebase_source : 46a32058cd5c31cd823fe3f1accb5e68bcd320f3
2015-01-15 20:38:38 -08:00
Nicholas Nethercote 059cf96c41 Bug 1122337 - Mark DMD directories as FAIL_ON_WARNINGS. r=glandium.
The DEFINES and XPCOM_API changes are needed to get rid of "inconsistent dll
linkage" warnings on Windows builds.

--HG--
extra : rebase_source : 00756f51ebee85c70f65d51dbac17b4835262697
2015-01-15 21:17:18 -08:00
Mike Hommey 2e083509f2 Bug 1120798 - Use a larger realloc in one of the DMD tests so that it passes for mozjemalloc as well as jemalloc3. r=njn 2015-01-14 15:18:49 +09:00
Nicholas Nethercote cdd9ba9d57 Bug 1088343 (part 2) - Enable test_dmd on Win64. r=glandium.
--HG--
extra : rebase_source : b85a5e35c71f44d7f615bc67863711a4876e9da4
2015-01-08 16:04:43 -08:00
Nicholas Nethercote 53da6fb716 Bug 1112968 - dmd.py: Tweak the --alloc-fns list for better effect on Windows. r=mccr8.
--HG--
extra : rebase_source : 3dc8a09f9a22bf234406c0ff89d7b4050c7908e7
2014-12-18 18:59:53 -08:00
Nicholas Nethercote 8030658f62 Bug 1112968 - dmd.py: Tweak the --alloc-fns list for better effect on Mac. r=mccr8.
--HG--
extra : rebase_source : 03dbab1eeb4e3f99672a174277ba634a39a98292
2014-12-17 19:10:59 -08:00
Nicholas Nethercote 658df429fc Bug 1110455 - Add --sort-by=num-blocks option to dmd.py. r=mccr8.
--HG--
extra : rebase_source : 6d6aa87f102ee069f4f5052607463380c656f80d
2014-12-15 15:04:39 -08:00
Nicholas Nethercote e358318e29 Bug 1111419 - dmd.py: add a cache for recordKeyParts. r=mccr8.
This reduces the runtime on my Linux machine for one large DMD output file from
235 seconds to 105 seconds.

--HG--
extra : rebase_source : bd567319c1207a09fa47b94571066109de1cc9e7
2014-12-15 15:04:34 -08:00
Ryan VanderMeulen 9a56a97e41 Backed out changesets 34a66a625618, 32db3daa20fe, and ac15ba8568c5 (bug 1102219) for Gaia unit test failures.
--HG--
extra : rebase_source : 0266cc0b2a6568ca653885745f381df8d6d167ec
2014-12-11 11:28:30 -05:00
ziyunfei 5f470bd4a1 Bug 1102219 - Part 3: Replace String.prototype.contains with String.prototype.includes in chrome code. r=till 2014-12-10 20:50:00 -05:00