589 Commits

Author SHA1 Message Date
Sylvestre Ledru
cd289bcb06 Bug 1921433 - reformat with black 24.8.0 r=linter-reviewers,webdriver-reviewers,perftest-reviewers,taskgraph-reviewers,releng-reviewers,dom-storage-reviewers,janv,jmaher,whimboo,afinder,ahal
Differential Revision: https://phabricator.services.mozilla.com/D223963
2024-11-03 20:28:59 +00:00
serge-sans-paille
8a0a0f7524 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
8be45dd280 Backed out changeset 4b1409597101 (bug 1920718) for causing bp bustages on rapl.cpp. 2024-10-08 23:27:18 +03:00
serge-sans-paille
069a97307f 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
Andrew McCreight
68868f579a Bug 1904685 - Output the addresses in dmd.py, when present. r=pbone
With heap scan mode, the DMD log includes the address of every block.
This patch includes the addresses in the output, if they are present.
This is useful when no cycle collected objects are leaked.

Differential Revision: https://phabricator.services.mozilla.com/D214880
2024-06-26 23:25:15 +00:00
Iulian Moraru
6c7b88f2f5 Backed out changeset 55f412f509f8 (bug 1904685) for causing xpcshell failures on test_dmd.js. CLOSED TREE 2024-06-27 01:02:57 +03:00
Andrew McCreight
6848b826e0 Bug 1904685 - Output the addresses in dmd.py, when present. r=pbone
With heap scan mode, the DMD log includes the address of every block.
This patch includes the addresses in the output, if they are present.
This is useful when no cycle collected objects are leaked.

Differential Revision: https://phabricator.services.mozilla.com/D214880
2024-06-26 18:10:29 +00:00
serge-sans-paille
ae07881baa 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
b9f78f0cc2 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
22c92af506 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
863475a670 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
a86fd1fb23 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
469e6b7b31 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
78ac6a6ccf 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
2edc0f7892 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
02fb924e9b 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
Joel Maher
9d203b1d46 Bug 1859893 - batch 15 - migrate xpcshell.ini -> .toml. r=aryx,geckoview-reviewers,extension-reviewers,valentin,cookie-reviewers,pbz,owlish,robwu
Differential Revision: https://phabricator.services.mozilla.com/D194384
2023-11-24 14:41:35 +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
Paul Bone
916b2a572d Bug 1854550 - pt 1. Fix a comment r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D188982
2023-10-19 06:38:39 +00:00
Sylvestre Ledru
1e776756dd Bug 1856795 - ride along: use = default; on some recently modified files r=emilio
More on:
https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-equals-default.html

Command:
L=$(hg export -r tip|grep +++|cut -d/ -f2-)
./mach static-analysis check --checks="-*, modernize-use-equals-default" --fix $L

Differential Revision: https://phabricator.services.mozilla.com/D191016
2023-10-15 15:29:03 +00:00
Sylvestre Ledru
d0f6c7fc66 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-15 15:29:02 +00:00
Cristina Horotan
6a90f5eded Backed out 2 changesets (bug 1856795) for causing build bustage at BasicEvents.h CLOSED TREE
Backed out changeset 1d98b028923a (bug 1856795)
Backed out changeset eae2ac93e17c (bug 1856795)
2023-10-14 21:42:14 +03:00
Sylvestre Ledru
c164bd9937 Bug 1856795 - ride along: use = default; on some recently modified files r=emilio
More on:
https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-equals-default.html

Command:
L=$(hg export -r tip|grep +++|cut -d/ -f2-)
./mach static-analysis check --checks="-*, modernize-use-equals-default" --fix $L

Differential Revision: https://phabricator.services.mozilla.com/D191016
2023-10-14 17:34:27 +00:00
Sylvestre Ledru
cc8a0ee742 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-14 17:34:26 +00:00
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
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
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
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
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
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
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
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
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
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