Commit Graph

2868 Commits

Author SHA1 Message Date
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
Gabriele Svelto
7e71a11603 Bug 1872920 - Change how we notify the main process when we intercept a crash via WER r=yjuglaret,bobowen
This patch makes several fundamental changes to the logic we use to inform
the main process whenever the WER runtime exception module intercepts a child
process crash:

* We no longer read the process type or any other data from the child process;
  the process type is passed as the runtime exception module's context
* We no longer read the address of the memory area used to communicate with the
  main process from the child process arguments. Instead we allocate memory
  directly into the main process and store the required information there
* We don't read anything from the main process either, the pointer to the
  function used to notify the main process is now found by looking out its
  dedicated section in the parent process' xul.dll mapping
* We no longer read the OOM crash annotation from a child process, this
  functionality will be restored by making the module use the mozannotation
  crates to fetch all the annotations

Differential Revision: https://phabricator.services.mozilla.com/D201589
2024-02-21 17:56:31 +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
Kelsey Gilbert
eb13723b60 Bug 1879433 - Scoped.h use removed from mozglue. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D201174
2024-02-13 17:18:59 +00:00
Mike Hommey
a77e0ab50d Bug 1865758 - Update builders to rustc 1.76 r=firefox-build-system-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D200870
2024-02-08 22:38:32 +00:00
Markus Stange
b75080bb8b Bug 1876415 - Make timestamp formats consistent between Jitdump and the marker file. r=glandium
On Linux and Android, both jitdump and the marker file will keep using
`CLOCK_MONOTONIC` nanoseconds, as before.

On macOS, both jitdump and the marker file will now be using
`TimeStamp::RawMachAbsoluteTimeNanoseconds()` , i.e. "nanoseconds since
mach_absolute_time origin".
This value has the advantage that it is also relatively easy to obtain
in other browser engines, because their internal timestamp value is stored
in milliseconds or nanoseconds rather than in `mach_absolute_time` ticks.
In the past, on macOS, Firefox was using `CLOCK_MONOTONIC` nanoseconds for
jitdump and `TimeStamp::RawMachAbsoluteTimeValue()` for the marker file.
This inconsistency is now fixed.
I will update samply to change how it treats jitdump timestamps on macOS.
There are no other consumers of jitdump files on macOS that I know of.

On Windows, we will keep using raw QPC values for the marker file - this
matches what's in the ETW events. Jitdump on Windows is mostly unused but
I'm updating it to match.

Furthermore, this fixes the order in mozglue/misc/moz.build to make sure
we always use the TimeStamp_darwin implementation on Darwin (and not just
due to a broken configure check, see bug 1681445), and it fixes the #ifdef
in TimeStamp.h to match the Darwin check.

Differential Revision: https://phabricator.services.mozilla.com/D199592
2024-01-26 03:38:54 +00:00
Nazım Can Altınova
dabe56e0f1 Bug 1823514 - Define shared-libraries.h for non-MOZ_GECKO_PROFILER with stubbed methods r=mstange,profiler-reviewers
This patch defines shared-libraries.h header file all the time even when the
MOZ_GECKO_PROFILER is not defined. `SharedLibraryInfo` class now has
stubbed-out implementation-specific methods that are defined in platform
specific cpp files. This allows us to always define the header file which
will let us remove a lot of ifdefs in the following patch.

Differential Revision: https://phabricator.services.mozilla.com/D199361
2024-01-24 09:36:33 +00:00
Botond Ballo
3d749c7613 Bug 1855079 - On 32-bit ARM, ignore the least significant bit of the address in the comparison in ShouldSkipPC. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D197745
2024-01-21 00:56:50 +00:00
Mike Hommey
b593c5f4e6 Bug 1875218 - Remove now unused GetMappable. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D198917
2024-01-18 23:40:22 +00:00
Mike Hommey
35e27cab6a Bug 1875218 - Remove the __dl_* functions. r=gsvelto
They haven't been used since bug 1648654.

Differential Revision: https://phabricator.services.mozilla.com/D198916
2024-01-18 23:40:21 +00:00
Mike Hommey
844555bb43 Bug 1875218 - Remove Mappable abstraction. r=gsvelto
Now that there's only one type of Mappable left (MappableFile), we don't
need to keep vtables.

Differential Revision: https://phabricator.services.mozilla.com/D198915
2024-01-18 23:40:21 +00:00
Mike Hommey
22d34783b0 Bug 1875218 - Remove _MappableBuffer. r=gsvelto
Now that its last use was removed with MappableDeflate, it can be
removed.

Differential Revision: https://phabricator.services.mozilla.com/D198914
2024-01-18 23:40:21 +00:00
Mike Hommey
8b1d9774e0 Bug 1875218 - Remove Zip. r=gsvelto
Now that both MappableExtractFile and MappableDeflate have been removed,
nothing is using the Zip reader code anymore.

Differential Revision: https://phabricator.services.mozilla.com/D198913
2024-01-18 23:40:20 +00:00
Mike Hommey
106d2531c0 Bug 1875218 - Remove MappableDeflate. r=gsvelto
We used to rely on our linker being able to decompress zlib streams
directly to memory, but that hasn't been the case for very long.

Differential Revision: https://phabricator.services.mozilla.com/D198912
2024-01-18 23:40:20 +00:00
Mike Hommey
ffc5521445 Bug 1875218 - Remove MappableExtractFile. r=gsvelto
We used to rely on our linker extracting the libraries to disk before
loading them in memory. This hasn't been the case since bug 1486524.

Differential Revision: https://phabricator.services.mozilla.com/D198911
2024-01-18 23:40:19 +00:00
Mike Hommey
faca7c818a Bug 1874348 - Extra cleanup after bug 1694481 r=firefox-build-system-reviewers,ahochheiden
There is no need to build Zip.cpp anymore when the linker is not
enabled, because nsGeckoUtils.cpp doesn't actually use it anymore.

Differential Revision: https://phabricator.services.mozilla.com/D198349
2024-01-15 22:24:56 +00:00
Mike Hommey
862e452325 Bug 1874345 - Remove xz support from the linker. r=gsvelto,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D198632
2024-01-15 22:24:55 +00:00
Mike Hommey
2b0095e967 Bug 1874346 - Always add mozglue/linker to includes on MOZ_LINKER builds. r=firefox-build-system-reviewers,ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D198348
2024-01-15 21:16:21 +00:00
Steve Fink
ba7d3327fc Bug 1790873 - Move printf_stderr() to mozglue so it can be used within js/src r=glandium,nika
Differential Revision: https://phabricator.services.mozilla.com/D157354
2024-01-11 02:09:30 +00:00
Stanca Serban
94288d3f1e Backed out 5 changesets (bug 1794063, bug 1790873) for causing Linux spidermonkey builds bustages in Printer.h. CLOSED TREE
Backed out changeset c729aa80e73e (bug 1794063)
Backed out changeset 442a0de27b61 (bug 1790873)
Backed out changeset 6934f2978802 (bug 1790873)
Backed out changeset 296f6da7b6ed (bug 1790873)
Backed out changeset 01ddb562d770 (bug 1790873)
2024-01-10 01:18:55 +02:00
Steve Fink
fab3527be1 Bug 1790873 - Move printf_stderr() to mozglue so it can be used within js/src r=glandium,nika
Differential Revision: https://phabricator.services.mozilla.com/D157354
2024-01-09 22:46:00 +00:00
Florian Quèze
2f08a0f169 Bug 1871545 - add a profiler counter for bandwidth use, r=profiler-reviewers,necko-reviewers,kershaw,canaltinova.
Differential Revision: https://phabricator.services.mozilla.com/D197148
2024-01-09 14:41:55 +00:00
Gabriele Svelto
1fca57db73 Bug 1868043 - Make Android fallback path for interposed functions more reliable r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D197350
2024-01-09 10:05:44 +00:00
Jan de Mooij
4387a3b625 Bug 1872666 - Remove OrderedDict code from YAML file loading. r=iain,profiler-reviewers,canaltinova
`mach` requires Python 3.7+ since bug 1734402, and Python 3.7 made preserving
dictionary insertion order an official part of the language.

Also use `safe_load` instead of `load` because it doesn't require a loader argument
and is safer (although it doesn't really matter for this use case).

Differential Revision: https://phabricator.services.mozilla.com/D197497
2024-01-04 08:28:17 +00:00
Mike Hommey
61cd516c19 Bug 1857090 - Update builders to rustc 1.75. r=firefox-build-system-reviewers,ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D197273
2023-12-28 19:59:02 +00:00
Bas Schouten
f9d9059cf6 Bug 1869835 - Part 1: Add code to emit ETW markers on Windows when a trace logger is enabled. r=canaltinova,profiler-reviewers
This adds code to emit ETW markers on windows. It supports all current
markers through a generic marker emitting schema. It also supports
additional payload and filtering for any markers that are updated to a
new compile-time marker schema system. Because of our abstraction layer
and cross-platform nature we have to manually create the TraceLogging
structs used and can't rely on their macro's, but this should give us a
very flexible and performant marker implementation on ETW.

Differential Revision: https://phabricator.services.mozilla.com/D196331
2023-12-21 18:17:40 +00:00
Nazım Can Altınova
cef0610085 Bug 1870414 - Check the correct buffer block r=profiler-reviewers,julienw
Differential Revision: https://phabricator.services.mozilla.com/D197064
2023-12-21 18:14:20 +00:00
Yannis Juglaret
097cd7313d Bug 1869997 - Protect DbgHelp initialization helpers against reentrancy. r=glandium
EnsureDbgHelpInitialized() and EnsureSymInitialized() can currently
cause deadlocks through reentrancy in DEBUG and FUZZING builds, through
MOZ_ASSERT and MOZ_CRASH failures. This patch merges these functions
into a single InitializeDbgHelp() reentrancy-safe function.

Differential Revision: https://phabricator.services.mozilla.com/D196421
2023-12-21 10:42:07 +00:00
serge-sans-paille
9779ed6e69 Bug 1868949 - Add support for AVX VNNI in cpu detection and IntegerGemm r=marco
This make it possible to use the recently added changes in gemmology.

Differential Revision: https://phabricator.services.mozilla.com/D196425
2023-12-19 13:04:19 +00:00
serge-sans-paille
870a5f2055 Bug 1869497 - Introduce MOZ_NAKED to centralize all attributes we expect from naked r=glandium,win-reviewers,mhowell
In the fx codebase, we tend to use __attribute__((naked)) for plain
assembly functions with a C interface. Instrumenting these functions can
mess up this assembly, so we conservatively also want to prevent
instrumentation.

Differential Revision: https://phabricator.services.mozilla.com/D196154
2023-12-15 09:26:48 +00:00
Florian Quèze
03bd9de29c Bug 1866629 - Remove the sample_groups object in serialized counters, r=canaltinova,profiler-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D194695
2023-12-12 11:28:07 +00:00
Mike Hommey
619672a8e4 Bug 1867459 - Replace CPU_ARCH with TARGET_CPU. r=firefox-build-system-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D195157
2023-12-08 10:43:59 +00:00
Logan Rosen
141305b4e4 Bug 1677775 - reformat .mozbuild files with Black r=linter-reviewers,geckoview-reviewers,firefox-build-system-reviewers,ahal,glandium,owlish,sylvestre
#ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D193007
2023-12-08 04:26:45 +00:00
Yury Delendik
8be491431c Bug 1865953: Fix FreeBSD arm64 missing closing parentheses. r=jpages,profiler-reviewers,florian DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D195784
2023-12-07 15:21:06 +00:00
serge-sans-paille
1c230a2cc3 Bug 1867863 - Make __chkstk wrapper as no - profile r=yjuglaret,glandium
Otherwise injected code, under temporal profiling, messes up the inline
assembly used by the wrapper. Ideally, we would use extended asm to
correctly state the constraint, but it is incompatible with naked
functions.

See discussion in https://github.com/llvm/llvm-project/issues/74573 for
the interaction between ``naked`` and profiling.

Differential Revision: https://phabricator.services.mozilla.com/D195315
2023-12-07 14:49:35 +00:00
Cristian Tuns
1a63fee6c2 Backed out 2 changesets (bug 1865795) for causing spidermonkeys bustages with WinHeaderOnlyUtils.h CLOSED TREE
Backed out changeset d7e12200a4a0 (bug 1865795)
Backed out changeset 9efc72d1ff06 (bug 1865795)
2023-12-06 13:16:53 -05:00
Yannis Juglaret
089b516210 Bug 1865795 - Collect single-step data upon utility process LoadLibraryOrCrash failure. r=rkraesig
In order to investigate LoadLibraryW failures in bug 1851889, we make
LoadLibraryOrCrash collect ntdll.dll single step data in utility
processes. The data will be available in the stack of the crashing
thread in nightly and early beta builds.

Single-step data collection only occurs after a first failure to load
the library, when we would be about to crash anyway. This ensures that
the patch cannot introduce extra unstability to LoadLibraryOrCrash.

Single-stepping through all ntdll instructions would record too many
steps, so we add the capability to record only call and ret
instructions. We apply this new capability for the single-step recording
of LoadLibraryW. Thanks to the detection of error state changes, this
should help us identify what path leads to a 0x241 last error in
bug 1851889.

Depends on D194203

Differential Revision: https://phabricator.services.mozilla.com/D194204
2023-12-06 16:53:40 +00:00
Yannis Juglaret
1e61d6e619 Bug 1865795 - Abstract away single-step data collection for reusability. r=rkraesig,win-reviewers
This patch makes the single-step data collection code that we
implemented for bug 1571516 reusable, while preserving its behavior.

We define a generic CollectSingleStepData function that embeds the
magic for starting to trigger single step exceptions and for acting upon
them.

We define a more specialized CollectModuleSingleStepData function which
can be reused if the purpose of single step data collection is to
monitor what paths are taken within a specific module. It stores the
collected data in stack, so that it can be accessed from crash reports.

This code is considered unstable and thus only available in Nightly and
early Beta and only used on paths that are known to crash already.

Differential Revision: https://phabricator.services.mozilla.com/D194203
2023-12-06 16:53:40 +00:00
Neel Chauhan
ff6cf2d0d7 Bug 1695120: Remove unused BlocksRingBuffer r=profiler-reviewers,canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D194428
2023-12-06 14:08:02 +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
Matthew Newall
532e66cdf1 Bug 1862511 - Removed extra semicolons. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D194872
2023-11-29 06:53:59 +00:00
Gabriele Svelto
2b83d1392f Bug 1866716 - Remove unneeded headers from Atomics.h r=glandium,profiler-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D194722
2023-11-28 13:14:49 +00:00
Mike Hommey
2dca037b27 Bug 1857089 - Update builders to rustc 1.74. r=firefox-build-system-reviewers,ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D194166
2023-11-21 01:08:15 +00:00
Mike Hommey
9977da8109 Bug 1843981 - Update builders to rustc 1.73. r=firefox-build-system-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D190009
2023-11-07 08:36:25 +00:00
Tawah Peggy
2926067fbf Bug 1861618 - Reduce usage of return statements after else. r=sylvestre DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D192774
2023-11-06 16:59:46 +00:00
Cristian Tuns
687f62e227 Backed out 2 changesets (bug 1861618, bug 1856240) for causing build bustages in ClearKeyUtils.cpp CLOSED TREE
Backed out changeset 0ee046556e13 (bug 1856240)
Backed out changeset fb450a287979 (bug 1861618)
2023-11-01 18:03:05 -04:00
Tawah Peggy
4d0ab0db82 Bug 1861618 - Do not use 'else' after 'return'. r=sylvestre,profiler-reviewers,canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D192310
2023-11-01 20:33:20 +00:00
Paul Bone
cbd484acb9 Bug 1859964 - --enable-phc doesn't always imply --enable-frame-pointers r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D191404
2023-10-24 00:52:34 +00:00
Daniel Holbert
3a2501e3dc Bug 1859025: Add some profiler markers as guideposts for what's going on during long print operations. r=profiler-reviewers,canaltinova
This patch adds a new layout profiling sub-category "LAYOUT_Printing" for the
markers added here.

I'm adding an "interval"-type marker ("AUTO_PROFILER_MARKER_TEXT") for the
function-calls that seem likely to occupy measurable amounts of time (due to
touching the filesystem or printer driver), vs. single-point-in-time markers
("PROFILER_MARKER_TEXT") for functions whose duration isn't particularly long
or interesting, or whose durations we're already measuring with other
closely-associated interval-markers.

Differential Revision: https://phabricator.services.mozilla.com/D191001
2023-10-18 05:34:50 +00:00