Commit Graph

464 Commits

Author SHA1 Message Date
Mitchell Hentges
304c8d6362 Bug 1706774: Adds required sources for the "memory" application r=firefox-build-system-reviewers,glandium
Replay, moajemalloc_info, phc, and memory needed additional
pieces (mostly Printf.cpp and dependencies) to build
successfully on Windows.

Depends on D114651

Differential Revision: https://phabricator.services.mozilla.com/D114652
2021-05-18 15:00:39 +00:00
Paul Bone
4bebc672ca Bug 1671114 - pt 7. Make an ambigious comment clearer r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D113946
2021-05-18 06:33:49 +00:00
Paul Bone
1d1cea24f3 Bug 1671114 - pt 6. Use default values for Replay members r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D104178
2021-05-18 06:33:49 +00:00
Paul Bone
fb1e0178af Bug 1671114 - pt 5. Optionally touch memory as its allocated r=glandium
By touching memory when we allocate it our RSS will more accurately
represent Firefox's memory usage.

Differential Revision: https://phabricator.services.mozilla.com/D98286
2021-05-18 06:33:48 +00:00
Paul Bone
303f9012b3 Bug 1671114 - pt 4. Calculate and report RSS in jemalloc-replay r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D94259
2021-05-18 06:33:48 +00:00
Paul Bone
21c58acf30 Bug 1671114 - pt 3. Allow open/close state for FdReader r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D104177
2021-05-18 06:33:48 +00:00
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
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
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
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
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
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
Dorel Luca
1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart
50762dacab 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. 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-21 21:27:27 +00:00
Petr Sumbera
fd342d7126 Bug 1671623 - don't overloaded log10 r=pbone
Differential Revision: https://phabricator.services.mozilla.com/D93762
2020-10-19 06:42:45 +00:00
Paul Bone
e09c34ec99 Bug 1656155 - pt 7. Add slop histograms r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D88705
2020-10-08 22:35:59 +00:00
Paul Bone
de7f32735e Bug 1656155 - pt 6. Add slop information to Replay.cpp r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D88403
2020-10-08 22:44:38 +00:00
Paul Bone
6655819c99 Bug 1656155 - pt 5. Add bin-stats to the memory replay tool r=glandium
Add more format specifiers to FdPrintf: %, s and add width and precision
specifiers.

Differential Revision: https://phabricator.services.mozilla.com/D87829
2020-10-08 22:44:00 +00:00
Paul Bone
46597c49d2 Bug 1656155 - pt 2. Provide bin usage stats in jemalloc_stats r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D85726
2020-10-08 22:42:45 +00:00
Gerald Squelart
782cf5d3ad Bug 1657033 - Use Span<const char> in JSONWriter - r=froydnj
In most situations, JSONWriter users already know string lengths (either directly, or through `nsCString` and friends), so we should keep this information through JSONWriter and not recompute it again.
This also allows using JSONWriter with sub-strings (e.g., from a bigger buffer), without having to create null-terminated strings.

Public JSONWriter functions have overloads that accept literal strings.

Differential Revision: https://phabricator.services.mozilla.com/D86192
2020-09-14 02:33:20 +00:00
Sylvestre Ledru
9c192aa9ca Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D88713
2020-08-31 09:23:02 +00:00
Mihai Alexandru Michis
261d01524b Backed out changeset d0f173a90792 (bug 1519636) for causing bustages.
CLOSED TREE
2020-08-31 10:14:58 +03:00