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

1565 Коммитов

Автор SHA1 Сообщение Дата
Ray Kraesig 44a45dc8a5 Bug 1716727 - [2/3] OOM handling: stall and retry r=glandium,gsvelto
Implement a drop-in-replacement wrapper for `VirtualAlloc` which, rather
than returning immediately on failure, instead `::Sleep()`s and retries.

This will cause performance regressions in some (presumed-uncommon)
circumstances; this wrapper is therefore only enabled in Nightly, to
collect data on its efficacy and on the severity of those regressions.

Differential Revision: https://phabricator.services.mozilla.com/D150619
2022-07-27 19:54:36 +00:00
Ray Kraesig ca8b982e11 Bug 1716727 - [1/3] Drive-by cleanup: clang-tidy nitpicks r=glandium
Some trivially-resolvable nitpicks pointed out by clang-tidy.

Differential Revision: https://phabricator.services.mozilla.com/D150618
2022-07-27 19:54:35 +00:00
Butkovits Atila 1402637e8b Backed out 3 changesets (bug 1716727) for causing build bustages. CLOSED TREE
Backed out changeset 11fb3262cccb (bug 1716727)
Backed out changeset 895ad6545236 (bug 1716727)
Backed out changeset c0fd4f429cd8 (bug 1716727)
2022-07-27 04:01:16 +03:00
Ray Kraesig 4ec2a2d0b4 Bug 1716727 - [3/3] make stalling behavior conditional on process type r=glandium
For now, make Set_XREProcessType set a flag in mozjemalloc to avoid
stalling repeatedly in auxiliary processes.

Differential Revision: https://phabricator.services.mozilla.com/D151332
2022-07-27 00:30:04 +00:00
Ray Kraesig 55f93cc62f Bug 1716727 - [2/3] OOM handling: stall and retry r=glandium,gsvelto
Implement a drop-in-replacement wrapper for `VirtualAlloc` which, rather
than returning immediately on failure, instead `::Sleep()`s and retries.

This will cause performance regressions in some (presumed-uncommon)
circumstances; this wrapper is therefore only enabled in Nightly, to
collect data on its efficacy and on the severity of those regressions.

Differential Revision: https://phabricator.services.mozilla.com/D150619
2022-07-27 00:30:04 +00:00
Ray Kraesig 1b26c65a01 Bug 1716727 - [1/3] Drive-by cleanup: clang-tidy nitpicks r=glandium
Some trivially-resolvable nitpicks pointed out by clang-tidy.

Differential Revision: https://phabricator.services.mozilla.com/D150618
2022-07-27 00:30:03 +00:00
Paul Bone 7a49f8892c Bug 1742828 - Enable more aggressive allocation packing on MacOS r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D139800
2022-07-26 23:54:17 +00:00
Tooru Fujisawa bf93d07148 Bug 1667455 - Part 5: Stop importing Services.jsm from chrome-priv JS code, top-level single-line cases. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,extension-reviewers,application-update-reviewers,pip-reviewers,twisniewski,m_kato,jdescottes,mconley,AlexandruIonescu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D150894
2022-07-11 12:41:50 +00:00
Ray Kraesig 1f4a9dd483 Bug 1207753 - add thread-safety annotations to memory/build's Mutex types r=glandium,jesup
Add the customary bevy of thread-safety annotations to the Mutex types
in memory/build.

Almost all existing instances of these Mutexes are already marked with
MOZ_UNANNOTATED, but this turns out not to matter: MOZ_UNANNOTATED has
no equivalent under clang's `-Wthread-safety` attributes. There are no
variables declared to be guarded by these mutexes, but they must still
be unlocked and relocked in principled ways -- or, alternatively, only
have unverifiable actions taken in appropriately-annotated code.

The primary offenders here are the `pthread_atfork` hooks; these can't
all be annotated precisely (and couldn't be checked even if they were),
so we simply mark them all as unanalyzable. The only other warning is
from a highly unusual (but already well-commented) bit in PHC.cpp where
we manually release an autolocked mutex before crashing.

Differential Revision: https://phabricator.services.mozilla.com/D150519
2022-07-08 21:24:03 +00:00
Gabriele Svelto 7e8fda1a8b Bug 1774458 - Use undocumented, non-public adaptive spinlocks on macOS 10.15+, revert to user-space spinlocks on older versions r=pbone
Differential Revision: https://phabricator.services.mozilla.com/D149599
2022-07-04 14:00:11 +00:00
smolnar 1ae6fdb86e Backed out changeset 6d913c78ba72 (bug 1207753) for causing build bustages in memory/replace/logalloc/LogAlloc.cpp CLOSED TREE 2022-06-30 20:44:00 +03:00
Ray Kraesig ec7d45d247 Bug 1207753 - add thread-safety annotations to memory/build's Mutex types r=glandium,jesup
Add the customary bevy of thread-safety annotations to the Mutex types
in memory/build.

Almost all existing instances of these Mutexes are already marked with
MOZ_UNANNOTATED, so there's not much else required for this patch. The
sole exception is a highly unusual (but already well-commented) bit in
PHC.cpp where we manually release an autolocked mutex before crashing.

Differential Revision: https://phabricator.services.mozilla.com/D150519
2022-06-30 17:25:28 +00:00
Andrew McCreight 17068ff57b Bug 1776103 - Clean up DMD docs. r=xpcom-reviewers,nika DONTBUILD
I went through the docs and fixed up a few things. I also removed the other
version that was imported under XPCOM, updated a few obsolete MDN links that
now have updated docs, and deleted some ancient Bonsai links.

Differential Revision: https://phabricator.services.mozilla.com/D150504
2022-06-29 21:41:04 +00:00
Ryan VanderMeulen 357cb02321 Bug 1776455 - Don't define unused functions on Windows. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D150444
2022-06-29 13:18:22 +00:00
Bogdan Szekely b1f7582841 Backed out changeset 910652b53350 (bug 1774458) for causing build bustages on Mutex.cpp CLOSED TREE 2022-06-29 11:28:41 +03:00
Gabriele Svelto 6896218e59 Bug 1774458 - Use undocumented, non-public adaptive spinlocks on macOS 10.15+, revert to user-space spinlocks on older versions r=pbone
Differential Revision: https://phabricator.services.mozilla.com/D149599
2022-06-29 08:13:29 +00:00
Ray Kraesig fc7c4cd2b1 Bug 1776898: Add additional filtering capabilities to dmd.py r=mccr8
Extend dmd.py's filtering capabilities by allowing both multiple filters
and negated filters.

Differential Revision: https://phabricator.services.mozilla.com/D150481
2022-06-28 23:30:24 +00:00
Marian-Vasile Laza 6f25bc857b Backed out changeset ecea89cb3d35 (bug 1774458) for crashing on macOS 10.14 and older. CLOSED TREE 2022-06-24 01:56:51 +03:00
Gabriele Svelto de07e630cc Bug 1774458 - Use undocumented, non-public adaptive spinlocks on macOS r=pbone
Differential Revision: https://phabricator.services.mozilla.com/D149599
2022-06-23 20:45:03 +00:00
Gabriele Svelto 8f9904bb76 Bug 1670885 - Replace deprecated NSSpinLocks with os_unfair_locks in the memory allocator r=glandium
Depends on D148287

Differential Revision: https://phabricator.services.mozilla.com/D99280
2022-06-07 07:37:20 +00:00
Gabriele Svelto f56fb96281 Bug 1670885 - Fix post-fork() handlers for PHC/LogAlloc to work on macOS using unfair locks r=glandium
macOS unfair locks enforce that a lock can only be released by the thread which locked it.

On macOS 11+ this caused the fork()'d child process to raise a SIGILL signal. Confusingly enough this behavior seems to be different on macOS 10.15 and possibly interacted in odd ways with our exception handler if it was installed before fork()-ing.

Differential Revision: https://phabricator.services.mozilla.com/D148287
2022-06-07 07:37:20 +00:00
Serge Guelton 7648a84eba Bug 1765593 - Cleanup mozilla-unified includes r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D144202
2022-05-03 14:57:45 +00:00
Randell Jesup fcaf70841e Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 18:47:08 +00:00
Noemi Erli 2390d257e6 Backed out changeset 12a59e5a50bf (bug 1207753) for causing build bustage CLOSED TREE 2022-03-16 18:32:51 +02:00
Randell Jesup 4b033a5256 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 16:16:14 +00:00
Butkovits Atila 927ad62c6a Backed out changeset a68ee4b09f92 (bug 1207753) for causing Hazard bustages. CLOSED TREE 2022-03-16 14:38:14 +02:00
Randell Jesup 7d4b5fae04 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 12:01:14 +00:00
Zhao Jiazhong 62341514c5 Bug 1756570 - [loong64] Add basic build support for LoongArch64 port. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D139567
2022-02-25 03:42:34 +00:00
Mike Hommey 1acc37c7a6 Bug 1747756 - Move Windows system libraries from LIBS to moz.build. r=firefox-build-system-reviewers,mhentges
While mingw builds don't require user32 and advapi32 explicitly, it doesn't
hurt for them to be there (and they're required for clang-cl build).
Likewise, while clang-builds don't require uuid and userenv explicitly
because they're pulled in via #pragmas in the source code, mingw doesn't
support those #pragmas and needs them explicitly, which doesn't hurt the
clang-cl builds.

Differential Revision: https://phabricator.services.mozilla.com/D134737
2021-12-30 20:56:43 +00:00
Iulian Moraru b469802d84 Backed out changeset 7f9b4b6191ad (bug 1747756) for causing multiple failures. CLOSED TREE 2021-12-30 01:59:26 +02:00
Mike Hommey cb50a5444f Bug 1747756 - Move Windows system libraries from LIBS to moz.build. r=firefox-build-system-reviewers,mhentges
While mingw builds don't require user32 and advapi32 explicitly, it doesn't
hurt for them to be there (and they're required for clang-cl build).
Likewise, while clang-builds don't require uuid and userenv explicitly
because they're pulled in via #pragmas in the source code, mingw doesn't
support those #pragmas and needs them explicitly, which doesn't hurt the
clang-cl builds.

Differential Revision: https://phabricator.services.mozilla.com/D134737
2021-12-29 22:18:52 +00:00
Paul Bone bf37baf4e4 Bug 1743713 - Fix a warning for FdPrintf in PHC r=glandium
For a unified it is possible to include FdPrintf.cpp before FdPrintf.h which
creates a compilation warning for FdPrintf's attributes.  FdPrintf.cpp
should include FdPrintf.h so that the declaration always precedes the
definition.

Depends on D132913

Differential Revision: https://phabricator.services.mozilla.com/D132914
2021-12-07 22:27:21 +00:00
Paul Bone a83c4f05dd Bug 1743713 - Make --enable-project=memory work again r=glandium
Fix the reported error in Bug 1743713 plus a linker error.

Differential Revision: https://phabricator.services.mozilla.com/D132913
2021-12-07 22:27:20 +00:00
Chris Peterson f6fdbf028a Bug 1738401 - Remove -Wno-shadow warning suppressions. r=firefox-build-system-reviewers,glandium
-Wshadow warnings are not enabled globally, so these -Wno-shadow suppressions have no effect. I had intended to enable -Wshadow globally along with these suppressions in some directories (in bug 1272513), but that was blocked by other issues.

There are too many -Wshadow warnings (now over 2000) to realistically fix them all. We should remove all these unnecessary -Wno-shadow flags cluttering many moz.build files.

Differential Revision: https://phabricator.services.mozilla.com/D132289
2021-12-01 06:40:04 +00:00
Gian-Carlo Pascutto 1d45775e8c Bug 1546442 - Add test for leading guard pages for normal allocations. r=glandium,pbone
Differential Revision: https://phabricator.services.mozilla.com/D132006
2021-11-26 11:46:25 +00:00
Gian-Carlo Pascutto b936d4f576 Bug 1546442 - Leading guard pages for normal allocations. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D28516
2021-11-26 11:46:25 +00:00
Paul Bone 9a5f36b0dd Bug 1735482 - Don't use a QuantumWide size class on MacOS r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D131576
2021-11-23 02:01:59 +00:00
Iulian Moraru 6cab1c251e Backed out changeset 85fdbf7e368a (bug 1735482) for causing OS X build bustages on mozjemalloc.cpp. CLOSED TREE 2021-11-22 19:01:35 +02:00
Paul Bone f7d8d8c80e Bug 1735482 - Don't use a QuantumWide size class on MacOS r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D131576
2021-11-22 16:40:52 +00:00
Paul Bone da23871ca8 Bug 1738240 - Convert the divide function to a template class r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D131197
2021-11-22 01:03:09 +00:00
Paul Bone 62af1f75c2 Bug 1738240 - Use fast-divide for QuantumWide r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D129807
2021-11-22 01:03:08 +00:00
Paul Bone 18f4d35973 Bug 1738240 - Move division routine out of arena_run_reg_dalloc r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D129806
2021-11-22 01:03:08 +00:00
Chris Peterson 50b1318658 Bug 1736968 - Change MOZ_CRASH() to MOZ_ASSUME_UNREACHABLE_MARKER() for abort()'s ARM noreturn case. r=glandium
This MOZ_CRASH() is redundant after calling noreturn function mozalloc_abort. The MOZ_ASSUME_UNREACHABLE_MARKER() annotation makes ARM's "function declared 'noreturn' should not return" warnings go away.

Differential Revision: https://phabricator.services.mozilla.com/D129115
2021-10-29 06:04:09 +00:00
Chris Peterson e6b872fb38 Bug 1736968 - Pass mozalloc_abort() crash reason to MOZ_CRASH() to distinguish mozalloc_abort() and bare MOZ_CRASH() crashes. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D129114
2021-10-29 06:04:08 +00:00
Paul Bone 24067c4312 Bug 1737199 - Avoid some VLAs when using jemalloc_stats r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D129228
2021-10-27 08:46:51 +00:00
criss 5e97bafc4e Backed out changeset 27b73fdbb4a9 (bug 1737199) for causing bustages on memory/replace/logalloc/replay/Replay.cpp. CLOSED TREE 2021-10-26 13:00:29 +03:00
Paul Bone a4b9d48ced Bug 1737199 - Avoid some VLAs when using jemalloc_stats r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D129228
2021-10-26 05:22:05 +00:00
Paul Bone 376c53fd56 Bug 1736766 - Don't include internal DMD stack frames in reports r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D128983
2021-10-21 23:17:04 +00:00
Paul Bone 1a20d57362 Bug 1735250 - Provide a less-magic array size for jemalloc_stats r=glandium
jemalloc_stats takes an array for its second argument.  It expects this
array to have enough space for all the bins, previously the maximum was set
as a magic number.  To make it dependent on the configured bins this patch
replaces the compile-time constant with a function.

Differential Revision: https://phabricator.services.mozilla.com/D127761
2021-10-21 06:42:34 +00:00
Paul Bone 1b721fc414 Bug 1735715 - Handle gMaxSubPageClass == 0 properly r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D128448
2021-10-21 06:03:45 +00:00
Paul Bone cc06afa32e Bug 1669392 - Add more jemalloc size classes r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D92729
2021-10-13 06:53:20 +00:00
Marian-Vasile Laza ac6c5e156e Backed out changeset 9de9bd47c061 (bug 1669392) for causing build bustages. 2021-10-12 04:18:26 +03:00
Paul Bone cc6e7d6c41 Bug 1669392 - Add more jemalloc size classes r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D92729
2021-10-12 00:34:38 +00:00
Alex Henrie bb04aa9e0e Bug 1730376 - Fix mmap return value check in FreePage function. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D126310
2021-10-05 08:38:38 +00:00
Mike Hommey aec5c5347b Bug 1733034 - Fix unused*-variable warnings due to missing ifdefs. r=andi
dom/base/EventSource.cpp:59:22: error: unused variable 'gEventSourceLog' [-Werror,-Wunused-variable]
static LazyLogModule gEventSourceLog("EventSource");
                     ^
dom/xul/nsXULCommandDispatcher.cpp:35:22: error: unused variable 'gCommandLog' [-Werror,-Wunused-variable]
static LazyLogModule gCommandLog("nsXULCommandDispatcher");
                     ^
layout/generic/ScrollAnchorContainer.cpp:23:31: error: unused variable 'sAnchorLog' [-Werror,-Wunused-variable]
static mozilla::LazyLogModule sAnchorLog("scrollanchor");
                              ^
memory/replace/phc/PHC.cpp:308:15: error: unused variable 'kAllocJunk' [-Werror,-Wunused-const-variable]
const uint8_t kAllocJunk = 0xe4;
              ^

Differential Revision: https://phabricator.services.mozilla.com/D126866
2021-09-29 21:44:49 +00:00
Gabriele Svelto 1ea22d4cdd Bug 1730222 - Support PHC on macOS when running on ARM-based machines r=glandium
This also tightens the check for PHC-type crashes in the exception handler
so that we don't accidentally try to interpret unrelated crash types as
potential PHC ones.

Differential Revision: https://phabricator.services.mozilla.com/D126365
2021-09-29 07:58:13 +00:00
Mike Hommey 9c0f04e547 Bug 1730030 - Replace some assembly with corresponding compiler builtins. r=gerald
This has the side-effect of adding the missing arm64 mac support for PHC.

Differential Revision: https://phabricator.services.mozilla.com/D125139
2021-09-10 00:58:34 +00:00
Mike Hommey ffeb3e4a49 Bug 1728274 - Allow to tweak the page size in debug builds. r=pbone
It allows to more easily test different page sizes.

Differential Revision: https://phabricator.services.mozilla.com/D124015
2021-09-01 07:54:40 +00:00
Andi-Bogdan Postelnicu 2fc4f70e9b Bug 1725145 - Preparation for the hybrid build env. r=necko-reviewers,firefox-build-system-reviewers,valentin,glandium
Automatically generated path that adds flag `REQUIRES_UNIFIED_BUILD = True` to `moz.build`
when the module governed by the build config file is not buildable outside on the unified environment.

This needs to be done in order to have a hybrid build system that adds the possibility of combing
unified build components with ones that are built outside of the unified eco system.

Differential Revision: https://phabricator.services.mozilla.com/D122345
2021-08-25 10:46:17 +00:00
Tom Ritter 561859278c Bug 1720342: Do not run logalloc tests for the CodeQL build r=glandium
The codeql initialization process causes a loop in allocator
initialization that results in the inability to issue open()
calls due to function interception having begun set-up but
not completing it.  (More details in bug.)

Differential Revision: https://phabricator.services.mozilla.com/D120521
2021-07-23 17:00:46 +00:00
Andrew McCreight 05bf8c42eb Bug 1717466 - A few minor fixes for block_analyzer.py. r=pbone
"print" had no params so it wasn't doing anything, causing there
to be less newlines than needed.

The default stack frame width is a bit narrow, so I increased it.

There are a few new uninteresting functions showing up, so I've
added them to the allocator list.

Differential Revision: https://phabricator.services.mozilla.com/D118381
2021-06-22 14:17:44 +00:00
Paul Bone 03fd9f1da8 Bug 1713271 - Capture the initial maps during static initialisation r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D116339
2021-06-17 05:17:06 +00:00
Paul Bone f5893db395 Bug 1713271 - Provide our own isspace implementation r=glandium
isspace requires data in libc to be initialised.  If we're parsing
/proc/smaps before libc has initialised we need to provide our own
implementation.

Differential Revision: https://phabricator.services.mozilla.com/D116338
2021-06-17 05:17:06 +00:00
Andrew Halberstadt 225e877c2b Bug 1696531: fix dmd.py and related tools to support python 3, r=bhearsum
Depends on D109729

Differential Revision: https://phabricator.services.mozilla.com/D109731
2021-06-14 15:31:42 +00:00
Alexandru Michis c152381556 Backed out changeset 49f8a4acd649 (bug 1712674) for stack walking crashes on older Windows versions (bug 1715633).
CLOSED TREE
2021-06-10 11:39:30 +03:00
Mike Hommey 8f9b77aa0b Bug 1715553 - Disable logalloc-replay check on code-coverage builds. r=firefox-build-system-reviewers,nalexander
It was already disabled for fuzzed code-coverage in bug 1695331. My
guess is that fuzzed code-coverage tripped on the extra allocations
due to the code-coverage runtime, but the code-coverage builds didn't
trip it because they also triggered an exception, which further
triggered a bug in the code with python3 (and somehow the fuzzed ccov
builds didn't trigger that). That bug effectively masked the failure.

Differential Revision: https://phabricator.services.mozilla.com/D117383
2021-06-10 03:55:46 +00:00
Gerald Squelart ec93a05700 Bug 1712674 -- If RtlLookupFunctionEntry fails, attempt to unwind from BP - r=glandium
BP may contain the stack address where the caller's BP was pushed after the function call, in which case it's possible to carefully unwind from it.

This can get past JIT code, so there is no need to give up in this case.

mozglue was already linked with ntdll, but now that we use it directly (for `NtQueryInformationThread`), ntdll needed to be added to some other users of MozStackWalkThread.

Differential Revision: https://phabricator.services.mozilla.com/D115962
2021-06-09 00:28:03 +00:00
Andrey Bienkowski 888618300d Bug 1714376 - Replace a number of "exception.message" usages. r=mhentges,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D116723
2021-06-08 15:50:10 +00:00
Dorel Luca f021feb29f Backed out changeset 68f73772f51e (bug 1714376) for Xpcom failures in builds/worker/checkouts/gecko/xpcom/idl-parser/xpidl/runtests.py. CLOSED TREE 2021-06-04 02:19:33 +03:00
Andrey Bienkowski a7a4542e20 Bug 1714376 - Replace a number of "exception.message" usages. r=mhentges,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D116723
2021-06-03 20:08:51 +00:00
Alexandre Lissy 4f13efd5fc Bug 1709277 - Simplify gOOMAllocationSize via MFBT_DATA r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D115339
2021-05-20 06:53:27 +00:00
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
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