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

573 Коммитов

Автор SHA1 Сообщение Дата
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
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
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 039c4531eb Bug 1822451 - Don't include PHC guard pages in explicit memory r=decoder
Differential Revision: https://phabricator.services.mozilla.com/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
Paul Bone a08a5cccf3 Bug 1822451 - Add about:memory entries for PHC r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D173099
2023-03-29 11:08:17 +00:00
Paul Bone cd6b755d18 Bug 1822451 - Don't include PHC guard pages in explicit memory r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D172655
2023-03-29 11:08:16 +00:00
Brad Werth 706117a7d7 Bug 1792146: Make replace_malloc_usable_size succeed with pointers within allocation pages. r=glandium
This changes replace_malloc_usable_size to allow measuring the size of
ptrs that appear anywhere within an allocation page, not just ptrs to the
start of the allocation pages.

This also modifies a gtest to explicitly check the usable size of some
modified pointers, not just the usable size of the pages where those
pointers are located.

Differential Revision: https://phabricator.services.mozilla.com/D170963
2023-03-09 23:12:20 +00:00
Olli Pettay c1c5ec3417 Bug 1815069 - Make it possible to tweak mozjemalloc's max dirty page sizes dynamically, r=glandium,pbone
Differential Revision: https://phabricator.services.mozilla.com/D168900
2023-03-02 09:15:57 +00:00
Nazım Can Altınova c896734446 Bug 1779257 - Fix the stack walking for linux markers by calling getcontext in a valid stack frame r=mstange
See my comment on here for more context of my investigation:
https://bugzilla.mozilla.org/show_bug.cgi?id=1779257#c9

The saved context is invalid once the function that called `getcontext`
returns. We need to call the `getcontext` while the frame where we called it is
still on the stack. That's why this patch is moving the call to `getcontext` to
parent function by inlining the SyncPopulate content by using a macro instead.
This has to be a macro instead of a function because stack pointer address will
be invalid once the `Registers::SyncPopulate` returns. I tried to change this
method to inline but that didn't help either.

Differential Revision: https://phabricator.services.mozilla.com/D170133
2023-02-22 19:57:08 +00:00
Cosmin Sabou ffddc62071 Bug 1801836 - Fix black linting opt failure on memory/replace/dmd/dmd.py. a=lint-fix 2022-12-25 11:35:54 +02:00
Marco Castelluccio f69e697461 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
Jeff Muizelaar d7cb72e2ac Bug 1805690 - Convert block_analyzer.py to python3. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D164687
2022-12-15 18:08:40 +00:00
Barret Rennie 5dc88760d5 Bug 1541508 - Use Services.env in memory/ r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D160141
2022-11-25 19:09:08 +00:00
Marco Castelluccio 54eb2ccba2 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
Robert Longson f39b618ff1 Bug 1799630 - replace sprintf by snprintf or SprintfLiteral r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D161573
2022-11-10 07:01:11 +00:00