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

344 Коммитов

Автор SHA1 Сообщение Дата
arthur.iakab 27754a7d12 Backed out 2 changesets (bug 1402282) for turning multiple browser chrome bugs into permafail
Backed out changeset db7059b57f92 (bug 1402282)
Backed out changeset cea1d44ac776 (bug 1402282)
2018-11-05 17:56:37 +02:00
Chris Martin 3824b0d43e Bug 1402282 - Change jemalloc to use secure random arena ids r=glandium
Previously the id for a new arena was just a counter that increased by one
every time. For hardening purposes, we want to make the new counter a secure
random ID, so an attacker will have a more difficult time finding the memory
they are looking for.

Differential Revision: https://phabricator.services.mozilla.com/D10158

--HG--
extra : moz-landing-system : lando
2018-11-05 00:27:31 +00:00
Noemi Erli 06a8cd8e3c Backed out changeset bee1c344cb47 (bug 1491909) for failures in browser/components/extensions/test/xpcshell/test_ext_geckoProfiler_control.js 2018-10-24 04:23:13 +03:00
Denis Palmeiro fc930ad16f Bug 1491909 - Add an AllocPolicy to mozilla::JSONWriter r=jwalden,mstange
JSONWriter currently calls new and delete indirectly through mozilla::MakeUnique to allocate a buffer.  Becuase of this, the methods of this class cannot be invoked within Spidermonkey due to https://searchfox.org/mozilla-central/source/config/check_vanilla_allocations.py#6-14.  Therefore, JSONWriter needs an AllocPolicy template parameter so that the allocation and deallocation routines can be changed to match the JS AllocPolicy when invoked within SpiderMonkey.

Differential Revision: https://phabricator.services.mozilla.com/D7279

--HG--
extra : moz-landing-system : lando
2018-10-23 20:46:31 +00:00
Randell Jesup 0f390bf1a5 Bug 1480430: Modify jemalloc to allow dynamic replacement r=glandium 2018-10-09 22:28:37 -04:00
Eric Rahm c5bb74ff5d Bug 1409739 - Part 1: Accept SmokeDMD when filtering test DMD stacks. r=njn
On some builds we only get 'SmokeDMD' references during testing rather than a full file path. This adds 'SmokeDMD' to the acceptable frame description list.

--HG--
extra : rebase_source : 475166fa6d1f241bf4d67cbdda1aab73000a5c3a
extra : intermediate-source : fcdc1d5eaf1a932992287074d0c91504dd7180d8
extra : source : 1192c15fc9347ccd6169dcb5bea81d7f2399e3fd
2018-10-01 16:38:17 -07:00
Cosmin Sabou 5a8eb92385 Backed out 3 changesets (bug 1409739) for causing Linux x64 ccov & fuzzing bustages. a=backout
Backed out changeset 387f946c7c48 (bug 1409739)
Backed out changeset 617288a6b2d9 (bug 1409739)
Backed out changeset fcdc1d5eaf1a (bug 1409739)
2018-10-03 20:29:42 +03:00
Eric Rahm 703da53d94 Bug 1409739 - Part 1: Accept SmokeDMD when filtering test DMD stacks. r=njn
On some builds we only get 'SmokeDMD' references during testing rather than a full file path. This adds 'SmokeDMD' to the acceptable frame description list.

--HG--
extra : source : 1192c15fc9347ccd6169dcb5bea81d7f2399e3fd
extra : intermediate-source : d39c2dfcc7004a4736436c564de239ba68b20c03
extra : histedit_source : 5a75a20f5b88481c994597da81fdbc29186aba3d%2C3f60f2bfbe54ab3843d4b18d66296cd4aadf4a30
2018-10-01 16:38:17 -07:00
Coroiu Cristina 7f6d72d2a2 Backed out 3 changesets (bug 1409739) for xpcshell failures at memory/replace/dmd/test/test_dmd.js
Backed out changeset dc3c5143ba4e (bug 1409739)
Backed out changeset e37ea5eb932a (bug 1409739)
Backed out changeset d39c2dfcc700 (bug 1409739)
2018-10-03 02:07:19 +03:00
Eric Rahm 6566498f9e Bug 1409739 - Part 1: Accept SmokeDMD when filtering test DMD stacks. r=njn
On some builds we only get 'SmokeDMD' references during testing rather than a full file path. This adds 'SmokeDMD' to the acceptable frame description list.

--HG--
extra : rebase_source : 2b1d2dbf8a3a538533554c6697f0e9ee51ec1bed
extra : source : 1192c15fc9347ccd6169dcb5bea81d7f2399e3fd
2018-10-01 16:38:17 -07:00
Gurzau Raul 4f0690bc0d Backed out 3 changesets (bug 1409739) for failing at /dmd/test/test_dmd.js on a CLOSED TREE
Backed out changeset 39c8abcf9cb2 (bug 1409739)
Backed out changeset c0da83c08b62 (bug 1409739)
Backed out changeset 1192c15fc934 (bug 1409739)
2018-10-02 18:43:32 +03:00
Eric Rahm 0196b4c2ca Bug 1409739 - Part 1: Accept SmokeDMD when filtering test DMD stacks. r=njn
On some builds we only get 'SmokeDMD' references during testing rather than a full file path. This adds 'SmokeDMD' to the acceptable frame description list.

--HG--
extra : rebase_source : 147e62e22248971980d95fe211c86116a98cbdf4
2018-10-01 16:38:17 -07:00
Tom Ritter 934ba40bb8 Bug 1480457-Correct typedef so it matches an earlier typedef r=aklotz
--HG--
extra : amend_source : c6796d3a8bb13939440b390ac9af11054b46dd15
2018-08-30 23:05:59 +03:00
Nicholas Nethercote b9e071e2e8 Bug 1481998 - Make mozilla::Hash{Map,Set}'s entry storage allocation lazy. r=luke,sfink
Entry storage allocation now occurs on the first lookupForAdd()/put()/putNew().
This removes the need for init() and initialized(), and matches how
PLDHashTable/nsTHashtable work. It also removes the need for init() functions
in a lot of types that are built on top of mozilla::Hash{Map,Set}.

Pros:

- No need for init() calls and subsequent checks.

- No memory allocated for empty tables, which are not that uncommon.

Cons:

- An extra branch in lookup() and lookupForAdd(), but not in put()/putNew(),
  because the existing checkOverloaded() can handle it.

Specifics:

- Construction now can take a length parameter.

- init() is removed. Explicit length-setting, when necessary, now occurs in the
  constructors.

- initialized() is removed.

- capacity() now returns zero when the entry storage is absent.

- lookupForAdd() is no longer `const`, because it can instantiate the storage,
  which requires modifications.

- lookupForAdd() can now return an invalid AddPtr in two cases:

  - old: hashing failure (due to OOM in the hasher)

  - new: OOM while instantiating entry storage

  The existing failure handling paths for the old case work for the new case.

- clear(), finish(), and clearAndShrink() are replaced by clear(), compact(),
  and reserve(). The old compactIfUnderloaded() is also removed.

- Capacity computation code is now in its own functions, bestCapacity() and
  hashShift(). setTableSizeLog2() is removed.

- uint32_t is used throughout for capacities, instead of size_t, for
  consistency with other similar values.

- changeTableSize() now takes a capacity instead of a deltaLog2, and it can now
  handle !mTable.

Measurements:

- Total source code size is reduced by over 900 lines. Also, lots of existing
  lines got shorter (i.e. two checks were reduced to one).

- Executable size barely changed, down by 2 KiB on Linux64. The extra branches
  are compensated for by the lack of init() calls.

- Speed changed negligibly. The instruction count for Bench_Cpp_MozHash
  increased from 2.84 billion to 2.89 billion but any execution time change was
  well below noise.
2018-08-10 18:00:29 +10:00
Masatoshi Kimura 3b21b7868b Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj
--HG--
extra : rebase_source : c09366fb93e5b0f72abe1e99d3094e3d96a934fb
extra : intermediate-source : 5950c9d63c3b4fd63a25464a7b50944aaec7079f
extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3
2018-07-31 22:10:07 +09:00
Cosmin Sabou de8c2bd891 Backed out changeset 5950c9d63c3b (bug 1090497) for build bustages on several files. CLOSED TREE 2018-08-02 19:59:53 +03:00
Masatoshi Kimura feea19030c Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj
--HG--
extra : rebase_source : a62521fdc66def4e4d5d7bf52e68365a786b5c55
extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3
2018-07-31 22:10:07 +09:00
Nicholas Nethercote a4cfd53308 Bug 1478879 - Remove Range/Enum use in DMD. r=mccr8
--HG--
extra : rebase_source : 19428e3d0d1b8676fe55be729b0e75d787086b6c
2018-07-27 12:21:01 +10:00
Nicholas Nethercote 6141e31ef4 Bug 1479954 - Rename Hash{Set,Map}::sizeOf{In,Ex}cludingThis(). r=luke
In PLDHashTable the equivalent functions have a "Shallow" prefix, which makes
it clear that they don't measure things hanging off the table. This patch makes
mozilla::Hash{Set,Map} do likewise.

MozReview-Commit-ID: 3kwCJynhW7d

--HG--
extra : rebase_source : 9c03d11f376a9fd4cfd5cfcdc0c446c00633b210
2018-08-01 09:57:52 +10:00
Nicholas Nethercote 6998f465ed Bug 1477626 - Use mozilla::HashTable instead of JS::HashTable in DMD. r=erahm
Also use mozilla::HashNumber where appropriate.

MozReview-Commit-ID: BTq0XDS5UfQ

--HG--
extra : rebase_source : 28f45a9b27e831e99620a2b575f373003f1301f2
2018-07-26 20:15:58 +10:00
Brian Hackett f6b8e6f81c Bug 1309552 - Specify buffer size when freeing data in AllocPolicy, r=waldo.
--HG--
extra : rebase_source : f4e2d9f8831cf41c19d592ce252e87161f32250b
2018-07-20 23:58:34 +00:00
Eric Rahm ca834a09a7 Bug 1470268 - Add allocation filter to dmd.py. r=njn
This adds an '--allocation-filter' param that can be used to limit output to
only allocations that include the filter in their stack. For example:
  dmd.py --allocation-filter fontconfig dmd.json.gz
limits its output to just allocations that have an instance of 'fontconfig' in
in one of their stack frames.

--HG--
extra : rebase_source : 9ed34d5c7a6a2b76e96455e66b2e8196686ade16
2018-06-20 13:11:50 -07:00
Sylvestre Ledru 3e84d308c3 Bug 1464869 - Fix flake8/pep8 issue by hand in memory/ r=njn
MozReview-Commit-ID: 8bkhAB4g6rv

--HG--
extra : rebase_source : 623f4ed95d601b47878c910859f3b91e87897011
2018-05-25 23:27:02 -07:00
Sylvestre Ledru 21f28e8329 Bug 1464869 - Run autopep8 on memory/ r=njn
MozReview-Commit-ID: GzFGXZ8WLX5

--HG--
extra : rebase_source : 15b2f8fefaa4ee32a4f655086194202d9e82efb6
2018-05-25 23:16:07 -07:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Andreea Pavel 8469234a9f Bug 1461964 - removed mac 10.6 reference r=njn 2018-05-20 23:08:00 +03:00
David Major fa8d998487 Bug 1447795: Add even more UseItOrLoseIt to SmokeDMD.cpp 2018-04-01 09:37:42 -04:00
David Major 0fab6b57fc Bug 1447795 - Add some more UseItOrLoseIt to SmokeDMD.cpp. r=njn 2018-03-21 13:52:00 +02:00
Mike Hommey 61d75ea276 Bug 1442468 - Remove workaround for http://code.google.com/p/android/issues/detail?id=23203. r=froydnj
That NDK bug has been fixed since r8c, and we now require something more
recent than that. This effectively reverts the changes from bug 720621
and bug 734832.

--HG--
extra : rebase_source : 9ff76a790ec4135dc0172cfd0f11fc1ecef7df64
2018-03-01 15:15:02 +09:00
Florian Quèze c714053d73 Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
Kris Maglione 918ed6c474 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
2018-01-29 15:20:18 -08:00
Cosmin Sabou 9a65a40178 Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione 6476f95b13 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
2018-01-29 15:20:18 -08:00
Brindusan Cristian af8879d1eb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione c276bb9375 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
2018-01-29 15:20:18 -08:00
Marco Castelluccio 871dbb2b23 Bug 1403005 - Don't run memory/replace/logalloc/replay in coverage builds. r=glandium
--HG--
extra : rebase_source : b2f451d764f8efb92082d8b987e74744091bfe4c
2018-01-16 15:45:40 +01:00
Chris Peterson 37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08:00
Sylvestre Ledru 9bfe27d903 Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 7duJk2gSd4m

--HG--
extra : rebase_source : 7312fe276e561e8c034a5f6749774ae812727f9c
2017-12-07 22:09:15 +01:00
Mike Hommey c6b6415a7b Bug 1423512 - Remove unnecessary XPCOM_GLUE define in DMD. r=njn
This was added in bug 1122337 back when the stackwalker was still
in XPCOM, which it isn't anymore, so XPCOM_GLUE is not necessary
anymore.

--HG--
extra : rebase_source : e550671c26e250843d34cb2b83497c861225883f
2017-12-06 09:52:55 +09:00
David Major ad7ff3a791 Bug 1423287 - Simplify NtCurrentTeb() handling. r=njn 2017-12-06 09:36:00 -05:00
Mike Hommey 3f1f5c9fc2 Bug 1423114 - Remove moz_xposix_memalign and moz_xvalloc. r=njn
They are both infallible wrappers of posix_memalign and valloc.
There is also moz_xmemalign, which wraps memalign, which is mostly
always available as of bug 1402647.

None of them are actually used, but it's still desirable to at least
have one infallible variant, so keep moz_xmemalign and remove the other
two.

While here, we actually make both memalign and moz_xmemalign always
available.

--HG--
extra : rebase_source : 1c3ca4b3e3310543145f3181dfa4e764be1d6ff8
2017-12-05 17:34:19 +09:00
Narcis Beleuzu dfd58840d1 Backed out changeset 8a4050c7e0fd (bug 1423114) for bustages on memory/mozalloc/mozalloc.cpp r=backout on a CLOSED TREE 2017-12-06 00:27:11 +02:00
Mike Hommey 5f1f0bbdc4 Bug 1423114 - Remove moz_xposix_memalign and moz_xvalloc. r=njn
They are both infallible wrappers of posix_memalign and valloc.
There is also moz_xmemalign, which wraps memalign, which is always
available as of bug 1402647.

None of them are actually used, but it's still desirable to at least
have one infallible variant, so keep moz_xmemalign and remove the other
two.

While here, we actually make moz_xmemalign always available, since
memalign is always available.

--HG--
extra : rebase_source : 17300bc03a715e5d36b4b687f22050622c1c70c8
2017-12-05 17:34:19 +09:00
Mike Hommey b796bc0e6d Bug 1423000 - Run clang-format in memory/replace/logalloc. r=njn
--HG--
extra : rebase_source : 6372d6eb88bad9da824e6a2a99380554e1ae04f5
2017-12-05 08:28:32 +09:00
Mike Hommey 55b2629bb8 Bug 1423000 - Always log allocator function calls. r=njn
So far, logalloc has avoided logging calls that e.g. return null
pointers, but both to make the code more generic and to enable logging
of error conditions, we now log every call.

--HG--
extra : rebase_source : 5e41914552f44e330f8f9c12b34fd6d30fdf30a7
2017-11-30 07:55:12 +09:00
Mike Hommey c617c4a119 Bug 1423000 - Don't use a separate replace-malloc library for the minimal-logalloc test. r=njn
Instead, only register a minimal set of functions when an environment
variable is set.

--HG--
extra : rebase_source : 94f2403ed9afe2acab1f56714d60fb32401076dc
2017-12-03 13:59:16 +09:00
Mike Hommey 2ff212b9f9 Bug 1423000 - Use mozjemalloc mutexes in logalloc. r=njn
Instead of the chromium one, which required some tricks.

--HG--
extra : rebase_source : f2918c33ff5263f50b81ac4606aa0ab3059cdc36
2017-12-03 14:23:23 +09:00
Mike Hommey 938618a5e1 Bug 1423000 - Reject some more invalid logalloc replay logs. r=njn
For functions with no result, such as free, it's invalid for some string
to appear after the closing parenthesis.

--HG--
extra : rebase_source : d7a72c064c408ba9c4a8722ebbaafb878633e857
2017-11-30 10:33:18 +09:00
Mike Hommey c142d8c12f Bug 1423000 - Move MemSlot lookup for replay results into the Replay methods. r=njn
This allows all methods to have the same signature.

--HG--
extra : rebase_source : 6c6e952d00ba5f92c2cf368fa871e8979f640780
2017-11-30 10:31:25 +09:00
Mike Hommey 94fe24fd79 Bug 1423000 - Count jemalloc_stats as an operation. r=njn
While jemalloc_stats is not actively doing anything, it can be
cumbersome to not have it count as an operation, because the operation
count shown on jemalloc_stats doesn't match the line number in the input
replay log, and the offset grows as the number of jemalloc_stats
operations grows.

While here, also update a comment about the replay log format.

--HG--
extra : rebase_source : da0ad9a990487ebdfadae7f8fcfad85e82b482fc
2017-11-30 10:18:39 +09:00