Commit Graph

2890 Commits

Author SHA1 Message Date
Denis Palmeiro
a37693bbe8 Bug 1887068: Add perfetto event traces for taskcontroller tasks and dom performance measurement markers. r=smaug
Depends on D205662

Differential Revision: https://phabricator.services.mozilla.com/D205663
2024-04-15 15:34:04 +00:00
Cristina Horotan
fd5658787a Backed out 4 changesets (bug 1887068, bug 1890934) on request by causing build bustages
Backed out changeset 68a7a8a3bb0f (bug 1890934)
Backed out changeset 658f4b57b8ec (bug 1887068)
Backed out changeset 61a9d3a1e592 (bug 1887068)
Backed out changeset efbf5c7065e3 (bug 1887068)
2024-04-12 02:14:44 +03:00
Denis Palmeiro
7a98a8955a Bug 1887068: Add perfetto event traces for taskcontroller tasks and dom performance measurement markers. r=smaug
Depends on D205662

Differential Revision: https://phabricator.services.mozilla.com/D205663
2024-04-10 17:48:08 +00:00
Cristian Tuns
8fdef5ff9e Backed out 3 changesets (bug 1887068) for causing build bustages in toolkit/* CLOSED TREE
Backed out changeset c6863f012b03 (bug 1887068)
Backed out changeset 3a4d2b74219e (bug 1887068)
Backed out changeset 90a702920d77 (bug 1887068)
2024-04-09 18:19:08 -04:00
Denis Palmeiro
bea9a256f9 Bug 1887068: Add perfetto event traces for taskcontroller tasks and dom performance measurement markers. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D205663
2024-04-09 19:05:36 +00:00
Alexandre Lissy
f5ddde82ce Bug 1889610 - Remove unused parameters in MergeStack() r=canaltinova,profiler-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D206621
2024-04-04 16:50:34 +00:00
Mike Hommey
352bb98f8e Bug 1884054 - Always define a rust global allocator. r=emilio
The global allocator we define for Rust code directs all Rust
allocations to the malloc family of functions. Practically speaking,
it's a no-op on Unix systems (the default global allocator would
do the same thing except for tiny details about alignment on some
platforms), but it makes a big difference on Windows, where the Rust
default global allocator uses the HeapAlloc family of functions.

Well, in practice, it doesn't make a huge difference, because we wrap
those functions to fall back to the malloc family of functions. But
it does make a difference in how allocations with large alignment are
handled (because it does its own alignment on top of HeapAlloc).

We're about to stop wrapping the HeapAlloc family of functions, because
it's causing other problems with memory that might have been
HeapAlloc'ated from system libraries, which a wrapped HeapFree can't
handle without overhead.

But, we're only currently defining the Rust global allocator when
mozjemalloc is enabled, meaning removing the wrapping gets us back to
Rust using HeapAlloc/HeapFree on those builds. Unfortunately, that
exchanges of ownership between C/C++ and Rust can lead to allocator
mismatch (and subsequent heap corruption).

One specific case where this causes problems is ASan builds, which
disable mozjemalloc specifically to enable the ASan allocator.

So we need to always define a Rust global allocator that uses the malloc
family of functions, whether or not mozjemalloc is enabled.

Unfortunately, the current code also relies on _aligned_malloc being
redirected to mozjemalloc, so we also need to adjust it to call
_aligned_free to free the corresponding memory on builds where
mozjemalloc is not enabled.

Differential Revision: https://phabricator.services.mozilla.com/D205787
2024-03-28 04:02:02 +00:00
Mike Hommey
d90cba2bd3 Bug 1871883 - Update builders to rustc 1.77. r=firefox-build-system-reviewers,ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D204991
2024-03-25 20:20:30 +00:00
pstanciu
5001818ebf Backed out changeset 7e6185a6c167 (bug 1871883) for causing build bustages on rust.mk CLOSED TREE 2024-03-23 06:09:20 +02:00
Mike Hommey
0f2b6ec73e Bug 1871883 - Update builders to rustc 1.77. r=firefox-build-system-reviewers,ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D204991
2024-03-22 20:33:42 +00:00
Bas Schouten
44cb6d2bea Bug 1884213 - Part 4: Convert Text and Tracing markers to use BaseMarkerType so they gain ETW support. r=mstange,profiler-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D203985
2024-03-11 20:13:57 +00:00
Bas Schouten
e235238ad6 Bug 1884213 - Part 2: Create generalized storage option for the marker names passed as arguments. r=mstange,profiler-reviewers
This allows for individual Marker Types to specify that they wish to have the names passed in profiler_add_marker stored as a field in ETW. This also converts simple marker types to use this in order to simplify the code.

Differential Revision: https://phabricator.services.mozilla.com/D203983
2024-03-11 20:13:56 +00:00
Bas Schouten
924abf4a2b Bug 1884213 - Part 1: Move BaseMarkerType into BaseProfilerMarkersPrerequisites.h to allow using for Text and Tracing markers. r=mstange,profiler-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D203982
2024-03-11 20:13:55 +00:00
Sandor Molnar
d64bf4596b Backed out 4 changesets (bug 1884213) for causing Gtest failures
Backed out changeset b5f646ecf7f3 (bug 1884213)
Backed out changeset 390ed880ca48 (bug 1884213)
Backed out changeset 39cba6259878 (bug 1884213)
Backed out changeset 0b4c283af5d9 (bug 1884213)
2024-03-11 21:27:44 +02:00
Bas Schouten
c9c92ba6bd Bug 1884213 - Part 4: Convert Text and Tracing markers to use BaseMarkerType so they gain ETW support. r=mstange,profiler-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D203985
2024-03-11 16:38:22 +00:00
Bas Schouten
60fc6e2727 Bug 1884213 - Part 2: Create generalized storage option for the marker names passed as arguments. r=mstange,profiler-reviewers
This allows for individual Marker Types to specify that they wish to have the names passed in profiler_add_marker stored as a field in ETW. This also converts simple marker types to use this in order to simplify the code.

Differential Revision: https://phabricator.services.mozilla.com/D203983
2024-03-11 16:38:21 +00:00
Bas Schouten
f597d2936f Bug 1884213 - Part 1: Move BaseMarkerType into BaseProfilerMarkersPrerequisites.h to allow using for Text and Tracing markers. r=mstange,profiler-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D203982
2024-03-11 16:38:21 +00:00
Bas Schouten
0bb313c8eb Bug 1882640: Include Phase information with ETW markers. r=mstange,profiler-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D203060
2024-02-29 16:31:53 +00:00
Mike Hommey
cde846854f Bug 1751781 - Force the old definition of NAN in the Windows SDK. r=ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D202896
2024-02-28 03:50:07 +00:00
Ryan Hunt
a0c004e453 Bug 1810332 - Show which wasm compiler a function is executing in profile. r=yury,profiler-reviewers,aabh
This commit modifies ProfilingFrameIter to be able to report which tier of
wasm execution a function is in, then uses that in the profiler to report
more fine-grained categories for wasm code.

Differential Revision: https://phabricator.services.mozilla.com/D201020
2024-02-27 00:44:21 +00:00
Emilio Cobos Álvarez
a7ca4dcd2e Bug 1881412 - Fix animation markers to deal with custom property animations. r=florian,zrhoffman,firefox-style-system-reviewers,firefox-animation-reviewers,profiler-reviewers,boris
Differential Revision: https://phabricator.services.mozilla.com/D202402
2024-02-26 18:53:33 +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
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