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

631 Коммитов

Автор SHA1 Сообщение Дата
Paul Bone 4f15ab146d Bug 1864828 - pt 1. Move operators to create literals with units into mfbt/ r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D194950
2023-12-11 11:01:33 +00:00
Mike Hommey 619672a8e4 Bug 1867459 - Replace CPU_ARCH with TARGET_CPU. r=firefox-build-system-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D195157
2023-12-08 10:43:59 +00:00
Sylvestre Ledru d74f9b5552 Bug 1868046 - Remove some nbsp in the code r=linter-reviewers,ahal
Depends on D195369

Differential Revision: https://phabricator.services.mozilla.com/D195370
2023-12-04 15:25:04 +00:00
Iulian Moraru d6a3f6a6bd Backed out 2 changesets (bug 1864828) for causing build bustages on TestJemalloc.cpp. CLOSED TREE
Backed out changeset c1b4a8307702 (bug 1864828)
Backed out changeset ba88f119b1fc (bug 1864828)
2023-11-30 07:19:04 +02:00
Paul Bone e1f95a2d2b Bug 1864828 - pt 1. Move operators to create literals with units into mfbt/ r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D194950
2023-11-30 01:17:55 +00:00
Akylzhan 9021fd1e02 Bug 1862508 - FdPrintf.cpp: removed extra ; after member function definition. r=sylvestre DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D194704
2023-11-26 11:43:32 +00:00
Randell Jesup c0e9f8d3a3 Bug 1865120: clean up chunk_type use in mozjemalloc to reduce false positives r=pbone
Differential Revision: https://phabricator.services.mozilla.com/D193811
2023-11-23 23:51:01 +00:00
Paul Bone 439371cbc2 Bug 1866025 - Check if PHC is initialised on all entrypoints r=glandium
PHC initialisation can bail out on systems without an expected statically
assumed page size.  When this happens Firefox can crash if we don't check
for it on all PHC entrypoints including SetPHCStatus().

Thanks Janne Grunau for the initial patch.

Differential Revision: https://phabricator.services.mozilla.com/D194458
2023-11-23 04:53:22 +00:00
Paul Bone 99d873c7c2 Bug 1862540 - Remove code dealing with non-zeroed chunks r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D192521
2023-11-14 09:44:11 +00:00
Paul Bone aaa25c6593 Bug 1862378 - Chunk guard pages are not committed memory r=glandium
Don't include the chunk guard pages in our committed memory calculation.

Differential Revision: https://phabricator.services.mozilla.com/D192450
2023-11-14 05:38:25 +00:00
Paul Bone cec1261b74 Bug 1862378 - Add assertion for waste calculation r=glandium
The waste memory calcuation has an invariant that we can also assert.

Differential Revision: https://phabricator.services.mozilla.com/D192449
2023-11-14 05:38:25 +00:00
Paul Bone d7d80b6143 Bug 1862378 - Simplify some ifdef conditions r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D192447
2023-11-14 05:38:24 +00:00
Paul Bone 62f879e4b6 Bug 1829127 - Add telemetry for PHC utilisation r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D192303
2023-11-06 04:59:33 +00:00
Paul Bone f590b3e285 Bug 1857107 - Update the PHC gtest for apple silicon's page size r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D191603
2023-10-26 05:41:15 +00:00
Paul Bone aa189da432 Bug 1859954 - Use XP_DARWIN rather than XP_MACOS in PHC r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D191600
2023-10-25 05:43:36 +00:00
Paul Bone f05583b06f Bug 1860464 - Use using rather than typedef r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D191596
2023-10-24 03:54:42 +00:00
Paul Bone 463cfa9630 Bug 1854135 - Set PHC's size to limit it to 1.1MiB per process in release r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D188822
2023-10-24 01:50:52 +00:00
Paul Bone cbd484acb9 Bug 1859964 - --enable-phc doesn't always imply --enable-frame-pointers r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D191404
2023-10-24 00:52:34 +00:00
Paul Bone 055dc73fbb Bug 1854550 - pt 12. Allow inlining between mozjemalloc and PHC r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D191201
2023-10-19 06:38:43 +00:00
Paul Bone 15b2b96152 Bug 1854550 - pt 10. Allow LOG() with zero extra arguments r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D191134
2023-10-19 06:38:42 +00:00
Paul Bone d9dfdcc493 Bug 1854550 - pt 9. Move PHC interface from the bridge to PHC.h r=glandium
Building PHC in a unified build now also works.

Differential Revision: https://phabricator.services.mozilla.com/D191133
2023-10-19 06:38:42 +00:00
Paul Bone d2bdb850c2 Bug 1854550 - pt 8. Rename a variable r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D190423
2023-10-19 06:38:42 +00:00
Paul Bone 69cb1c1b92 Bug 1854550 - pt 7. Call PHC directly rather than through replace malloc r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D190422
2023-10-19 06:38:41 +00:00
Paul Bone 10b0e0fcd7 Bug 1854550 - pt 6. Move AlignedAllocator into a header r=glandium
Move the AlignedAllocator class template into mozjemalloc.h where it can be
used by PHC also.

***
Fix

Differential Revision: https://phabricator.services.mozilla.com/D190417
2023-10-19 06:38:41 +00:00
Paul Bone 870b8d6db1 Bug 1854550 - pt 5. Remove templating around allocation classes r=glandium
This will simplify references/linking between mozjemalloc and PHC.  Plus
this code is clearer (more explicit) without it even though there's more
repitition.

Differential Revision: https://phabricator.services.mozilla.com/D190014
2023-10-19 06:38:40 +00:00
Paul Bone e4a9b57aa0 Bug 1854550 - pt 4. PHC doesn't use the malloc table to call jemalloc r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D189241
2023-10-19 06:38:40 +00:00
Paul Bone b9ef763b57 Bug 1854550 - pt 3. Define kAlloc{Junk,Poison} once for jemalloc and PHC r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D190013
2023-10-19 06:38:39 +00:00
Paul Bone 34506cd1f8 Bug 1854550 - pt 2. Move PHC into memory/build r=glandium
We want to link PHC directly alongside jemalloc so move its code into the
memory/build/ directory.  This means that it's always statically linked even
when other replace_malloc libraries aren't.

The following patch will remove it from the replace_malloc configuration.

Differential Revision: https://phabricator.services.mozilla.com/D188983
2023-10-19 06:38:39 +00:00
Emilio Cobos Álvarez a3e8abd326 Bug 1858250 - malloc_initialized should not be SequentiallyConsistent. r=glandium
I think ReleaseAcquire semantics are sound here.

It might be that relaxed is fine too, but that might be technically
unsound because it could make the writes in malloc_init_hard not visible
to the other threads in time.

Depends on D190623

Differential Revision: https://phabricator.services.mozilla.com/D190624
2023-10-11 08:09:03 +00:00
Emilio Cobos Álvarez bf0f43df59 Bug 1858250 - mDefaultMaxDirtyPageModifier should use relaxed memory ordering. r=glandium
Spotted while looking at this code. This doesn't guard any memory.

Differential Revision: https://phabricator.services.mozilla.com/D190623
2023-10-10 22:45:54 +00:00
Otto Länd d749b8caa8 Bug 1850008: apply code formatting via Lando
# ignore-this-changeset
2023-10-09 00:04:20 +00:00
Paul Bone e685735f09 Bug 1850008 - pt 3. Add a parameter for how many bytes to poison r=glandium,smaug
Also change the amount of bytes to poison to 256.

Differential Revision: https://phabricator.services.mozilla.com/D187960
2023-10-09 00:01:31 +00:00
Paul Bone 760aa24874 Bug 1850008 - pt 2. Poison at most the first 64 bytes of a memory cell r=jesup,glandium
This patch alters mozjemalloc's poisoning to poison only the first 64 bytes
of (most) memory cells.  It has this behaviour in late beta and release
builds and keeps the original "poison all" behaviour for nightly and early
beta builds.

A later patch will make this a parameter and set it to 256.

Differential Revision: https://phabricator.services.mozilla.com/D187359
2023-10-09 00:01:30 +00:00
Paul Bone d7455773a2 Bug 1850008 - pt 1. Refactor parsing of MALLOC_OPTIONS r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D187959
2023-10-09 00:01:30 +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 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
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 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
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
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 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
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
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
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
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