Commit Graph

1877 Commits

Author SHA1 Message Date
Paul Bone
091243e8f5 Bug 1967195 - Remove the chunk_assert_zero check r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D249941
2025-05-20 05:56:48 +00:00
Sylvestre Ledru
8ae54ea4f9 Bug 1519636 - Reformat recent changes to the Google coding style r=geckoview-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,nalexander,gstoll,tcampbell,janv,julienw
Updated with clang-format version 19.1.7 (taskcluster-DYvBxDZJRVqTi8E7pTSJAQ)

Differential Revision: https://phabricator.services.mozilla.com/D249880
2025-05-17 19:11:13 +00:00
Serban Stanca
72ddd15355 Revert "Bug 1928254 - pt 8. Improve the idle purge markers r=jstutte" for causing multiple failures.
This reverts commit 1de23dc2a6.

This reverts commit dc7de1e170.

This reverts commit 0891965b10.

This reverts commit 52c855715a.

This reverts commit fcdc85d6b4.

This reverts commit 1fa61503c2.

This reverts commit df279eb40e.

This reverts commit dd4278a7d5.
2025-05-16 08:52:29 +00:00
Paul Bone
dc7de1e170 Bug 1928254 - pt 7. Add more details to the Purge marker r=jstutte,profiler-reviewers,canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D241937
2025-05-16 07:33:09 +00:00
Paul Bone
0891965b10 Bug 1928254 - pt 6. Move PurgeResult to mozjemalloc_types.h r=jstutte
* Move PurgeResult
 * Rename some of its values so they'll make sense for the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D242668
2025-05-16 07:33:06 +00:00
Paul Bone
52c855715a Bug 1928254 - pt 5. Rename purge_result_t to avoid confusion with PurgeResult r=jstutte
Differential Revision: https://phabricator.services.mozilla.com/D242667
2025-05-16 07:33:02 +00:00
Paul Bone
1fa61503c2 Bug 1928254 - pt 3. Time the purge operation in mozjemalloc r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D227442
2025-05-16 07:32:55 +00:00
Paul Bone
df279eb40e Bug 1928254 - pt 2. Add profiler callbacks for mozjemalloc r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D227441
2025-05-16 07:32:51 +00:00
Paul Bone
dd4278a7d5 Bug 1928254 - pt 1. Label arenas for the profiler r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D227440
2025-05-16 07:32:47 +00:00
serge-sans-paille
5d938d8488 Bug 1962300 - Provide support for unavailable symbols as weak symbols r=m_kato,gfx-reviewers,firefox-build-system-reviewers,glandium,necko-reviewers,geckoview-reviewers,cubeb-reviewers,valentin,padenot,jnicol
Compiler support make it possible to detect missing checks at compile
time, so it's relatively safe, as described in https://developer.android.com/ndk/guides/using-newer-apis

It's now applied globally on android.

Deactivate the associate compiler warning on cubeb as it otherwise
throws warning for type computations.

Differential Revision: https://phabricator.services.mozilla.com/D246803
2025-05-15 09:34:38 +00:00
Atila Butkovits
77ba9a0aeb Revert "Bug 1928254 - pt 8. Improve the idle purge markers r=jstutte"
This reverts commit 990a75a96b.

Revert "Bug 1928254 - pt 7. Add more details to the Purge marker r=jstutte,profiler-reviewers,canaltinova"

This reverts commit c4b8597e6e.

Revert "Bug 1928254 - pt 6. Move PurgeResult to mozjemalloc_types.h r=jstutte"

This reverts commit 3f6a9d0a98.

Revert "Bug 1928254 - pt 5. Rename purge_result_t to avoid confusion with PurgeResult r=jstutte"

This reverts commit 5a56d09f72.

Revert "Bug 1928254 - pt 4. Add profiler markers for mozjemalloc's Purge() r=florian,profiler-reviewers"

This reverts commit e699aa7901.

Revert "Bug 1928254 - pt 3. Time the purge operation in mozjemalloc r=glandium"

This reverts commit 3b891ccfc3.

Revert "Bug 1928254 - pt 2. Add profiler callbacks for mozjemalloc r=glandium"

This reverts commit 362172ca5b.

Revert "Bug 1928254 - pt 1. Label arenas for the profiler r=glandium"

This reverts commit b1f31febeb.
2025-05-15 05:33:53 +00:00
Paul Bone
c4b8597e6e Bug 1928254 - pt 7. Add more details to the Purge marker r=jstutte,profiler-reviewers,canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D241937
2025-05-15 04:46:24 +00:00
Paul Bone
3f6a9d0a98 Bug 1928254 - pt 6. Move PurgeResult to mozjemalloc_types.h r=jstutte
* Move PurgeResult
 * Rename some of its values so they'll make sense for the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D242668
2025-05-15 04:46:20 +00:00
Paul Bone
5a56d09f72 Bug 1928254 - pt 5. Rename purge_result_t to avoid confusion with PurgeResult r=jstutte
Differential Revision: https://phabricator.services.mozilla.com/D242667
2025-05-15 04:46:17 +00:00
Paul Bone
3b891ccfc3 Bug 1928254 - pt 3. Time the purge operation in mozjemalloc r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D227442
2025-05-15 04:46:10 +00:00
Paul Bone
362172ca5b Bug 1928254 - pt 2. Add profiler callbacks for mozjemalloc r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D227441
2025-05-15 04:46:06 +00:00
Paul Bone
b1f31febeb Bug 1928254 - pt 1. Label arenas for the profiler r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D227440
2025-05-15 04:46:02 +00:00
Paul Bone
02be5aa7d9 Bug 1961719 - Add a script for tallying allocation requests r=glandium DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D246166
2025-05-14 04:14:21 +00:00
Paul Bone
951d362e5d Bug 1805606 - mozjemalloc_info now prints the regions per run and overhead r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D246169
2025-05-12 06:30:33 +00:00
Paul Bone
0ed9928804 Bug 1805606 - Pretty print jemalloc_info output r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D164629
2025-05-12 06:30:30 +00:00
Paul Bone
347c0ac1ff Bug 1961714 - Fix reenterant calls in logalloc r=glandium
TLS was causing a reenterant call to malloc which would deadlock in
logalloc.  If we take the logalloc lock after the call to the allocator we
avoid this.

Differential Revision: https://phabricator.services.mozilla.com/D246167
2025-04-30 05:26:59 +00:00
Paul Bone
3332980da8 Bug 1960869 - Fix builds with --project=memory r=glandium
* set FINAL_LIBRARY in mfbt and third_party_fmt only when not using
   --enable-project=memory
 * include third_party/fmt in memory/app.mozbuild

Differential Revision: https://phabricator.services.mozilla.com/D245716
2025-04-22 01:58:32 +00:00
Mike Hommey
8f860dc91b Bug 1955878 - Annotate unnecessary lock for Coverity. r=pbone
Differential Revision: https://phabricator.services.mozilla.com/D245681
2025-04-16 06:15:21 +00:00
Paul Bone
13aec57f05 Bug 1958750 - Fix some linting errors in mozjemalloc.cpp r=glandium DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D244541
2025-04-16 05:56:51 +00:00
Joel Maher
98ece24bd5 Bug 1959821 - cleanup and standardize remaining xpcshell.toml files. r=aryx,sync-reviewers,markh
Differential Revision: https://phabricator.services.mozilla.com/D245147
2025-04-15 20:24:35 +00:00
Alex Hochheiden
9e91a1f021 Bug 1715287 - [lint] Enable remaining pyupgrade rules and lint tree r=linter-reviewers,webdriver-reviewers,translations-reviewers,whimboo,sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D245320
2025-04-13 17:48:23 +00:00
Paul Bone
867b55e95d Bug 1955406 - Check for significant reuse after purging each chunk r=jstutte
Differential Revision: https://phabricator.services.mozilla.com/D243401
2025-03-31 02:42:56 +00:00
Mike Hommey
bb398a1499 Bug 1950254 - Experiment not randomizing arena ids. r=pbone,tjr
The hope is that this would remove some locking and allow some
performance improvement, while trying to preserve some amount of
obfuscation in the ids. Maybe that preservation is overkill, but
for now it will do.

Differential Revision: https://phabricator.services.mozilla.com/D239461
2025-03-21 08:47:17 +00:00
Mike Hommey
686607002d Bug 1953656 - Make it explicit which callers of ArenaCollection::iter skip main thread arenas. r=pbone
ArenaCollection::iter currently returns main thread arenas only when
it's called from the main thread. This is fine, but it makes it unclear
what callers are actually meaning to skip those arenas when not called
from the main thread.

It turns out most of the callers already assume they're on the main
thread, so most uses were fine, but some weren't.

We also remove iter_all, which is now redundant.

Differential Revision: https://phabricator.services.mozilla.com/D241329
2025-03-21 08:47:17 +00:00
Paul Bone
773705ea27 Bug 1950041 - Delay destruction of an arena until purging is complete r=glandium,jstutte
Differential Revision: https://phabricator.services.mozilla.com/D239297
2025-03-13 04:48:38 +00:00
Paul Bone
2d9c1c0d94 Bug 1950041 - Use an enum for Purge()'s return value r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D239296
2025-03-13 04:48:38 +00:00
Paul Bone
78472011d9 Bug 1950041 - Use an enum for the kind of purge condition r=glandium
This code previously used a boolean but an enum can have a clearer meaning.
This also removes default parameters ShouldContinuePurge and Purge.

Differential Revision: https://phabricator.services.mozilla.com/D240425
2025-03-13 04:48:37 +00:00
Paul Bone
a22334560f Bug 1950041 - Fix a comment r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D239295
2025-03-13 04:48:37 +00:00
Paul Bone
5f1366d65b Bug 1947687 - pt 8. Perform multiple purge steps without checking the list r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D238003
2025-03-13 00:42:35 +00:00
Paul Bone
615563ff15 Bug 1947687 - pt 7. Move the purge API between sections of malloc_decls.h r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D239840
2025-03-13 00:42:35 +00:00
Paul Bone
9044416b86 Bug 1947687 - pt 3. Remove the arena from the list while we still hold the lock r=jstutte
This avoids releasing the lock only to acquire it a few lines later.

Differential Revision: https://phabricator.services.mozilla.com/D239283
2025-03-13 00:42:33 +00:00
Paul Bone
61699c0d19 Bug 1947687 - pt 2. found is already known to be true here r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D238905
2025-03-13 00:42:32 +00:00
Paul Bone
d96065731f Bug 1947687 - pt 1. Correct some comments r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D238904
2025-03-13 00:42:32 +00:00
Goloman Adrian
7247c3bd2e Backed out changeset b1079967e846 (bug 1950254) for causing mass failures. CLOSED TREE 2025-03-12 04:45:29 +02:00
Mike Hommey
fd2148b6b9 Bug 1950254 - Experiment not randomizing arena ids. r=pbone,tjr
The hope is that this would remove some locking and allow some
performance improvement, while trying to preserve some amount of
obfuscation in the ids. Maybe that preservation is overkill, but
for now it will do.

Differential Revision: https://phabricator.services.mozilla.com/D239461
2025-03-12 01:10:41 +00:00
Goloman Adrian
6658461cac Backed out changeset 0ffb1294d3c2 (bug 1950254) for causing spidermonkey bustages @mozjemalloc.cpp. 2025-03-12 01:53:34 +02:00
Mike Hommey
6dba2fb0e0 Bug 1950254 - Experiment not randomizing arena ids. r=pbone,tjr
The hope is that this would remove some locking and allow some
performance improvement, while trying to preserve some amount of
obfuscation in the ids. Maybe that preservation is overkill, but
for now it will do.

Differential Revision: https://phabricator.services.mozilla.com/D239461
2025-03-11 22:55:05 +00:00
Butkovits Atila
fda0bb1a5c Backed out 6 changesets (bug 1947687) for causing SM bustages. CLOSED TREE
Backed out changeset 9012bfccb2cd (bug 1947687)
Backed out changeset 816244cab3f5 (bug 1947687)
Backed out changeset c13b82d1c924 (bug 1947687)
Backed out changeset 0f2a907ba40a (bug 1947687)
Backed out changeset e128af5f021f (bug 1947687)
Backed out changeset 589e781f35c2 (bug 1947687)
2025-03-06 09:42:44 +02:00
Paul Bone
b320220434 Bug 1947687 - pt 6. Perform multiple purge steps without checking the list r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D238003
2025-03-06 07:11:56 +00:00
Paul Bone
aeda339a65 Bug 1947687 - pt 5. Move the purge API between sections of malloc_decls.h r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D239840
2025-03-06 07:11:55 +00:00
Paul Bone
1def48fa07 Bug 1947687 - pt 3. Remove the arena from the list while we still hold the lock r=jstutte
This avoids releasing the lock only to acquire it a few lines later.

Differential Revision: https://phabricator.services.mozilla.com/D239283
2025-03-06 07:11:54 +00:00
Paul Bone
1cb54ef7ec Bug 1947687 - pt 2. found is already known to be true here r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D238905
2025-03-06 07:11:54 +00:00
Paul Bone
84dd60cc84 Bug 1947687 - pt 1. Correct some comments r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D238904
2025-03-06 07:11:53 +00:00
Jens Stutte
1953551574 Bug 1941085 - Elevate SafeOnThisThread to be available in diagnostic builds. r=pbone
Differential Revision: https://phabricator.services.mozilla.com/D240338
2025-03-05 08:07:35 +00:00
Jens Stutte
0be69025d9 Bug 1949155 - Use Relaxed memory ordering for malloc_initialized. r=glandium
We read this flag very often, so we want those reads to be fastest possible. We already protect writes by gInitLock, and on MSVC we even trust it to work without Atomic.
So Relaxed should be safe here.

Differential Revision: https://phabricator.services.mozilla.com/D238973
2025-03-03 08:36:55 +00:00