Commit Graph
198 Commits
Author SHA1 Message Date
Paul Bone 1879025654 Bug 2014781 - Restore the sub-page size class r=glandium
This reverts Bug 1980056 part 6.

Differential Revision: https://phabricator.services.mozilla.com/D297237
2026-05-31 23:27:24 +00:00
Silaghi 688b962a0b Revert "Bug 2014781 - gPageSize follows gRealPageSize r=glandium" for causing mochitests failures at toolkit/content
This reverts commit 3c629953cf.

Revert "Bug 2014781 - Restore the sub-page size class r=glandium"

This reverts commit 606f7ea614.
2026-05-14 07:39:36 +00:00
Paul Bone 606f7ea614 Bug 2014781 - Restore the sub-page size class r=glandium
This reverts Bug 1980056 part 6.

Differential Revision: https://phabricator.services.mozilla.com/D297237
2026-05-14 03:15:33 +00:00
Sylvestre Ledru f7691d9032 Bug 2023419 - Remove Emacs/Vim modelines from memory/ r=emilio
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287854
2026-03-17 12:05:51 +00:00
Paul Bone 2ec92a906e Bug 1980056 - pt 6. Remove the sub-page size class r=glandium
With page size limited to 4KiB and the quantum-wide class covering the
range from 512 bytes to 4KiB, the sub-page size class is unused and can
be removed.

Differential Revision: https://phabricator.services.mozilla.com/D259220
2026-02-03 04:14:10 +00:00
agoloman 15e87a3496 Revert "Bug 1980056 - pt 2. Remove the sub-page size class r=glandium" for causing Bug 2010505.
This reverts commit 784e006a34.

Revert "Bug 1980056 - pt 1. Limit logical page size to 4KiB r=glandium"

This reverts commit 01d083e3c6.
2026-01-16 04:20:26 +00:00
Paul Bone 784e006a34 Bug 1980056 - pt 2. Remove the sub-page size class r=glandium
With page size limited to 4KiB and the quantum-wide class covering the
range from 512 bytes to 4KiB, the sub-page size class is unused and can
be removed.

Differential Revision: https://phabricator.services.mozilla.com/D259220
2026-01-15 03:30:13 +00:00
serge-sans-paille 51da93ac26 Bug 1997204 - Remove unused mfbt inclusion in mfbt/** r=emilio
As a side effect, also move content of JSONWriter.cpp as a static
constexpr local variable in JSONWriter.h.

Differential Revision: https://phabricator.services.mozilla.com/D270617
2025-10-31 08:06:03 +00:00
serge-sans-paille 7662b3abdc Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 19:36:01 +00:00
Cristina Horotan 8a1b1970b7 Revert "Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch" for causing Gtest failures on AlreadyAddRefed.h
This reverts commit e98adca292.
2025-10-21 16:16:29 +00:00
serge-sans-paille e98adca292 Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 15:05:17 +00:00
Cristina Horotan aab924e90d Revert "Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch" for causing build bustage at nsBrowserApp.cpp
This reverts commit fd0ffa193c.
2025-10-21 10:44:13 +00:00
serge-sans-paille fd0ffa193c Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 09:44:11 +00:00
Narcis Beleuzu e1e6bbb1c9 Revert "Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch" for causing bustages on Document.cpp
This reverts commit b23c15e927.
2025-10-21 06:34:58 +00:00
serge-sans-paille b23c15e927 Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 06:01:36 +00:00
Ryan VanderMeulen f6ae20842d Bug 1991644 - Set the minimum Android version to 26 for LLVM & NDK. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D268815
2025-10-18 00:55:26 +00:00
serge-sans-paille 6f55e56805 Bug 1982008 - Move logalloc test to memory/replace/logalloc/replay/moz.build r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D260458
2025-10-15 07:06:41 +00:00
Narcis Beleuzu 5bcef56629 Revert "Bug 1974864 - Cannot build memory after changes to Timestamp.h r=firefox-build-system-reviewers,ahochheiden" for causing build bustages
This reverts commit 2e7e617051.
2025-07-22 22:22:00 +00:00
Nick Alexander 2e7e617051 Bug 1974864 - Cannot build memory after changes to Timestamp.h r=firefox-build-system-reviewers,ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D255559
2025-07-22 21:55:48 +00:00
Paul Bone cc9959f87e Bug 1928254 - pt 3b. Time the purge operation in mozjemalloc r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D227442
2025-05-27 08:04:13 +00:00
Paul Bone f20cfedd00 Bug 1928254 - pt 2. Add profiler callbacks for mozjemalloc r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D227441
2025-05-27 08:04:05 +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 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
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 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 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 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
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
serge-sans-paille 5946338a6a Bug 1920718 - Annotate all global variable with runtime initialization attributes r=glandium,application-update-reviewers,media-playback-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,gfx-reviewers,aosmond,lina,nalexander,aabh,geckoview-reviewers,win-reviewers,gstoll,m_kato
MOZ_RUNINIT => initialized at runtime
MOZ_CONSTINIT => initialized at compile time
MOZ_GLOBINIT => initialized either at runtime or compile time, depending on template parameter, macro parameter etc
This annotation is only understood by our clang-tidy plugin. It has no
effect on regular compilation.

Differential Revision: https://phabricator.services.mozilla.com/D223341
2024-10-30 11:05:24 +00:00
Tamas Szentpeteri 8285dfaab8 Backed out changeset 4b1409597101 (bug 1920718) for causing bp bustages on rapl.cpp. 2024-10-08 23:27:18 +03:00
serge-sans-paille 1966f9a43c Bug 1920718 - Annotate all global variable with runtime initialization as MOZ_RUNINIT r=application-update-reviewers,media-playback-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,gfx-reviewers,aosmond,lina,nalexander,aabh
This annotation is only understood by our clang-tidy plugin. It has no
effect on regular compilation.

Differential Revision: https://phabricator.services.mozilla.com/D223341
2024-10-08 16:49:51 +00:00
serge-sans-paille 92898987ae Bug 1883940 - Replace MOZ_CXX11 autoconf macro by a moz.configure check r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D203781
2024-05-18 07:10:57 +00:00
serge-sans-paille 5a9d6310bd Bug 1883615 - Move libdl checks to moz.configure and make libdl dependencies explicit r=glandium
The -ldl flag was previously set globally, it's now set for the libs
that use it.

Also rationalize the difference between HAVE_DLOPEN and HAVE_DLFCN_H.

Differential Revision: https://phabricator.services.mozilla.com/D203594
2024-05-15 20:29:07 +00:00
Tamas Szentpeteri 9284cf9c8d Backed out 3 changesets (bug 1883720, bug 1883719, bug 1883615) for causing multiple failures. CLOSED TREE
Backed out changeset 495b9e84ba9d (bug 1883720)
Backed out changeset 5a89cbc54dd2 (bug 1883615)
Backed out changeset 9d075e352b0e (bug 1883719)
2024-05-15 13:30:17 +03:00
serge-sans-paille 87ba4d7378 Bug 1883615 - Move libdl checks to moz.configure and make libdl dependencies explicit r=glandium
The -ldl flag was previously set globally, it's now set for the libs
that use it.

Also rationalize the difference between HAVE_DLOPEN and HAVE_DLFCN_H.

Differential Revision: https://phabricator.services.mozilla.com/D203594
2024-05-15 07:47:55 +00:00
Tamas Szentpeteri eb8b4510b2 Backed out changeset 4309f75eaa90 (bug 1883615) for causing build bustages related to check_symbol_in_libs. CLOSED TREE 2024-04-17 12:57:02 +03:00
serge-sans-paille b70d041323 Bug 1885334 - Change the signature of FdPrintf to use a platform-dependently-sized argument type r=glandium
That way we avoid some spurious casts

Differential Revision: https://phabricator.services.mozilla.com/D204648
2024-04-17 09:36:13 +00:00
serge-sans-paille 795ce760bb Bug 1883615 - Move libdl checks to moz.configure and make libdl dependencies explicit r=glandium
The -ldl flag was previously set globally, it's now set for the libs
that use it.

Also rationalize the difference between HAVE_DLOPEN and HAVE_DLFCN_H.

Differential Revision: https://phabricator.services.mozilla.com/D203594
2024-04-17 09:33:00 +00:00
Paul Bone 8339509cc6 Bug 1885466 - Rename jemalloc_stats::page_cache to pages_dirty r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D204724
2024-03-28 02:41:09 +00:00
Paul Bone 1340507230 Bug 1857841 - pt 9. Count fresh and madvised memory separately r=glandium
This memory was previously measured as part of committed memory.  However
depending on the OS it will often not be committed.  It's more accurate to
count it separately as part of mozjemalloc's cache of unused pages.

This patch adds counters for both fresh and madvised memory and no-longer
counts either as "committed" as it previously did.

This has the side effect of changing decisions based on the size of this
cache such as when to purge memory.

Differential Revision: https://phabricator.services.mozilla.com/D200415
2024-03-19 01:42:43 +00:00
Paul Bone e2b461d62c 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
Marco Castelluccio ba39d286d5 Bug 1801836 - Remove no longer necessary 'from __future__' imports. r=linter-reviewers,glandium,webdriver-reviewers,perftest-reviewers,geckoview-reviewers,jld,ahal,owlish,afinder DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D165395
2022-12-23 22:45:46 +00:00
Marco Castelluccio 2f87fd2751 Bug 1790816 - Reformat memory/ with isort. r=linter-reviewers,ahal DONTBUILD
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D162658
2022-11-24 15:10:26 +00:00
Tom Ritter 01aa73d4f9 Bug 1794594: Remove codeql builds r=freddyb,firefox-build-system-reviewers,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D159433
2022-10-17 15:02:39 +00:00
Ray Kraesig 443cdd5466 Bug 1716727 - patchset #3 [1/1] - Cleanup: remove intermediate function r=glandium
Since mozglue is now aware of Gecko process-types, remove the
configurator for this bug's associated experiment. Instead, use
`GeckoProcessType` directly in mozjemalloc.

This requires a couple of adjustments for non-Firefox uses of
mozjemalloc:

- Since `logalloc-replay` uses mozjemalloc in an odd way, tweak its
  `moz.build` to also include `mozglue/misc/ProcessType.cpp`.
- Since `GeckoProcessType` is not available in standalone SpiderMonkey
  builds, make the mostly-arbitrarily choice to always stall there.

No functional changes.

Differential Revision: https://phabricator.services.mozilla.com/D155300
2022-08-25 14:44:47 +00:00
Fabrice Desré e29be44cb7 Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-03 16:39:41 +00:00
Andreea Pavel fc724b92fc Backed out changeset b9d2965591b9 (bug 1761040) for landing with wrong author CLOSED TREE DONTBUILD 2022-08-03 18:55:00 +03:00
Andreea Pavel eda47f3911 Bug 1761040 - Prefix thread safety macros with MOZ_ r=geckoview-reviewers,media-playback-reviewers,alwu,jesup,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D152575
2022-08-03 15:27:43 +00:00
Andreea Pavel c2e97d2e06 Backed out changeset a907159a482f (bug 1761040) for causing build bustages on a CLOSED TREE 2022-08-02 04:59:08 +03:00