Commit Graph
122 Commits
Author SHA1 Message Date
Damien Carver 9f29376065 Bug 1635350 - Remove MOZ_GECKO_PROFILER ifdef. r=necko-reviewers,whimboo,geckoview-reviewers,webrtc-reviewers,devtools-reviewers,profiler-reviewers,dom-storage-reviewers,translations-reviewers,canaltinova,TravisLong,valentin,m_kato,jesup,bwc,nchevobbe,jari
The maintenance cost of supporting non-profiler builds now outweighs the benefits.
While previously maintained for Tier 3 platforms, the profiler now supports marker recording across these targets.
Removing this toggle simplifies the build system and allows for faster development.

Differential Revision: https://phabricator.services.mozilla.com/D284849
2026-03-13 08:39:58 +00:00
Silaghi 890797b8d6 Revert "Bug 1635350 - Remove MOZ_GECKO_PROFILER ifdef. r=necko-reviewers,whimboo,geckoview-reviewers,webrtc-reviewers,devtools-reviewers,profiler-reviewers,dom-storage-reviewers,translations-reviewers,canaltinova,TravisLong,valentin,m_kato,jesup,bwc,nchevobbe,jari" for causing build bustages
This reverts commit 9c6ccb9aae.
2026-03-11 14:45:41 +00:00
Damien Carver 9c6ccb9aae Bug 1635350 - Remove MOZ_GECKO_PROFILER ifdef. r=necko-reviewers,whimboo,geckoview-reviewers,webrtc-reviewers,devtools-reviewers,profiler-reviewers,dom-storage-reviewers,translations-reviewers,canaltinova,TravisLong,valentin,m_kato,jesup,bwc,nchevobbe,jari
The maintenance cost of supporting non-profiler builds now outweighs the benefits.
While previously maintained for Tier 3 platforms, the profiler now supports marker recording across these targets.
Removing this toggle simplifies the build system and allows for faster development.

Differential Revision: https://phabricator.services.mozilla.com/D284849
2026-03-11 14:27:55 +00:00
serge-sans-paille 7359a48cea Bug 2016347 - Do not use out-of-class C++ default destructor r=emilio,necko-reviewers,layout-reviewers,valentin
This change makes some types trivially destructible while making the
code easier to read and maintain.

Occurrences found by clang-tidy's performance-trivially-destructible
check.

Differential Revision: https://phabricator.services.mozilla.com/D282994
2026-02-12 15:54:53 +00:00
Andrew McCreight 1e71b78835 Bug 2003396 - Remove the uses of nsISizeOf from netwerk/cache2/. r=necko-reviewers,valentin
The only implementation of nsISizeOf are various nsIURI implementations,
so nsITimer and nsIFile will never implement it, which is what all of
these fields are.

Also remove a few other references to nsISizeOf that I don't think
are too useful.

Differential Revision: https://phabricator.services.mozilla.com/D274676
2025-12-02 14:01:56 +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
Valentin Gosu dcff315b60 Bug 1644983 - Register CacheIOThread thread with profiler r=profiler-reviewers,mstange
This also increases the stack size of the thread so that we can successfully unwind it on Linux. See
bug 1952391 for more details.

Differential Revision: https://phabricator.services.mozilla.com/D240704
2025-03-07 00:46:14 +00:00
Randell Jesup 10fdf6c849 Bug 1936898: Correct RaceCacheWithNetwork stats r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D231984
2024-12-18 19:42:32 +00:00
Norisz Fay 9751c34514 Backed out changeset 0f41672e761b (bug 1936898) for causing xpcshell failures on test_cache2-29a-concurrent_read_resumable_entry_size_zero.js CLOSED TREE 2024-12-17 22:51:40 +02:00
Randell Jesup 309477b3d4 Bug 1936898: Correct RaceCacheWithNetwork stats r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D231984
2024-12-17 16:29:33 +00:00
Norisz Fay be8b33c796 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 7c3bb4d6a5 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
Norisz Fay acc7031002 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 5dd3b8a55d 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
Florian Quèze 3ab5569bf0 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
Randell Jesup 9b645a5d9a 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 f38b72b3b6 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 65482e6ab8 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
Kershaw Chang e40d302186 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
Kershaw Chang adf6a18984 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 b46b330a04 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
Valentin Gosu 2403d05525 Bug 1794376 - Rename BlockingIOWatcher and simplify code r=edgul
We don't need mEvent to wait for IO completion. Instead, we just cancel
it immediately.

Differential Revision: https://phabricator.services.mozilla.com/D159846
2022-10-28 12:36:48 +00:00
Valentin Gosu 86ebb94749 Bug 1794376 - Use SpinEventLoopUntil to await for CacheFileIOManager shutdown r=jstutte,edgul
Differential Revision: https://phabricator.services.mozilla.com/D159845
2022-10-28 12:36:47 +00:00
Mike Hommey 45b9f403ab Bug 1766561 - Use %lu for Windows Error types (DWORD). r=rkraesig,xpcom-reviewers,application-update-reviewers,mhowell,bobowen,necko-reviewers,keeler,media-playback-reviewers,bytesized,barret,alwu,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D144914
2022-05-03 20:49:07 +00:00
Randell Jesup cd382aae30 Bug 1207753: Basic thread-safety annotations to quiet errors until real annotations land r=nika
Differential Revision: https://phabricator.services.mozilla.com/D141062
2022-03-17 18:39:15 +00:00
Sandor Molnar 9a2f2a85dc Backed out 2 changesets (bug 1741190, bug 1644983) for causing browser-chrome failures in browser_xpcom_graph_wait. CLOSED TREE
Backed out changeset ddf74f877a92 (bug 1644983)
Backed out changeset 817dd8236d41 (bug 1741190)
2021-12-01 08:34:10 +02:00
Valentin Gosu f657a848ad Bug 1644983 - Register CacheIOThread thread with profiler r=necko-reviewers,dragana
Depends on D132380

Differential Revision: https://phabricator.services.mozilla.com/D132381
2021-11-30 22:20:01 +00:00
Valentin Gosu 56b65b52ac Bug 1665836 - Make CacheIOThread::ThreadFunc hold reference to thread r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D118157
2021-06-24 16:20:16 +00:00
Florian Quèze 76d92a054e Bug 1715257 - Remove Task Tracer code from the profiler, r=gerald,necko-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D117996
2021-06-17 09:33:00 +00:00
Iulian Moraru 4b5e996bef Backed out changeset 617a466d0cce (bug 1715257) for causing build bustages. CLOSED TREE 2021-06-17 10:58:16 +03:00
Florian Quèze 2b195470a1 Bug 1715257 - Remove Task Tracer code from the profiler, r=gerald,necko-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D117996
2021-06-17 06:12:10 +00:00
Valentin Gosu 9560d62d63 Bug 1714307 - Run modernize-use-default-member-init --fix check on netwerk r=necko-reviewers,kershaw
This changeset is the result of adding modernize-use-default-member-init to
tools/clang-tidy/config.yaml then proceeding to run
`./mach static-analysis check netwerk/ --fix`
I then went through the resulting fix and manually updated all of the member
variables which were missed due to them having a non-trivial constructor.

Note that the tool was only run on Linux, so code that only runs on some
platforms may have been missed.

The member variables that are still initialized in the contructor definition
are:
  - bitfields (not all currently supported compilers allow default-member-init
  - variables that are initialized via a parameter
  - variables that use code not visible in the header file

There are a few advantages to landing this change:
- fewer lines of code - now declaration is in the same place as initialization
  this also makes it easier to see when looking at the header.
- it makes it harder to miss initializing a member when adding a new contructor
- variables that depend on an include guard look much nicer now

Additionally I removed some unnecessary reinitialization of NetAddr members
(it has a constructor that does that now), and changed nsWifiScannerDBus to
use the thread-safe strtok_r instead of strtok.

Differential Revision: https://phabricator.services.mozilla.com/D116980
2021-06-11 07:10:41 +00:00
Csoregi Natalia e88581b300 Backed out changeset 6e00f8bd2acc (bug 1714307) for causing hazard bustage. CLOSED TREE 2021-06-09 21:50:03 +03:00
Valentin Gosu c01e585de7 Bug 1714307 - Run modernize-use-default-member-init --fix check on netwerk r=necko-reviewers,kershaw
This changeset is the result of adding modernize-use-default-member-init to
tools/clang-tidy/config.yaml then proceeding to run
`./mach static-analysis check netwerk/ --fix`
I then went through the resulting fix and manually updated all of the member
variables which were missed due to them having a non-trivial constructor.

Note that the tool was only run on Linux, so code that only runs on some
platforms may have been missed.

The member variables that are still initialized in the contructor definition
are:
  - bitfields (not all currently supported compilers allow default-member-init
  - variables that are initialized via a parameter
  - variables that use code not visible in the header file

There are a few advantages to landing this change:
- fewer lines of code - now declaration is in the same place as initialization
  this also makes it easier to see when looking at the header.
- it makes it harder to miss initializing a member when adding a new contructor
- variables that depend on an include guard look much nicer now

Additionally I removed some unnecessary reinitialization of NetAddr members
(it has a constructor that does that now), and changed nsWifiScannerDBus to
use the thread-safe strtok_r instead of strtok.

Differential Revision: https://phabricator.services.mozilla.com/D116980
2021-06-09 10:20:04 +00:00
Valentin Gosu 56cd5036af Bug 1714307 - Autofix static-analysis warnings in netwerk/ r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D116701
2021-06-04 12:35:16 +00:00
Butkovits Atila 1f3e4dc865 Backed out changeset c4b44c4ef15b (bug 1714307) for causing build bustages on nsHTTPCompressConv.h. CLOSED TREE 2021-06-04 13:53:37 +03:00
Valentin Gosu 5b4ead87fd Bug 1714307 - Autofix static-analysis warnings in netwerk/ r=necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D116701
2021-06-04 10:00:55 +00:00
Gerald Squelart f25e1c0093 Bug 1691589 - Reduce reliance on GeckoProfiler.h when only labels (and maybe markers) are needed - r=necko-reviewers,geckoview-reviewers,sg,agi,florian
There are no code changes, only #include changes.
It was a fairly mechanical process: Search for all "AUTO_PROFILER_LABEL", and in each file, if only labels are used, convert "GeckoProfiler.h" into "ProfilerLabels.h" (or just add that last one where needed).
In some files, there were also some marker calls but no other profiler-related calls, in these cases "GeckoProfiler.h" was replaced with both "ProfilerLabels.h" and "ProfilerMarkers.h", which still helps in reducing the use of the all-encompassing "GeckoProfiler.h".

Differential Revision: https://phabricator.services.mozilla.com/D104588
2021-02-16 04:44:19 +00:00
David Major 9829f29105 Bug 1688292 - Fix non-unified build errors in netwerk/cache2/ r=necko-reviewers,valentin
This is a drive-by fix while I was looking into something else.

Differential Revision: https://phabricator.services.mozilla.com/D102795
2021-01-25 12:23:13 +00:00
Masatoshi Kimura 5d201caef6 Bug 1684110 - Stop using some 'A'-functions in netwerk/. r=necko-reviewers,kershaw
Depends on D100466

Differential Revision: https://phabricator.services.mozilla.com/D100467
2021-01-04 20:34:50 +00:00
Bas Schouten 73771dfc18 Bug 1669256 - Part 1: Remove AbstractEventQueue and de-templatize ThreadEventQueue. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D92709
2020-10-09 17:56:34 +00:00
Simon Giesecke 1fbb2b245e Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-04 11:27:07 +00:00
Noemi Erli c5adcfe981 Backed out 4 changesets (bug 1654992, bug 1654991) for causing timeous in mask-opacity-1e.html
Backed out changeset 11f0f54c6e0a (bug 1654992)
Backed out changeset a353dd5b3f08 (bug 1654991)
Backed out changeset 6a7964ba549f (bug 1654991)
Backed out changeset cf3bfb91d98c (bug 1654991)
2020-08-03 22:09:36 +03:00
Simon Giesecke 9d2e516112 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-03 14:54:18 +00:00