Norisz Fay
5dd128abb4
Backed out changeset 76200f16a497 (bug 1644983) for causing Bug 1930798, Bug 1930799, Bug 1930791 and other CacheFileIOManager related crashes CLOSED TREE
2024-11-13 06:23:51 +02:00
Valentin Gosu
5d3e7ab00e
Bug 1644983 - Make CacheIOThread a regular XPCOM thread and register thread with profiler r=necko-reviewers,dragana,profiler-reviewers,julienw,kershaw
...
I had big issues with this patch as it was causing random crashes
when run with MOZ_PROFILER_STARTUP=1 and breaking browser_xpcom_graph_wait.js
which does the same.
I tried to get around that by avoiding the IOInterposer registration
in CacheIOThread, but that was also problematic.
Eventually it seems there's no longer a good reason to keep calling
PR_CreateThread manually instead of NS_NewNamedThread, so I switched
to that and all of the previous issues are gone.
The stack is now twice as big, but hopefully that's not a major issue.
All other behaviour should stay the same.
Differential Revision: https://phabricator.services.mozilla.com/D132381
2024-11-12 19:12:43 +00:00
Sean
b963e7c0de
Bug 1922661 - Migrate NETWORK_CACHE_V2_MISS_TIME_MS, NETWORK_CACHE_HIT_MISS_STAT_PER_CACHE_SIZE, and NETWORK_CACHE_HIT_RATE_PER_CACHE_SIZE probes to glean r=acreskey,necko-reviewers,valentin
...
Differential Revision: https://phabricator.services.mozilla.com/D227697
2024-11-05 18:30:50 +00:00
longsonr
ad362610ef
Bug 1928694 - Replace mozilla::clamped with std::clamp r=kershaw,necko-reviewers
...
Differential Revision: https://phabricator.services.mozilla.com/D227677
2024-11-04 12:31:13 +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
Emilio Cobos Álvarez
b5d2263c26
Bug 1925866 - NS_NewLocalFile's aFollowSymlinks arg is unused. r=xpcom-reviewers,necko-reviewers,valentin,media-playback-reviewers,win-reviewers,karlt,nika,rkraesig
...
Remove it and related functions, and update the callers.
Differential Revision: https://phabricator.services.mozilla.com/D226261
2024-10-22 09:38:16 +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
Mike Hommey
a768bfcbee
Bug 1916883 - Add missing thread safety annotations. r=jesup
...
that now make clang trunk trip.
Differential Revision: https://phabricator.services.mozilla.com/D221580
2024-09-26 06:23:06 +00:00
Norisz Fay
7cf5dbf4c5
Backed out changeset a0539f2c0768 (bug 1644983) for causing bc failures on browser_xpcom_graph_wait.js and Gtest failure
2024-09-11 17:04:10 +03:00
Valentin Gosu
ddfd576478
Bug 1644983 - Register CacheIOThread thread with profiler r=necko-reviewers,dragana,profiler-reviewers,julienw
...
Differential Revision: https://phabricator.services.mozilla.com/D132381
2024-09-11 11:06:35 +00:00
Randell Jesup
7e3082bede
Bug 1829029: clean up memory reporting for CacheFileIOManager r=necko-reviewers,valentin
...
Differential Revision: https://phabricator.services.mozilla.com/D221350
2024-09-09 14:14:01 +00:00
Noemi Erli
971c9b0a9f
Backed out changeset 8988a0dd2371 (bug 1829029) for causing build bustages in CacheFileIOManager.cpp CLOSED TREE
2024-09-09 16:51:34 +03:00
Randell Jesup
823ed11ffd
Bug 1829029: clean up memory reporting for CacheFileIOManager r=necko-reviewers,valentin
...
Differential Revision: https://phabricator.services.mozilla.com/D221350
2024-09-09 13:28:44 +00:00
Iulian Moraru
0a279923dc
Backed out changeset 09fe0536f70e (bug 1829029) for causing build bustages on CacheFileIOManager.cpp. CLOSED TREE
2024-09-09 16:08:34 +03:00
Randell Jesup
5735ab69a5
Bug 1829029: clean up memory reporting for CacheFileIOManager r=necko-reviewers,valentin
...
Differential Revision: https://phabricator.services.mozilla.com/D221350
2024-09-09 12:44:59 +00:00
Florian Quèze
04b3dd73c0
Bug 1913624 - Remove expired telemetry histograms HTTP_NET_VS_CACHE_*_V2, r=chutten,necko-reviewers,TravisLong,kershaw.
...
Depends on D219450
Differential Revision: https://phabricator.services.mozilla.com/D219451
2024-08-23 16:27:16 +00:00
Florian Quèze
58a1174f93
Bug 1913624 - Remove expired telemetry histograms HTTP_CACHE_IO_*, r=chutten,necko-reviewers,kershaw.
...
Depends on D219449
Differential Revision: https://phabricator.services.mozilla.com/D219450
2024-08-23 16:27:16 +00:00
Sean
0dfb26d162
Bug 1908994 - Migrate NETWORK_CACHE_METADATA_* probes to Glean r=kershaw,acreskey,necko-reviewers
...
Differential Revision: https://phabricator.services.mozilla.com/D217177
2024-07-25 16:39:48 +00:00
edgul
faae091788
Bug 1819147 - Fixed clearOriginAttributes not clearing all cache entries specificed with userContext r=valentin,necko-reviewers
...
Differential Revision: https://phabricator.services.mozilla.com/D213368
2024-06-13 21:44:51 +00:00
Sean
141fb31205
Bug 1894995 - Remove deprecated nslCacheEntry methods and their implementations r=valentin,necko-reviewers,places-reviewers
...
Differential Revision: https://phabricator.services.mozilla.com/D209460
2024-05-27 13:08:19 +00:00
Harshit Sohaney
ffbc69a780
Bug 1895978 - Add the new clear on shutdown cache pref to the cache purging task code. r=pbz,necko-reviewers,valentin
...
Differential Revision: https://phabricator.services.mozilla.com/D210681
2024-05-25 15:19:14 +00:00
Cosmin Sabou
86c3cf58d6
Backed out changeset 9866ca157a60 (bug 1894995) for causing several xpcshell failures.
2024-05-23 00:35:42 +03:00
Sean
eb86e72321
Bug 1894995 - Remove deprecated nslCacheEntry methods and their implementations r=valentin,necko-reviewers
...
Differential Revision: https://phabricator.services.mozilla.com/D209460
2024-05-22 15:12:48 +00:00
Natalia Csoregi
173d5cf3e7
Backed out changeset 8abbf422db5c (bug 1894995) for causing bustage on nsHttpChannel.cpp CLOSED TREE
2024-05-17 12:52:02 +03:00
Sean
f0b9488bb5
Bug 1894995 - Remove deprecated nslCacheEntry methods and their implementations r=valentin,necko-reviewers
...
Differential Revision: https://phabricator.services.mozilla.com/D209460
2024-05-17 09:21:38 +00:00
Emilio Cobos Álvarez
8aaf44fea9
Bug 1893683 - Remove ns{A,C}String and other xpcom dependencies from nsStringBuffer. r=smaug,media-playback-reviewers,karlt
...
* nsStringBuffer::FromString -> nsTSubString::GetStringBuffer
* nsStringBuffer::ToString -> nsTSubString::Assign(nsStringBuffer*, len)
* Move refcounting inline but refcount-logging and other XPCOM-related
things out-of-line.
Differential Revision: https://phabricator.services.mozilla.com/D208771
2024-05-09 08:34:35 +00:00
Kershaw Chang
8c60fc5a5c
Bug 1893075 - Refactor CacheFileIOManager::Write, r=necko-reviewers,valentin
...
Differential Revision: https://phabricator.services.mozilla.com/D208739
2024-05-03 07:50:38 +00:00
Nika Layzell
a48079cd72
Bug 1881863 - Part 1: Standardize on boolean over bool in xpidl, r=xpcom-reviewers,necko-reviewers,valentin,extension-reviewers,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,search-reviewers,anti-tracking-reviewers,places-reviewers,nalexander,emilio,zombie,sgalich,karlt,lina,Standard8
...
Previously the `boolean` type was also declared using a `bool` typedef in
xpidl, meaning that both were used in various places. This patch standardizes
on the built-in `boolean` type, removing the typedef.
Differential Revision: https://phabricator.services.mozilla.com/D206382
2024-04-04 18:45:21 +00:00
sunil mayya
342149fc2f
Bug 1845848 - prevent disk cache entries eviction for private browsing mode. r=necko-reviewers,valentin
...
The assertion in the bug is because we were trying to evict disk cache entries in the context of private browsing mode.
Generally, for Private browsing mode we don't write use Disk Storage. During the [initialization](https://searchfox.org/mozilla-central/source/netwerk/cache2/CacheStorageService.cpp#1557 ). of storage entry, WriteToDisk[https://searchfox.org/mozilla-central/rev/5f0a7ca8968ac5cef8846e1d970ef178b8b76dcc/netwerk/cache2/CacheStorage.h#54 ] will be false due to private browsing mode. Due to this, we are sure that private browsing mode cache entries wont be written to disks.
The solution for the bug here is to prevent an attempt to evict the disk cache entries in private browsing mode, similar to the check in [DoomStorageEntries](https://searchfox.org/mozilla-central/source/netwerk/cache2/CacheStorageService.cpp#1929 ).
Differential Revision: https://phabricator.services.mozilla.com/D204810
2024-03-18 08:49:10 +00:00
Artur Iunusov
b1d6f2eeb8
Bug 1770944 - Remove other references to inBrowserElement, r=cookie-reviewers,valentin,janv,decoder
...
Depends on D183230
Differential Revision: https://phabricator.services.mozilla.com/D189490
2024-03-07 13:04:23 +00:00
Jens Stutte
bf51a8ef09
Bug 1879814 - Rename network.cache.purgebyfrecency_minprogress_xxx to network.cache.purge_minprogress_xxx and use it for all purge variants. r=necko-reviewers,jesup,valentin
...
Disk operations may cause blocking IO, so for now we do not force any minprogress for the disk backed cache.
Differential Revision: https://phabricator.services.mozilla.com/D202172
2024-03-04 08:45:45 +00:00
Narcis Beleuzu
7eae8c1064
Backed out 16 changesets (bug 1770944) as req by asuth.
...
Backed out changeset 61af32f40777 (bug 1770944)
Backed out changeset 4ff0c45db93b (bug 1770944)
Backed out changeset 8a217eff7bcd (bug 1770944)
Backed out changeset 6435f48c96bf (bug 1770944)
Backed out changeset 0d2432765ca0 (bug 1770944)
Backed out changeset 58e02566db85 (bug 1770944)
Backed out changeset 0a8c4c2460ee (bug 1770944)
Backed out changeset 9416bafd9982 (bug 1770944)
Backed out changeset 79de4f83fe2e (bug 1770944)
Backed out changeset 63ac518aceb0 (bug 1770944)
Backed out changeset 14952f872b77 (bug 1770944)
Backed out changeset f65e0967ad75 (bug 1770944)
Backed out changeset bd53c42038f7 (bug 1770944)
Backed out changeset 36c378ba8212 (bug 1770944)
Backed out changeset 9ba54ab06348 (bug 1770944)
Backed out changeset fb5a54b3cbe9 (bug 1770944)
2024-02-23 21:11:08 +02:00
Artur Iunusov
bb8df1117c
Bug 1770944 - Remove other references to inBrowserElement, r=cookie-reviewers,valentin,janv,decoder
...
Depends on D183230
Differential Revision: https://phabricator.services.mozilla.com/D189490
2024-02-22 10:13:15 +00:00
Sandor Molnar
be27c149eb
Backed out 16 changesets (bug 1770944) for causing asan failures @ dom/base/InProcessBrowserChildMessageManager.cpp
...
Backed out changeset b73885731e73 (bug 1770944)
Backed out changeset 23d0dc98eb51 (bug 1770944)
Backed out changeset 15661e24d8e1 (bug 1770944)
Backed out changeset 97aa839dc200 (bug 1770944)
Backed out changeset 0d4318bf3239 (bug 1770944)
Backed out changeset be28bb62e9f3 (bug 1770944)
Backed out changeset 708b2671410e (bug 1770944)
Backed out changeset 0a138f3b56b9 (bug 1770944)
Backed out changeset 3a149ef794c2 (bug 1770944)
Backed out changeset 4b6ae7dd0e69 (bug 1770944)
Backed out changeset e3960ad85182 (bug 1770944)
Backed out changeset 9ea253525227 (bug 1770944)
Backed out changeset 1828b66c2f7c (bug 1770944)
Backed out changeset 55b0886f9025 (bug 1770944)
Backed out changeset a4197071d10a (bug 1770944)
Backed out changeset 9b18524f541e (bug 1770944)
2024-02-20 20:34:55 +02:00
Artur Iunusov
981b9eb009
Bug 1770944 - Remove other references to inBrowserElement, r=cookie-reviewers,valentin,janv,decoder
...
Depends on D183230
Differential Revision: https://phabricator.services.mozilla.com/D189490
2024-02-20 16:53:24 +00:00
Jens Stutte
fbd53c42ed
Bug 1879800 - Avoid WalkMemoryCacheRunnable::mEntryArray to be shifted on each iteration. r=necko-reviewers,valentin
...
Differential Revision: https://phabricator.services.mozilla.com/D201368
2024-02-13 12:06:06 +00:00
Valentin Gosu
9c3188ab6c
Bug 1854621 - Remove unused NETWORK_CACHE_SIZE_FULL_FAT r=necko-reviewers,kershaw
...
Differential Revision: https://phabricator.services.mozilla.com/D201068
2024-02-12 13:49:33 +00:00
Jens Stutte
5283906ab9
Bug 1875859 - Refactor MemoryPool::PurgeExpired and PurgeByFrecency to reduce overhead and protect against races while sorting. r=necko-reviewers,valentin
...
A `CacheEntry`'s `mExpirationTime` and `mFrecency` can be updated asynchronously while sorting. This is at best undefined behavior and at worst it can derail `std::sort`'s algorithm out of bounds.
Looking a bit closer it turns out that sorting for `PurgeExpired` is actually not needed and we can have just a `mManagedEntries` linked list in a memory pool instead of two arrays. This way we can also achieve constant O(1) time for unregistering entries when purging.
`PurgeByFrecency` needs sorting and must ensure to not race with modifications of `mFrecency`. We ensure to make some progress on each run to compensate for the cost of sorting.
We also do `PurgeExpired` always, not only if under memory pressure, as it is cheap (no sorting) and interuptable., as well as an emergency handling if `PurgeByFrecency` failed to allocate the auxiliary sort array.
Differential Revision: https://phabricator.services.mozilla.com/D199955
2024-02-12 12:22:03 +00:00
Perry McManis
b3e0fa054d
Bug 1877839 - Migrate GVST metrics in the network namespace to pure glean r=chutten,necko-reviewers,valentin
...
GVST is how these probes sent data in Fenix and is now unnecessary (and doesn't send data in Fenix release) since Firefox Desktop has direct access to Glean. We therefore need to clean them up in some capacity.
Following the recommendations from the GeckoView Streaming (GVST) validation effort, this is a pure Glean api implementation of the metrics that fell under network in geckoview streaming.
Each metric retains its previous name, and gains a Glean Interface for FireFox Telemetry (GIFFT) version, such that downstream data analyses will not be impacted.
Several metrics were not recorded in the current codebase and have been removed.
Differential Revision: https://phabricator.services.mozilla.com/D200400
2024-02-08 14:36:14 +00:00
Randell Jesup
e47f68f60e
Bug 1862556: Allow LongTask markers to be generated for any nsThread r=nika
...
Differential Revision: https://phabricator.services.mozilla.com/D192532
2023-12-07 04:15:44 +00:00
Cristian Tuns
d7a07e4b57
Backed out 2 changesets (bug 1862556, bug 1862557) for causing build bustages in nsThreadManager.cpp CLOSED TREE
...
Backed out changeset 4ef47a21279a (bug 1862557)
Backed out changeset 2573ea9f377b (bug 1862556)
2023-12-06 17:33:12 -05:00
Randell Jesup
c645765422
Bug 1862556: Allow LongTask markers to be generated for any nsThread r=nika
...
Differential Revision: https://phabricator.services.mozilla.com/D192532
2023-12-06 18:38:49 +00:00
Sylvestre Ledru
ef35fa7374
Bug 1519636 - Reformat recent changes to the Google coding style r=emilio,media-playback-reviewers,padenot
...
clang-format version 17.0.6 (taskcluster-QueHFUviQeyM8Y7r_d7MQQ)
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D195397
2023-12-04 10:09:36 +00:00
Kershaw Chang
0a57498316
Bug 1736385 - Make sure thread is alive in CacheIOThread::ThreadFunc, r=necko-reviewers,valentin
...
Differential Revision: https://phabricator.services.mozilla.com/D193640
2023-11-22 16:26:15 +00:00
Valentin Gosu
e4b4f23ffb
Bug 1848542 - Add telemetry for residual cache folder removal or failure r=necko-reviewers,kershaw
...
Differential Revision: https://phabricator.services.mozilla.com/D194076
2023-11-21 17:29:08 +00:00
Valentin Gosu
ce931ebd84
Bug 1848542 - Do a cache cleanup when cache purging is enabled r=necko-reviewers,kershaw
...
It seems that sometimes the cache purge task may fail to remove the
cache folder. When that happens, we might end up with multiple cache
folders in the profile folder. Since the task is unable to remove it,
we should remove the folders on a background thread (check once a day)
Differential Revision: https://phabricator.services.mozilla.com/D194051
2023-11-21 17:29:08 +00:00
Andrew Creskey
5f77d97000
Bug 1648002 - Intermittent Assertion failure: mInsideLoop in CacheIOThread.cpp r=valentin,necko-reviewers
...
We will no longer dispatch timer events to the cacheIOThread after shutdown as they would not be proccessed (and trigger an assertion in debug builds).
Differential Revision: https://phabricator.services.mozilla.com/D191899
2023-10-26 12:21:48 +00:00
Kershaw Chang
179a4792c5
Bug 1858657 - Set mShutdown to true to avoid crashing, r=necko-reviewers,valentin
...
Differential Revision: https://phabricator.services.mozilla.com/D190790
2023-10-16 08:05:19 +00:00
Kershaw Chang
537380474e
Bug 1736385 - Assert if mShutdown is true in destructor, r=necko-reviewers,jesup
...
Differential Revision: https://phabricator.services.mozilla.com/D185417
2023-08-14 15:49:30 +00:00