Commit Graph

1438 Commits

Author SHA1 Message Date
Paul Bone
5bff886648 Bug 1671114 - pt 2. Speed up replay of jemalloc_stats calls r=glandium
Calculate the distributions of memory requests in a single pass.

Differential Revision: https://phabricator.services.mozilla.com/D93724
2021-05-18 06:33:47 +00:00
Paul Bone
fd20b8a605 Bug 1671114 - pt 1. Report committed memory in logalloc-replay r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D93473
2021-05-18 06:33:47 +00:00
Sandor Molnar
6ceb5f92a7 Backed out 10 changesets (bug 1696531) for causing mochitest failures in TypeError: cannot use a string pattern on a bytes-like object. CLOSED TREE
Backed out changeset abc85e3c21b0 (bug 1696531)
Backed out changeset 82445e26060e (bug 1696531)
Backed out changeset 97771570e425 (bug 1696531)
Backed out changeset c3f229148f6c (bug 1696531)
Backed out changeset 9557ff3065bc (bug 1696531)
Backed out changeset 98d17a5f6886 (bug 1696531)
Backed out changeset b0eee4af2caf (bug 1696531)
Backed out changeset 544be24f74be (bug 1696531)
Backed out changeset ddcc795bf838 (bug 1696531)
Backed out changeset e5e76f56ceb9 (bug 1696531)
2021-05-06 23:57:56 +03:00
Ben Hearsum
16e50ef8ae Bug 1696531: fix dmd.py and related tools to support python 3 r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D109731
2021-05-06 19:51:34 +00:00
Alexandre Lissy
32332226a9 Bug 1683288 - Directly query OOMAllocationSize value and enable tests on linux/macOS r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D114009
2021-04-30 20:10:58 +00:00
Mike Hommey
6a41d8d7ad Bug 1515229 - Make MozStackWalk/MozWalkTheStack frame skipping more reliable. r=gerald,nika,bobowen,jld
Differential Revision: https://phabricator.services.mozilla.com/D110899
2021-04-16 04:06:02 +00:00
Butkovits Atila
8255e3083f Backed out changeset 5c6b15fcea71 (bug 1515229) for causing GTest failures. CLOSED TREE 2021-04-15 13:37:29 +03:00
Mike Hommey
2eacd46d46 Bug 1515229 - Make MozStackWalk/MozWalkTheStack frame skipping more reliable. r=gerald,nika,bobowen,jld
Differential Revision: https://phabricator.services.mozilla.com/D110899
2021-04-14 22:31:36 +00:00
Bogdan Tara
4de76f4cdf Backed out 8 changesets (bug 1696531) for test_dmd.js and test_subprocess.js xpc failures CLOSED TREE
Backed out changeset 907102743c5f (bug 1696531)
Backed out changeset c631966a64c0 (bug 1696531)
Backed out changeset 754ce2bf288a (bug 1696531)
Backed out changeset 7129c9cfe519 (bug 1696531)
Backed out changeset dba2bea61b29 (bug 1696531)
Backed out changeset 33f3e86a5ce8 (bug 1696531)
Backed out changeset 7dcbb17a1578 (bug 1696531)
Backed out changeset 1f982303513f (bug 1696531)
2021-04-14 17:49:29 +03:00
Ben Hearsum
42620225bf Bug 1696531: fix dmd.py and related tools to support python 3 r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D109731
2021-04-14 13:54:24 +00:00
smolnar
22c6eb14ba Backed out changeset f7b0cdc3aeb0 (bug 1515229) for causing xpc failures in test_feature_stackwalking. CLOSED TREE 2021-04-14 12:25:37 +03:00
Mike Hommey
133396cb94 Bug 1515229 - Make MozStackWalk/MozWalkTheStack frame skipping more reliable. r=gerald,nika,bobowen,jld
Differential Revision: https://phabricator.services.mozilla.com/D110899
2021-04-14 04:47:09 +00:00
Butkovits Atila
8b7a0827b5 Backed out 7 changesets (bug 1696531) for causing mochitest failures complaining about arguments.
Backed out changeset 52ba6bf74b55 (bug 1696531)
Backed out changeset c907d8324bcc (bug 1696531)
Backed out changeset 1f7ffffa368f (bug 1696531)
Backed out changeset 5002c2053444 (bug 1696531)
Backed out changeset 0b8c56f2f5c3 (bug 1696531)
Backed out changeset a8d8adae39b6 (bug 1696531)
Backed out changeset a7f9bd32a4c9 (bug 1696531)
2021-04-12 20:48:48 +03:00
Ben Hearsum
df62fb3800 Bug 1696531: fix dmd.py and related tools to support python 3 r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D109731
2021-04-12 16:31:21 +00:00
Simon Giesecke
760cc7e936 Bug 1679522 - Fix include directives and forward declarations. r=andi,necko-reviewers,jgilbert
- Add missing include directives and forward declarations.
- Remove some extra include directives.
- Add missing namespace qualifications.
- Move include directives out of namespace in toolkit/xre/GlobalSemaphore.h

Differential Revision: https://phabricator.services.mozilla.com/D98894
2021-03-25 10:19:44 +00:00
Brindusan Cristian
2586a80626 Backed out changeset d47a138a3b50 (bug 1668903) for causing xpcshell failures. CLOSED TREE 2021-03-24 23:22:21 +02:00
Emilio Cobos Álvarez
9d7bb1aa62 Bug 1668903 - Port dmd.py to python3. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D98927
2021-03-24 20:45:56 +00:00
Mike Hommey
4e512a5e67 Bug 1699321 - Avoid DMD crashes on Windows debug builds. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D109425
2021-03-22 22:50:25 +00:00
Mike Hommey
4d8e18962b Bug 1699375 - Move WalkTheStack to mozglue. r=nika
A long standing issue is that MOZ_ASSERT and related don't print stack
traces in debug builds when they're directly or indirectly emitted from
non-libxul code. Moving WalkTheStack to mozglue alleviates the problem.

It's also not printing stack traces when emitted from C code (and for
some C third party libraries, we do redirect assert to MOZ_ASSERT),
which we solve by making the corresponding API available without C++
(which WalkTheStack being a static method of the nsTraceRefCnt class
didn't allow, or the use of a closure on Android).

This requires some adjustements to headers that indirectly assume that
Assertions.h includes ErrorList.h through nsError.h through nscore.h
through nsTraceRefcnt.h.

We also remove TestStackCrawl.cpp because it hasn't been built since
bug 158528, 19 years ago.

Differential Revision: https://phabricator.services.mozilla.com/D108913
2021-03-22 21:25:30 +00:00
Mike Hommey
ec7f538e0c Bug 1698719 - Remove aSkipFrames argument to both FramePointerStackWalk and MozStackWalkThread. r=gsvelto,gerald
In the case of FramePointerStackwalk, the caller gives a pointer to the
top-most frame to walk from. There isn't really a reason to give a
number of frames to skip, as the right frame pointer could be given in
the first place if that was really necessary. And in practice, it's
hasn't been used so far.

In the case of MozStackWalkThread, the caller presumably doesn't know
what the thread the stack is being walked for is doing, and it would be
a guesswork to pass a valid number of frames to skip. In practice, it's
also not used.

The aSkipFrames is already a footgun on MozStackWalk (and we're going to
change that in bug 1515229), we don't need to keep a footgun on these
other stack walking methods.

Differential Revision: https://phabricator.services.mozilla.com/D108563
2021-03-17 00:21:39 +00:00
Mike Hommey
9c0fcac97c Bug 1690167 - Change VsprintfLiteral/SprintfLiteral to rely on PrintfTarget. r=nika,Gankra,firefox-build-system-reviewers,mhentges
Instead of snprintf.

Because some standalone code uses those functions directly or indirectly,
and PrintfTarget lives in mozglue, they now need to depend on mozglue
instead of mfbt. Except logalloc/replay, which cherry-picks what it
uses, and the updater, for which we keep using vsnprintf.

Differential Revision: https://phabricator.services.mozilla.com/D103730
2021-03-10 23:52:40 +00:00
Connor Sheehan
aee8b3248c Bug 1695293: include replace_malloc.mozbuild in mozbuild file for mozjemalloc_info r=firefox-build-system-reviewers,mhentges,nalexander
The memory project needs this file to avoid hitting linker errors.

Differential Revision: https://phabricator.services.mozilla.com/D107530
2021-03-10 14:43:10 +00:00
Sylvestre Ledru
4edd85cc9b Bug 1519636 - Reformat recent changes to the Google coding style r=necko-reviewers,valentin
Updated with clang-format version 11.0.1 (taskcluster-B6bdwSKDRF-luRQWXBuzpA)

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D106920
2021-03-02 16:14:46 +00:00
Marco Castelluccio
50efad8d07 Bug 1695331 - Disable memory/replace/logalloc/replay in ccov fuzzing builds. r=calixte DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D106777
2021-03-01 15:41:15 +00:00
Marco Castelluccio
ca6a10dd3e Bug 1693786 - Run memory/replace/logalloc/replay on ccov builds since it no longer fails. r=glandium DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D105748
2021-02-26 08:18:24 +00:00
Marco Castelluccio
97bb51e783 Bug 1693793 - Enable some jemalloc tests that were erroneusly disabled on ccov builds. r=glandium DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D105749
2021-02-26 08:17:39 +00:00
Andreea Pavel
64289058b6 Backed out 5 changesets (bug 1690167) for failing xpcshell at bootstrapSvc.js on a CLOSED TREE
Backed out changeset d28c0f11743f (bug 1690167)
Backed out changeset 3b2bebed9128 (bug 1690167)
Backed out changeset 7e925e90a251 (bug 1690167)
Backed out changeset f85934a2b7ad (bug 1690167)
Backed out changeset 6d83474e81bb (bug 1690167)
2021-02-17 07:10:58 +02:00
Mike Hommey
622b111f9e Bug 1690167 - Change VsprintfLiteral/SprintfLiteral to rely on PrintfTarget. r=nika,Gankra,firefox-build-system-reviewers,mhentges
Instead of snprintf.

Because some standalone code uses those functions directly or indirectly,
and PrintfTarget lives in mozglue, they now need to depend on mozglue
instead of mfbt. Except logalloc/replay, which cherry-picks what it
uses.

Differential Revision: https://phabricator.services.mozilla.com/D103730
2021-02-16 21:20:04 +00:00
Mihai Alexandru Michis
9154148880 Backed out 4 changesets (bug 1690167) for causing cppunit failures in TestIntegerPrintfMacros.
CLOSED TREE

Backed out changeset 27dee66eba83 (bug 1690167)
Backed out changeset cfffb092a39f (bug 1690167)
Backed out changeset 87b2a2a66fd9 (bug 1690167)
Backed out changeset cac4879f50b4 (bug 1690167)
2021-02-13 00:07:00 +02:00
Mike Hommey
47675f5460 Bug 1690167 - Change VsprintfLiteral/SprintfLiteral to rely on PrintfTarget. r=nika,Gankra,firefox-build-system-reviewers,mhentges
Instead of snprintf.

Because some standalone code uses those functions directly or indirectly,
and PrintfTarget lives in mozglue, they now need to depend on mozglue
instead of mfbt. Except logalloc/replay, which cherry-picks what it
uses.

Differential Revision: https://phabricator.services.mozilla.com/D103730
2021-02-12 20:21:50 +00:00
Emilio Cobos Álvarez
5c86c09175 Bug 1682556 - Increase vm_copy() threshold. r=glandium
The current implementation is a regression on microbenchmarks that
reallocate allocations that go over gPageSize * 32 compared to memcpy().

Differential Revision: https://phabricator.services.mozilla.com/D100217
2020-12-23 01:35:22 +00:00
Paul Bone
788a04db2c Bug 1682204 - Clear arena_t::mId in the constructor r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D99638
2020-12-17 23:24:53 +00:00
Cristina Coroiu
8994f0036c Backed out changeset f12f5989419a (bug 1670885) for causing frequent failures for bug 1682467 on a CLOSED TREE 2020-12-16 15:49:51 +02:00
Gabriele Svelto
ff41ce10e1 Bug 1670885 - Replace deprecated NSSpinLocks with os_unfair_locks in the memory allocator r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D99280
2020-12-14 15:53:41 +00:00
Emilio Cobos Álvarez
71926eea81 Bug 1681003 - When realloc() grows an allocation, allow switching out of public arenas if plain malloc() would've done that. r=glandium
Otherwise we may grow thread-local arenas a lot.

Differential Revision: https://phabricator.services.mozilla.com/D98924
2020-12-10 10:59:09 +00:00
David Major
785368780a Bug 1681243 - Use noexcept on arena_t's fallible allocator, even on Windows r=glandium
In clang-cl builds, thanks to clang-cl's defining of `_MSC_VER`, this function was not marked `noexcept`. This led clang to believe that it could call `arena_t`'s constructor without checking for null.

I suppose we could scope the condition down to real MSVC, but since we don't support that anymore, we can just stop checking.

Differential Revision: https://phabricator.services.mozilla.com/D99137
2020-12-09 14:10:26 +00:00
Emilio Cobos Álvarez
22f8edff88 Bug 1681075 - Manually inline arena_salloc. r=glandium
It's small and only has one caller.

Differential Revision: https://phabricator.services.mozilla.com/D98923
2020-12-09 08:19:49 +00:00
Emilio Cobos Álvarez
2a038173c3 Bug 1681075 - Deduplicate some common code in Ralloc. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D98922
2020-12-08 11:24:10 +00:00
Mike Hommey
14c1084f72 Bug 1679938 - Don't recurse the build into mfbt for projects that don't need it. r=firefox-build-system-reviewers,mhentges
While all toolkit and js-based projects make use of mfbt, some others,
like tools/crashreporter and tools/update-packaging, don't.

So instead of including mfbt from the top-level directory, include it
from the relevant project top-level mozbuilds.

This allows to remove the dependency on mfbt files in the hash for the
minidump-stackwalk and mar-tools toolchains.

Differential Revision: https://phabricator.services.mozilla.com/D98378
2020-12-01 23:52:03 +00:00
Paul Bone
96d3e53990 Bug 1670188 - pt 2. Add a tool that prints the run lengths for size classes r=glandium
This new program prints the jemalloc configuration, it is only built for
--enable-project=memory

Differential Revision: https://phabricator.services.mozilla.com/D93184
2020-11-20 03:33:57 +00:00
Paul Bone
790088fdb7 Bug 1670188 - pt 1. Update run size table on arena_bin_t:Init r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D93183
2020-11-11 05:21:25 +00:00
David Major
dc2575e011 Bug 1677726 - Disable LTO for SmokeDMD.cpp r=andi
Sheriff note: We should keep this regardless of whether bug 1675600 sticks.

The comment above SmokeDMD's `RunTests()` says "This test relies on the compiler not doing various optimizations ... So we compile it with -O0 (or equivalent)".

That suggests that LTO should also be disallowed.

Differential Revision: https://phabricator.services.mozilla.com/D97336
2020-11-18 16:08:31 +00:00
David Major
6e260b8d5a Bug 1677893 - CONFIG["CXX_TYPE"] is not a thing r=firefox-build-system-reviewers,andi,mhentges
Due to lack of `CXX_TYPE`, clang-cl builds were accidentally taking the `else` branch where the `-O0` was ignored/unrecognized. This went unnoticed for a long time until it busted the landing of bug 1677726.

While here, fix the intent of SmokeDMD: `-Og-` is a silent no-op in clang-cl, so it's not actually disabling anything.

Differential Revision: https://phabricator.services.mozilla.com/D97387
2020-11-18 16:01:23 +00:00
Bogdan Tara
5a09a3c8ce Backed out changeset 1305b74f1c0b (bug 1677726) for SmokeDMD.obj related bustage CLOSED TREE
DONTBUILD
2020-11-18 02:49:01 +02:00
David Major
e631afd3ae Bug 1677726 - Disable LTO for SmokeDMD.cpp r=andi
Sheriff note: We should keep this regardless of whether bug 1675600 sticks.

The comment above SmokeDMD's `RunTests()` says "This test relies on the compiler not doing various optimizations ... So we compile it with -O0 (or equivalent)".

That suggests that LTO should also be disallowed.

Differential Revision: https://phabricator.services.mozilla.com/D97336
2020-11-17 16:56:18 +00:00
Sylvestre Ledru
9bfd4073b2 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D95434
2020-11-04 18:46:00 +00:00
Ricky Stewart
02a7b4ebdf Bug 1654103: Standardize on Black for Python code in mozilla-central.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara
da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart
c0cea3b0fa Bug 1654103: Standardize on Black for Python code in mozilla-central. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Mike Hommey
6d9ed07aa6 Bug 1672867 - Silence warning about aligned_alloc only being available on macOS 10.15 or newer. r=firefox-build-system-reviewers,mhentges
This warning turns into an error on automation, and is only due to the
fact that newer SDKs have a declaration for it with a version guard, but
we're actually using our own definition of the function, so whether it's
available in older versions of macOS is irrelevant.

Differential Revision: https://phabricator.services.mozilla.com/D94512
2020-10-22 23:16:23 +00:00