Commit Graph

3013 Commits

Author SHA1 Message Date
Butkovits Atila
15b1a753aa Backed out changeset 9d9fe1cd50ec (bug 1930292) for causing Win11 visual regressions. CLOSED TREE 2024-11-21 13:12:06 +02:00
Markus Stange
290918b099 Bug 1929913 - Bump the Gecko profile format version to 31. r=profiler-reviewers,julienw
The corresponding front-end bump is happening in https://github.com/firefox-devtools/profiler/pull/5186 .

Bumping the version to 31 means that our code can emit profiles which
use the marker field formats 'flow-id' and 'terminating-flow-id' without
running into trouble on the front-end side.

Differential Revision: https://phabricator.services.mozilla.com/D228348
2024-11-19 14:36:52 +00:00
Emilio Cobos Álvarez
d9ccc58f47 Bug 1931778 - Remove unnecessary condition in PreXULSkeletonUI. r=win-reviewers,rkraesig
We always have Dwm{Get,Set}WindowAttribute because we fail if we can't
load them.

This in practice means that we release the DC and uncloak the window a
bit later (due to the MakeScopeExits), but I think that's fine.

Differential Revision: https://phabricator.services.mozilla.com/D229267
2024-11-18 16:06:14 +00:00
Emilio Cobos Álvarez
5636c4fe4f Bug 1930292 - Stop setting non-zero chromemargin values. r=win-reviewers,handyman
These only do something on Windows, and after windows 7 they are not
useful at all.

If this has no fallout I plan to simplify the code further in a
follow-up (we can basically make this a boolean attribute again or so).

Differential Revision: https://phabricator.services.mozilla.com/D228528
2024-11-16 13:54:37 +00:00
Sandor Molnar
626d6033c9 Backed out changeset 1893713e1d17 (bug 1930292) for causing bc failures @ browser_findbar_marks.js CLOSED TREE 2024-11-16 07:03:50 +02:00
Emilio Cobos Álvarez
a4e7093fda Bug 1930292 - Stop setting non-zero chromemargin values. r=win-reviewers,handyman
These only do something on Windows, and after windows 7 they are not
useful at all.

If this has no fallout I plan to simplify the code further in a
follow-up (we can basically make this a boolean attribute again or so).

Differential Revision: https://phabricator.services.mozilla.com/D228528
2024-11-16 01:48:48 +00:00
Alexandre Lissy
ae13d95188 Bug 1929104 - Add SandboxProfiler feature to enable/disable r=canaltinova,profiler-reviewers,aabh
Differential Revision: https://phabricator.services.mozilla.com/D227962
2024-11-13 07:03:22 +00:00
Cristina Horotan
1e75cbdee2 Backed out changeset 11c6eadee766 (bug 1929104) for causing bc failures at browser_sandbox_profiler.js CLOSED TREE 2024-11-12 22:00:04 +02:00
Alexandre Lissy
77c7fde899 Bug 1929104 - Add SandboxProfiler feature to enable/disable r=canaltinova,profiler-reviewers,aabh
Differential Revision: https://phabricator.services.mozilla.com/D227962
2024-11-12 18:35:27 +00:00
Emilio Cobos Álvarez
1c3509dcfd Bug 1930284 - Also clean-up toolbar color variables. r=desktop-theme-reviewers,dao
Unlike the previous patch this does change behavior, but I think it's
fine.

The reason we used the non-lwt toolbar colors for customize mode is to
guarantee full opacity, see bug 1762379 and bug 1765685.

However, we need to do the same on the sidebar, and there we chose a
more theme-friendly way of doing that, which allows this simplification.

So do that instead.

Differential Revision: https://phabricator.services.mozilla.com/D228523
2024-11-11 11:10:42 +00:00
ptrcnull
58073adcde Bug 1927645 - Add missing parameter for moz_pthread_atfork_handler on non-glibc r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D227124
2024-11-07 18:08:36 +00:00
Alexandre Lissy
bf4989dfb6 Bug 1908630 - Override LLVM Profiling for manual handling r=firefox-build-system-reviewers,glandium
Differential Revision: https://phabricator.services.mozilla.com/D218428
2024-11-05 06:30:49 +00:00
Nazım Can Altınova
42485afae5 Bug 1928461 - Update BaseProfilerState to match ProfilerState r=aabh,profiler-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D227525
2024-10-31 17:40:14 +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
Mike Hommey
e182007396 Bug 1927641 - Remove Android's Bootstrap::GeckoStart. r=nika
When I wrapped the XRE entry points in the Bootstrap class back in bug
1306327, I didn't think too much about it. Now that I'm looking at the
iOS port, I realize the function doesn't really make much sense, and can
be inlined in its (sole) caller.

Differential Revision: https://phabricator.services.mozilla.com/D227120
2024-10-29 21:39:03 +00:00
Alexandre Lissy
3209ad406b Bug 1927320 - Use GET_REAL_SYMBOL() interposition for __register_atfork() / __cxa_finalize() r=glandium
In earlier version of working on those interposers, for some
undetermined reason the resolution would fail to find the glibc symbol
when using GET_REAL_SYMBOL() and we had to make use of dlvsym() instead.

After testing again this seems not to hold anymore so we can just make
use of GET_REAL_SYMBOL().

Differential Revision: https://phabricator.services.mozilla.com/D226984
2024-10-29 08:22:02 +00:00
serge-sans-paille
e54774d573 Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang
Namely std::size, std::end and std::size. This drops C support for
MOZ_ARRAY_LENGTH but it wasn't used anyway.

Differential Revision: https://phabricator.services.mozilla.com/D224611
2024-10-28 08:21:19 +00:00
Gijs Kruitbosch
97505cbd7c Bug 1925577 - make skeleton UI not draw the tabstrip if it's disabled by vertical tabs, r=dthayer
This doesn't take on the task of also drawing the sidebar, as gathering state for that
is a little more complex to do. Purely removing the flicker from the top of the window
(and potential user confusion about why there is a horizontal tab there) seems a
worthwhile improvement.

Differential Revision: https://phabricator.services.mozilla.com/D226822
2024-10-25 22:51:51 +00:00
Alexandru Marc
191ccbe7fe Backed out changeset d92f391b3b0c (bug 1922838) for backing out bug 1915351 2024-10-25 16:42:33 +03:00
serge-sans-paille
53068cdf31 Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang
Namely std::size, std::end and std::size. This drops C support for
MOZ_ARRAY_LENGTH but it wasn't used anyway.

Differential Revision: https://phabricator.services.mozilla.com/D224611
2024-10-24 09:06:01 +00:00
Alexandru Marc
83543f20f2 Backed out changeset 448597bce69d (bug 1922838) for causing build bustages. CLOSED TREE 2024-10-24 11:37:49 +03:00
serge-sans-paille
c7a369b29a Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang
Namely std::size, std::end and std::size. This drops C support for
MOZ_ARRAY_LENGTH but it wasn't used anyway.

Differential Revision: https://phabricator.services.mozilla.com/D224611
2024-10-24 07:38:30 +00:00
Paul Adenot
526715259b Bug 1926089 - Disable an fmt test on Linux debug x86.
Differential Revision: https://phabricator.services.mozilla.com/D226482
2024-10-23 14:46:30 +00:00
Vincent Hilla
91ed10a971 Bug 868874 - Remove Decimal::toString(char*, size_t). r=jwatt,dom-core,sefeng
Differential Revision: https://phabricator.services.mozilla.com/D216041
2024-10-22 13:21:56 +00:00
Paul Adenot
a42519fc01 Bug 1717448 - Add some tests for Gecko integration. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D217299
2024-10-21 12:54:56 +00:00
Paul Adenot
db9008d099 Bug 1717448 - Vendor {fmt} in third_party. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D216921
2024-10-21 12:54:52 +00:00
Alexandre Lissy
faa7b1b2a7 Bug 1925181 - Properly set small alloc randomization on Android content processes as well r=jld
Differential Revision: https://phabricator.services.mozilla.com/D226135
2024-10-21 06:05:44 +00:00
Alexandre Lissy
acc83ccfce Bug 1917575 - Interpose __register_atfork()/pthread_atfork() and run it after clone() r=jld
Differential Revision: https://phabricator.services.mozilla.com/D221387
2024-10-21 06:05:42 +00:00
Butkovits Atila
156b2012dc Backed out 8 changesets (bug 1918596, bug 1917575, bug 1874689, bug 1925181, bug 1917844, bug 1925274, bug 1915152) for causing failures at Sandbox.cpp. CLOSED TREE
Backed out changeset ce2138248319 (bug 1874689)
Backed out changeset fbe9fbb6ae72 (bug 1925181)
Backed out changeset c9896c8962cb (bug 1925274)
Backed out changeset 6eddbad5949c (bug 1918596)
Backed out changeset b9bf86fa1c74 (bug 1917844)
Backed out changeset 1d4cd83d1a39 (bug 1917844)
Backed out changeset 264a5140fbcb (bug 1917575)
Backed out changeset 87b8512c67c9 (bug 1915152)
2024-10-19 23:27:56 +03:00
Alexandre Lissy
d5498aec0d Bug 1925181 - Properly set small alloc randomization on Android content processes as well r=jld
Differential Revision: https://phabricator.services.mozilla.com/D226135
2024-10-19 08:55:34 +00:00
Alexandre Lissy
9a1103df59 Bug 1917575 - Interpose __register_atfork()/pthread_atfork() and run it after clone() r=jld
Differential Revision: https://phabricator.services.mozilla.com/D221387
2024-10-19 08:55:31 +00:00
Tamas Szentpeteri
6e1a798714 Backed out 13 changesets (bug 1717448) for causing gtest failures on iofwrite.c
Backed out changeset 4254666ea8a7 (bug 1717448)
Backed out changeset 41c8a260d55b (bug 1717448)
Backed out changeset 670256c85479 (bug 1717448)
Backed out changeset 37ab78b00a4f (bug 1717448)
Backed out changeset 5e5b42a7cde1 (bug 1717448)
Backed out changeset 8295836348fb (bug 1717448)
Backed out changeset aebf794911ca (bug 1717448)
Backed out changeset 4381f24f8495 (bug 1717448)
Backed out changeset f0ca736c051b (bug 1717448)
Backed out changeset 993a64fd729a (bug 1717448)
Backed out changeset 2e17fb168eaf (bug 1717448)
Backed out changeset 47ed151719a4 (bug 1717448)
Backed out changeset adef9b3b6231 (bug 1717448)
2024-10-18 20:03:47 +03:00
Paul Adenot
f0f7fadbab Bug 1717448 - Add some tests for Gecko integration. r=nika,glandium
Differential Revision: https://phabricator.services.mozilla.com/D217299
2024-10-18 11:35:51 +00:00
Paul Adenot
74a4bce7f0 Bug 1717448 - Vendor {fmt} in third_party. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D216921
2024-10-18 11:34:49 +00:00
Mike Hommey
03b63a177f Bug 1924959 - Adjust mozglue build script for rustc 1.84. r=firefox-build-system-reviewers,ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D225762
2024-10-17 19:55:10 +00:00
Yannis Juglaret
072d3d69de Bug 1839299 - Use a finer-grained strategy to protect RtlLookupFunctionEntry against deadlocks. r=win-reviewers,rkraesig
On 64-bit Windows (x86_64, aarch64), stack walking relies on
RtlLookupFunctionEntry to navigate from one frame to the next. This
function acquires up to two ntdll internal locks when it is called.

The profiler and the background hang monitor both need to walk the
stacks of suspended threads. This can lead to deadlock situations,
which so far we have avoided with stack walk suppressions. We guard some
critical paths to mark them as suppressing stack walk, and we forbid
stack walking when any thread is currently on such path.

While stack walk suppression has helped remove most deadlock situations,
some can remain because it is hard to detect and manually annotate all
the paths that could lead to a deadlock situation. Another drawback is
that stack walk suppression disables stack walking for much larger
portions of code than required. For example, we disable stack walking
for LdrLoadDll, so we cannot collect stacks while we are loading a DLL.
Yet, the lock that could lead to a deadlock situation is only held
during a very small portion of the whole time spent in LdrLoadDll.

This patch addresses these two issues by implementing a finer-grained
strategy to avoid deadlock situations. We acquire the pointers to the
internel ntdll locks through a single-stepped execution of
RtlLookupFunctionEntry. This allows us to try to acquire the locks
non-blockingly so that we can guarantee safe stack walking with no
deadlock.

If we fail to collect pointers to the locks, we fall back to using stack
walk suppressions like before. This way we get the best of both worlds:
if we are confident that the situation is under control, we will use the
new strategy and get better profiler accuracy and no deadlock; in case
of doubt, we can still use the profiler thanks to stack walk
suppressions.

Differential Revision: https://phabricator.services.mozilla.com/D223498
2024-10-17 13:47:04 +00:00
Adi
43e200afe1 Backed out 6 changesets (bug 1918596, bug 1915152, bug 1917844, bug 1917575, bug 1874689) for causing valgrind bustages. CLOSED TREE
Backed out changeset b7f977ce6ea0 (bug 1874689)
Backed out changeset e9ccbb43f903 (bug 1918596)
Backed out changeset 39bf07957c07 (bug 1917844)
Backed out changeset 61d1c38cc516 (bug 1917844)
Backed out changeset 2a9a2bca99ce (bug 1917575)
Backed out changeset dab1b77688b2 (bug 1915152)
2024-10-17 14:56:41 +03:00
Adi
70758f017d Backed out changeset e6475b7e0602 (bug 1839299) for causing instrumented build bustages. 2024-10-17 14:55:27 +03:00
Yannis Juglaret
ebdc900582 Bug 1839299 - Use a finer-grained strategy to protect RtlLookupFunctionEntry against deadlocks. r=win-reviewers,rkraesig
On 64-bit Windows (x86_64, aarch64), stack walking relies on
RtlLookupFunctionEntry to navigate from one frame to the next. This
function acquires up to two ntdll internal locks when it is called.

The profiler and the background hang monitor both need to walk the
stacks of suspended threads. This can lead to deadlock situations,
which so far we have avoided with stack walk suppressions. We guard some
critical paths to mark them as suppressing stack walk, and we forbid
stack walking when any thread is currently on such path.

While stack walk suppression has helped remove most deadlock situations,
some can remain because it is hard to detect and manually annotate all
the paths that could lead to a deadlock situation. Another drawback is
that stack walk suppression disables stack walking for much larger
portions of code than required. For example, we disable stack walking
for LdrLoadDll, so we cannot collect stacks while we are loading a DLL.
Yet, the lock that could lead to a deadlock situation is only held
during a very small portion of the whole time spent in LdrLoadDll.

This patch addresses these two issues by implementing a finer-grained
strategy to avoid deadlock situations. We acquire the pointers to the
internel ntdll locks through a single-stepped execution of
RtlLookupFunctionEntry. This allows us to try to acquire the locks
non-blockingly so that we can guarantee safe stack walking with no
deadlock.

If we fail to collect pointers to the locks, we fall back to using stack
walk suppressions like before. This way we get the best of both worlds:
if we are confident that the situation is under control, we will use the
new strategy and get better profiler accuracy and no deadlock; in case
of doubt, we can still use the profiler thanks to stack walk
suppressions.

Differential Revision: https://phabricator.services.mozilla.com/D223498
2024-10-17 09:43:15 +00:00
Alexandre Lissy
d37fc481d9 Bug 1917575 - Interpose __register_atfork()/pthread_atfork() and run it after clone() r=jld
Differential Revision: https://phabricator.services.mozilla.com/D221387
2024-10-17 06:29:53 +00:00
Cosmin Sabou
1bc4690f6a Backed out 6 changesets (bug 1917575, bug 1917844, bug 1874689, bug 1918596, bug 1915152) for causing ContentChild crashes. CLOSED TREE
Backed out changeset d6dc6d8085b5 (bug 1874689)
Backed out changeset 8c3916995be2 (bug 1918596)
Backed out changeset f77e369d1e0f (bug 1917844)
Backed out changeset 3bee9479316a (bug 1917844)
Backed out changeset 5c72e4a84a2c (bug 1917575)
Backed out changeset af3350e58b0a (bug 1915152)
2024-10-17 00:51:07 +03:00
Alexandre Lissy
5a24bd7766 Bug 1917575 - Interpose __register_atfork()/pthread_atfork() and run it after clone() r=jld
Differential Revision: https://phabricator.services.mozilla.com/D221387
2024-10-16 20:10:54 +00:00
Emilio Cobos Álvarez
ed43bbbbb0 Bug 1922250 - Align skeleton ui with nsWindow more closely. r=win-reviewers,rkraesig
This maps better to the code we have in nsWindow, and fixes a couple
bugs which caused maximized skeleton UI-consuming windows to be
mispositioned with the following patches.

Differential Revision: https://phabricator.services.mozilla.com/D225100
2024-10-14 10:55:25 +00:00
Noemi Erli
ffa33e3898 Backed out 3 changesets (bug 1922250) for causing failures in browser_1446343-windowsize.js CLOSED TREE
Backed out changeset f4e18a092cba (bug 1922250)
Backed out changeset 9af0852c057c (bug 1922250)
Backed out changeset c7ebee651e07 (bug 1922250)
2024-10-12 07:48:39 +03:00
Emilio Cobos Álvarez
ffb08d883e Bug 1922250 - Align skeleton ui with nsWindow more closely. r=win-reviewers,rkraesig
This maps better to the code we have in nsWindow, and fixes a couple
bugs which caused maximized skeleton UI-consuming windows to be
mispositioned with the following patches.

Differential Revision: https://phabricator.services.mozilla.com/D225100
2024-10-11 08:37:23 +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
Paul Adenot
da6e72dc6c Bug 1921288 - Add a way to get the associated duration type from TimeStamp and AwakeTimeStamp. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D223792
2024-10-03 08:54:11 +00:00
Paul Adenot
78ab790d8f Bug 1921288 - Add some arithmetic and conversion functions to AwakeTimeStamp. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D223791
2024-10-03 08:54:11 +00:00
Paul Adenot
3c42e9a3bc Bug 1921288 - Teach AwakeTimeStamp to do precise timestamps on Windows, rename methods. r=gsvelto
This uses a function that has been introduced in Windows 10.

Differential Revision: https://phabricator.services.mozilla.com/D223790
2024-10-03 08:54:11 +00:00