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

1615 Коммитов

Автор SHA1 Сообщение Дата
Paul Bone 8ea82cb1ff Bug 1824655 - Avoid locking for the DOMArena jemalloc arena r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D173828
2023-06-09 05:06:49 +00:00
Gabriele Svelto d40b19f8c6 Bug 1776197 - Adjust crash generation to pull annotations out of child processes using the mozannotation crates r=afranchuk
Depends on D173698

Differential Revision: https://phabricator.services.mozilla.com/D173699
2023-06-07 12:34:31 +00:00
Mike Hommey 53ece1ccc1 Bug 1834337 - Ignore -Winline-new-delete warnings. r=sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D178994
2023-05-29 20:24:44 +00:00
Mike Hommey 3b332113e3 Bug 1802675 - Don't build winheap.cpp when mozglue is a static library. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D163383
2023-05-23 03:01:22 +00:00
Mike Hommey 025602a787 Bug 1832708 - Disable std::__throw_* wrapping on libc++ >= 14.0. r=firefox-build-system-reviewers,andi
As of libc++ 14, the functions are defined in the std namespace rather
than std::<something>, which makes them conflict with our wrapping. This
is not a problem on libstdc++ because the functions are defined in the
library itself rather than the headers.

This was the real reason behind the addition of #ifndef __wasm__ ; this
is a more generic fix for the same problem.

Differential Revision: https://phabricator.services.mozilla.com/D177841
2023-05-15 21:10:55 +00:00
Mark Banner c2dd8e3266 Bug 1829618 - Enable Prettier on json files (automatic fixes). r=perftest-reviewers,webcompat-reviewers,extension-reviewers,andi,desktop-theme-reviewers,pip-reviewers,devtools-reviewers,sync-reviewers,mossop,denschub,dao,sparky,robwu,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D176336
2023-05-09 16:14:51 +00:00
Mike Hommey e120474d55 Bug 1829050 - Enable STL wrapping (and thus infallible new) for wasm-sandboxed code. r=firefox-build-system-reviewers,shravanrn,andi
Differential Revision: https://phabricator.services.mozilla.com/D175981
2023-05-08 21:10:19 +00:00
Paul Bone 73ec90e1fe Bug 1828599 - Assert if mprotect/VirtualFree fails r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D175834
2023-05-04 06:46:25 +00:00
Paul Bone 60b99c8afd Bug 1828599 - Fix control flow in MaybePageAlloc r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D175833
2023-05-04 06:46:24 +00:00
Noemi Erli b021722dbf Backed out changeset e06349a5b0f2 (bug 1829050) for causing build bustages in rlbox_wasm2c_sandbox.hpp 2023-05-03 08:16:13 +03:00
Mike Hommey d9b2a96f8d Bug 1829050 - Enable STL wrapping (and thus infallible new) for wasm-sandboxed code. r=firefox-build-system-reviewers,shravanrn,andi
Differential Revision: https://phabricator.services.mozilla.com/D175981
2023-05-03 04:05:07 +00:00
Norisz Fay 7aa97db372 Backed out changeset cddc0b331d97 (bug 1829050) for causing bustages on CheckedInt.h CLOSED TREE 2023-05-03 04:31:34 +03:00
Mike Hommey da624910fc Bug 1829050 - Enable STL wrapping (and thus infallible new) for wasm-sandboxed code. r=firefox-build-system-reviewers,shravanrn,andi
Differential Revision: https://phabricator.services.mozilla.com/D175981
2023-05-03 00:56:33 +00:00
Paul Bone 53172d841f Bug 1828638 - Don't track PHC hits/misses unless logging is enabled r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D175991
2023-04-21 06:40:39 +00:00
Paul Bone 74078e545a Bug 1828638 - Log the number of freed cells in PHC r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D175832
2023-04-21 06:40:39 +00:00
Andrew McCreight 3b2f73dd78 Bug 1828994 - Fix blank line printing in block_analyzer.py. r=pbone
Differential Revision: https://phabricator.services.mozilla.com/D175946
2023-04-19 23:31:33 +00:00
Paul Bone fda362dd17 Bug 1826298 - Fix a use of an `auto` type without a reference r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D174612
2023-04-05 07:51:36 +00:00
Paul Bone d7dcc61559 Bug 1800010 - Log lifetimes in PHC r=glandium
This patch was originally by Randell Jesup

Differential Revision: https://phabricator.services.mozilla.com/D170840
2023-04-05 07:49:58 +00:00
Paul Bone 11be120f95 Bug 1800010 - Make PHC more aggressive r=glandium
Improve the chance that we catch memory errors with PHC by:

 * Increasing the number of PHC slots (increased from 64 to 4096 in most
   cases).
 * Lower the delay for the first PHC allocation, with more slots we can
   afford to trap allocations from earlier in Firefox's startup.

These improve the chance PHC has of catching an error by 64x, at the cost of
additional 1MB of allocation metadata (on 4KB page size systems).  It
shouldn't impact performance more than having PHC on at all.

This patch was originally developed by Randell Jesup.

Differential Revision: https://phabricator.services.mozilla.com/D161934
2023-04-05 07:49:57 +00:00
serge-sans-paille 74b730e12a Bug 1825329 - Make memory/moz*alloc buildable outside of a unified build environment r=andi
Depends on D173972

Differential Revision: https://phabricator.services.mozilla.com/D173973
2023-03-31 13:29:45 +00:00
Cristian Tuns 8e06a7a853 Backed out 12 changesets (bug 1825325, bug 1825336, bug 1825333, bug 1825332, bug 1825324, bug 1824557, bug 1825328, bug 1825335, bug 1825330, bug 1825329, bug 1825327, bug 1825331) for causing build bustages in nsClipboard.cpp CLOSED TREE
Backed out changeset 9de3ed24d3a0 (bug 1825336)
Backed out changeset aef787728f19 (bug 1825335)
Backed out changeset a04c341244c1 (bug 1825333)
Backed out changeset e3ad15f762ba (bug 1825332)
Backed out changeset eed23da92a27 (bug 1825331)
Backed out changeset 8213bb54376e (bug 1825330)
Backed out changeset 747ec5ac4994 (bug 1825329)
Backed out changeset e91ff431f92d (bug 1825328)
Backed out changeset 59c18d13768b (bug 1825327)
Backed out changeset 538096d99e49 (bug 1825325)
Backed out changeset c76eb9d9b095 (bug 1825324)
Backed out changeset 8b81410eb686 (bug 1824557)
2023-03-31 12:58:53 -04:00
serge-sans-paille b7d27be3bf Bug 1825329 - Make memory/moz*alloc buildable outside of a unified build environment r=andi
Depends on D173972

Differential Revision: https://phabricator.services.mozilla.com/D173973
2023-03-31 13:29:45 +00:00
Paul Bone dcda564f85 Bug 1822451 - Add about:memory entries for PHC r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D173099

Depends on D173098
2023-03-29 11:08:17 +00:00
Paul Bone 845ba685dd Bug 1822451 - Update a function name in a comment r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D173098

Depends on D172655
2023-03-29 11:08:16 +00:00
Paul Bone 039c4531eb Bug 1822451 - Don't include PHC guard pages in explicit memory r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D172655
2023-03-29 11:08:16 +00:00
Cosmin Sabou f894363c34 Backed out 3 changesets (bug 1822451) for busting thunderbird builds and causing bug 1825467. CLOSED TREE
Backed out changeset 5c399ec3dae0 (bug 1822451)
Backed out changeset ac5d1057c562 (bug 1822451)
Backed out changeset 42250977529b (bug 1822451)
2023-03-30 14:30:22 +03:00
Paul Bone a08a5cccf3 Bug 1822451 - Add about:memory entries for PHC r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D173099
2023-03-29 11:08:17 +00:00
Paul Bone 46b807b395 Bug 1822451 - Update a function name in a comment r=glandium
Depends on D172655

Differential Revision: https://phabricator.services.mozilla.com/D173098
2023-03-29 11:08:16 +00:00
Paul Bone cd6b755d18 Bug 1822451 - Don't include PHC guard pages in explicit memory r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D172655
2023-03-29 11:08:16 +00:00
Paul Bone ce59278f10 Bug 1609478 - Poison memory we want to free before we take the arena lock r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D166776
2023-03-16 06:05:27 +00:00
serge-sans-paille 70867be225 Bug 1820577 - Make memory/build buildable outside of a unified build environment r=andi
Differential Revision: https://phabricator.services.mozilla.com/D171735
2023-03-15 07:30:38 +00:00
Brad Werth 706117a7d7 Bug 1792146: Make replace_malloc_usable_size succeed with pointers within allocation pages. r=glandium
This changes replace_malloc_usable_size to allow measuring the size of
ptrs that appear anywhere within an allocation page, not just ptrs to the
start of the allocation pages.

This also modifies a gtest to explicitly check the usable size of some
modified pointers, not just the usable size of the pages where those
pointers are located.

Differential Revision: https://phabricator.services.mozilla.com/D170963
2023-03-09 23:12:20 +00:00
Olli Pettay cc96e06ed2 Bug 1817640 - extract calculation of max dirty value to a helper method EffectiveMaxDirty(), r=pbone
Differential Revision: https://phabricator.services.mozilla.com/D170290
2023-03-02 09:15:59 +00:00
Olli Pettay c1c5ec3417 Bug 1815069 - Make it possible to tweak mozjemalloc's max dirty page sizes dynamically, r=glandium,pbone
Differential Revision: https://phabricator.services.mozilla.com/D168900
2023-03-02 09:15:57 +00:00
Nazım Can Altınova c896734446 Bug 1779257 - Fix the stack walking for linux markers by calling getcontext in a valid stack frame r=mstange
See my comment on here for more context of my investigation:
https://bugzilla.mozilla.org/show_bug.cgi?id=1779257#c9

The saved context is invalid once the function that called `getcontext`
returns. We need to call the `getcontext` while the frame where we called it is
still on the stack. That's why this patch is moving the call to `getcontext` to
parent function by inlining the SyncPopulate content by using a macro instead.
This has to be a macro instead of a function because stack pointer address will
be invalid once the `Registers::SyncPopulate` returns. I tried to change this
method to inline but that didn't help either.

Differential Revision: https://phabricator.services.mozilla.com/D170133
2023-02-22 19:57:08 +00:00
Paul Bone f072e9a5ee Bug 1814808 - Move chunk releasing out of the arena lock's critical section r=glandium
The system calls of releasing a chunk of memory can be costly and should be
done outside the arena lock's critical section so that other threads aren't
blocked waiting for the lock.

Differential Revision: https://phabricator.services.mozilla.com/D166775
2023-02-17 04:17:24 +00:00
Paul Bone b9df18d3cb Bug 1816044 - Fix an ascii-art table r=glandium DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D169413
2023-02-15 06:10:10 +00:00
Razvan Cojocaru 5a6d9b05b7 Bug 1786774 - Make the memory allocator spinlocks always spin in kernel-space on macOS/AArch64. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D169067
2023-02-14 08:46:59 +00:00
Paul Bone 883afb9d00 Bug 1808429 - Disconnect runtime configuration from MOZ_DEBUG r=glandium
Some of the runtime options are compiled-in constants when MOZ_DEBUG is not
defined.  But it can be useful to enable these configuration options without
enabling the rest of MOZ_DEBUG (eg assertions).  This patch adds a new
preprocessor macro to enable runtime configuration.

Differential Revision: https://phabricator.services.mozilla.com/D165920
2023-01-20 06:21:12 +00:00
Paul Bone 95ef1322fd Bug 1808429 - Add the ability to enable and disable poisoning r=glandium
Poisoning was hardcoded, but to compare different allocators I wanted to
disable it.  This patch lets us control poisoning with the MALLOC_OPTIONS
environment variable.

Differential Revision: https://phabricator.services.mozilla.com/D165919
2023-01-20 06:21:12 +00:00
Paul Bone 4a359a003e Bug 1808429 - Fix non-existant parameters in code comment r=glandium
This comment refers to parameters that don't exist.

Differential Revision: https://phabricator.services.mozilla.com/D165918
2023-01-20 06:21:12 +00:00
Ray Kraesig 72c9c808cd Bug 1804499 - [4/4] Expose allocator's stall-specs beyond mozjemalloc.cpp r=glandium
Export `GetStallSpecs` as `mozilla::GetAllocatorStallSpecs`, when it exists.

Differential Revision: https://phabricator.services.mozilla.com/D165430
2023-01-20 01:50:54 +00:00
Ray Kraesig 4fcae818b2 Bug 1804499 - [3/4] Expose stall-and-retry code beyond mozjemalloc.cpp r=glandium
Extract the stall-and-retry logic from mozjemalloc into a header. Write
a unit test for it.

Differential Revision: https://phabricator.services.mozilla.com/D164107
2023-01-20 01:50:54 +00:00
Ray Kraesig 00c3eaa89a Bug 1804499 - [2/4] Factor out the stall logic in preparation for export r=glandium
In bug 1794059 it was noted that the IPC shared-memory allocation code
would like to be able to stall-and-retry as well using the same logic.

While it doesn't use VirtualAlloc, the principle is otherwise the same.
Shuffle the relevant code around so that the stall-and-retry logic is
separate from the allocation, in preparation for exporting it.

Differential Revision: https://phabricator.services.mozilla.com/D164106
2023-01-20 01:50:53 +00:00
Ray Kraesig 800ec51744 Bug 1804499 - [1/4] Handle Windows error code consistently r=glandium
The real ::VirtualAlloc does not modify the existing last-error code in
case of success; therefore, neither should we.

Differential Revision: https://phabricator.services.mozilla.com/D164105
2023-01-20 01:50:53 +00:00
Cosmin Sabou 2fa42b60ac Backed out 4 changesets (bug 1804499) for causing SM bustages.
Backed out changeset 54dd0be202ef (bug 1804499)
Backed out changeset 3131f330b55d (bug 1804499)
Backed out changeset 180af13cd33f (bug 1804499)
Backed out changeset a05c18f43067 (bug 1804499)
2023-01-19 18:56:08 +02:00
Ray Kraesig 611b09e06e Bug 1804499 - [4/4] Expose allocator's stall-specs beyond mozjemalloc.cpp r=glandium
Export `GetStallSpecs` as `mozilla::GetAllocatorStallSpecs`, when it exists.

Differential Revision: https://phabricator.services.mozilla.com/D165430
2023-01-19 16:16:43 +00:00
Ray Kraesig 0336c0891c Bug 1804499 - [3/4] Expose stall-and-retry code beyond mozjemalloc.cpp r=glandium
Extract the stall-and-retry logic from mozjemalloc into a header. Write
a unit test for it.

Differential Revision: https://phabricator.services.mozilla.com/D164107
2023-01-19 16:16:42 +00:00
Ray Kraesig 2696c25e5c Bug 1804499 - [2/4] Factor out the stall logic in preparation for export r=glandium
In bug 1794059 it was noted that the IPC shared-memory allocation code
would like to be able to stall-and-retry as well using the same logic.

While it doesn't use VirtualAlloc, the principle is otherwise the same.
Shuffle the relevant code around so that the stall-and-retry logic is
separate from the allocation, in preparation for exporting it.

Differential Revision: https://phabricator.services.mozilla.com/D164106
2023-01-19 16:16:42 +00:00
Ray Kraesig a27f258c20 Bug 1804499 - [1/4] Handle Windows error code consistently r=glandium
The real ::VirtualAlloc does not modify the existing last-error code in
case of success; therefore, neither should we.

Differential Revision: https://phabricator.services.mozilla.com/D164105
2023-01-19 16:16:41 +00:00