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

1644 Коммитов

Автор SHA1 Сообщение Дата
Paul Bone cda96811f8 Bug 1814798 - pt 2. Add a PHCManager component to control PHC r=glandium,emilio
This change adds the PHCManager class which observes a pref to control PHC.
The pref can be changed at runtime and will affect the parent and content
processes.

Differential Revision: https://phabricator.services.mozilla.com/D178754
2023-09-18 06:48:06 +00:00
Paul Bone accac535a0 Bug 1814798 - pt 1. Add bool to enable/disable PHC at runtime r=glandium
Add the ability to enable and disable PHC at runtime through the malloc
bridge.

Differential Revision: https://phabricator.services.mozilla.com/D178753
2023-09-18 06:48:06 +00:00
Stanca Serban 6d490604c6 Backed out 2 changesets (bug 1814798) for multiple phc related failures.
Backed out changeset 50b72ab948b2 (bug 1814798)
Backed out changeset bf7d386ad43a (bug 1814798)
2023-09-12 07:54:18 +03:00
Paul Bone 8f391e64c7 Bug 1814798 - pt 2. Add a PHCManager component to control PHC r=glandium,emilio
This change adds the PHCManager class which observes a pref to control PHC.
The pref can be changed at runtime and will affect the parent and content
processes.

Differential Revision: https://phabricator.services.mozilla.com/D178754
2023-09-12 04:03:16 +00:00
Paul Bone 51e69845d9 Bug 1814798 - pt 1. Add bool to enable/disable PHC at runtime r=glandium
Add the ability to enable and disable PHC at runtime through the malloc
bridge.

Differential Revision: https://phabricator.services.mozilla.com/D178753
2023-09-12 04:03:16 +00:00
Logan Rosen f024d94b2b Bug 1786490 - reformat the tree using black 23.3.0 r=sylvestre,webdriver-reviewers,taskgraph-reviewers,whimboo,jmaher,ahal,perftest-reviewers,geckoview-reviewers,afinder,m_kato
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D186092
2023-09-06 16:14:30 +00:00
Paul Bone c75bf8e729 Bug 1844359 - Lookup main thread only arenas without a lock r=glandium
By adding another tree for arena lookups we can access the new tree without
taking a lock.  This makes main-thread-only arenas completely lock-free.

Differential Revision: https://phabricator.services.mozilla.com/D184548
2023-08-16 05:51:38 +00:00
Paul Bone 418d7539b2 Bug 1845017 - Disable the TestPHCExhaustion test r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D184666
2023-08-10 04:16:55 +00:00
Paul Bone 014b5eca53 Bug 1845355 - Add some asserts to detect causes of a crash r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D185629
2023-08-09 07:38:36 +00:00
Brad Werth 5c1d5c00b9 Bug 1845144 Part 2: Remove macOS available and builtin_available directives for always-supported versions of macOS. r=mac-reviewers,mstange,keeler,padenot
This also does minimal refactoring of cases where the directives were
protecting a simple expression that could be refactored back to the
callers.

Differential Revision: https://phabricator.services.mozilla.com/D184399
2023-08-02 02:26:14 +00:00
Cristian Tuns 11da0568b0 Backed out changeset fcd8eecfa7b1 (bug 1845017) for causing build bustages in TestPHC.cpp CLOSED TREE 2023-08-01 04:03:35 -04:00
Paul Bone 9d10223ae1 Bug 1845017 - Disable the TestPHCExhaustion test r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D184666
2023-08-01 06:10:10 +00:00
Iulian Moraru f8b5b0e9dc Backed out 3 changesets (bug 1845144) for causing py3 failures on test_toolchain_configure.py. CLOSED TREE
Backed out changeset 5168c7b1cf04 (bug 1845144)
Backed out changeset 6afda17fe413 (bug 1845144)
Backed out changeset d233c63f8121 (bug 1845144)
2023-08-01 06:06:53 +03:00
Brad Werth 4280325241 Bug 1845144 Part 2: Remove macOS available and builtin_available directives for always-supported versions of macOS. r=mac-reviewers,mstange,keeler
This also does minimal refactoring of cases where the directives were
protecting a simple expression that could be refactored back to the
callers.

Differential Revision: https://phabricator.services.mozilla.com/D184399
2023-07-31 22:18:09 +00:00
Masatoshi Kimura 4a82024239 Bug 1844908 - Remove pre-Win10-specific codepath from memory/. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D184296
2023-07-26 08:52:51 +00:00
Natalia Csoregi 72a7b95555 Backed out 19 changesets (bug 1844908) for causing win bustage on AvailableMemoryTracker.cpp. CLOSED TREE
Backed out changeset 44c66f2233cf (bug 1844908)
Backed out changeset a8010ff534bf (bug 1844908)
Backed out changeset 225dc3aeb220 (bug 1844908)
Backed out changeset a1414db64e33 (bug 1844908)
Backed out changeset 7f1e0a527839 (bug 1844908)
Backed out changeset 6dc7646d1ffa (bug 1844908)
Backed out changeset 8d715131510f (bug 1844908)
Backed out changeset 4b6fe8a4e7db (bug 1844908)
Backed out changeset 2b419fabf1e8 (bug 1844908)
Backed out changeset af84e701d616 (bug 1844908)
Backed out changeset 2fa203969ec5 (bug 1844908)
Backed out changeset 2b3d2df94db3 (bug 1844908)
Backed out changeset 7eca452f5fd7 (bug 1844908)
Backed out changeset 3d961cf25afe (bug 1844908)
Backed out changeset 3c59143f8dd7 (bug 1844908)
Backed out changeset ab50c6c5425a (bug 1844908)
Backed out changeset b2c5636df673 (bug 1844908)
Backed out changeset e9a0f1c6760c (bug 1844908)
Backed out changeset 945ccbedde0b (bug 1844908)
2023-07-25 19:55:35 +03:00
Masatoshi Kimura 88a68dca1a Bug 1844908 - Remove pre-Win10-specific codepath from memory/. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D184296
2023-07-25 14:41:02 +00:00
Paul Bone b2dc052d2a Bug 1841538 - Fix punctuation r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D183243
2023-07-20 06:21:46 +00:00
Paul Bone ebe1a07335 Bug 1841538 - Use a try lock while retreiving PHC information r=jesup
Differential Revision: https://phabricator.services.mozilla.com/D183242
2023-07-20 06:21:46 +00:00
Paul Bone 655b51ef61 Bug 1841538 - Unlock the PHC mutex before crashing r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D183241
2023-07-20 06:21:45 +00:00
Paul Bone e0df8952ac Bug 1829125 - Align the PHC area to the jemalloc chunk size r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D179533
2023-07-12 09:29:02 +00:00
Paul Bone 3732a83cd1 Bug 1829125 - Add a PHCExhaustion test r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D181601
2023-07-12 09:28:45 +00:00
Paul Bone 21248857c1 Bug 1839596 - Explicitly tell jemalloc which is the main thread r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D181724
2023-06-30 00:57:20 +00:00
Paul Bone 7bb3277fcb Bug 1839147 - Fix linter warnings after rearranging code r=glandium
Depends on D181831

Differential Revision: https://phabricator.services.mozilla.com/D181950
2023-06-26 23:45:43 +00:00
Paul Bone de53f7f654 Bug 1839147 - Fix comments about sAllocDelay's type r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D181831
2023-06-26 23:45:43 +00:00
Paul Bone 2695cb5759 Bug 1839147 - Fix PHC getting stuck in disabled state r=glandium
PHC can get stuck if sAllocDelay passes 0 while it is disabled.  sAllocDelay
wraps (it's a uint32_t) and will take a long time to reach 0 again.

This patch will reset sAllocDelay if necessary when PHC is re-enabled.

Differential Revision: https://phabricator.services.mozilla.com/D181422
2023-06-26 23:45:42 +00:00
Butkovits Atila bb9bae8012 Backed out 2 changesets (bug 1829128) for causing failures at TestPrintf.
Backed out changeset 301d3e2bdac3 (bug 1829128)
Backed out changeset c93bc35c5289 (bug 1829128)
2023-06-14 18:12:10 +03:00
Paul Bone cd487a47e5 Bug 1829128 - Crashes in jemalloc don't have useful PHC stacks r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D180196
2023-06-14 13:28:09 +00:00
Barret Rennie 9d37cb7525 Bug 1747469 - Remove FileUtils.getFile from memory/ r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D180463
2023-06-13 15:57:45 +00:00
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