Commit Graph

2512 Commits

Author SHA1 Message Date
Marian-Vasile Laza
bb43a35448 Backed out 8 changesets (bug 1753192) for causing Gtest failures on GeckoProfiler.cpp. CLOSED TREE
Backed out changeset 2f0c24b1f049 (bug 1753192)
Backed out changeset 1a71d954b83f (bug 1753192)
Backed out changeset 07a8ffa8d12f (bug 1753192)
Backed out changeset f79cd543e537 (bug 1753192)
Backed out changeset c2f22d8a8fc8 (bug 1753192)
Backed out changeset c8a0d3c41d2f (bug 1753192)
Backed out changeset 1d5d69d92db9 (bug 1753192)
Backed out changeset 5bc8bd033453 (bug 1753192)
2022-02-11 09:39:38 +02:00
Gerald Squelart
9f19f2143b Bug 1753192 - Use combined core buffer, and transfer ownership of chunk manager from base to gecko profiler - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D137804
2022-02-11 03:13:52 +00:00
Gerald Squelart
f811caf3b2 Bug 1753192 - ThreadRegistrationInfo reuses the Base Profiler thread registration time if any - r=canaltinova
Once the buffers are combined, some data could be stored in a thread before its registration with the Gecko Profiler.
Without this fix, the front-end would think the thread had not started yet, which could prevent interacting with that early data.

Differential Revision: https://phabricator.services.mozilla.com/D138239
2022-02-11 03:13:52 +00:00
Gerald Squelart
6906b4d69a Bug 1753192 - Fix apparent negative leak of RequestedChunkRefCountedHolder - r=canaltinova
Once the buffers are combined, a RequestedChunkRefCountedHolder could be referenced from the Base Profiler, which is invisible to the leak catcher; then handed over to the Gecko Profiler where it will eventually be dereferenced, which is logged with the leak catcher, resulting in an apparent negative leak.
This is fixed by keeping all (de)references secret.

Differential Revision: https://phabricator.services.mozilla.com/D138238
2022-02-11 03:13:51 +00:00
Gerald Squelart
adf6de3385 Bug 1753192 - Make ActivePS::mProfileBufferChunkManager a UniquePtr, to allow transferring it between profilers - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D137803
2022-02-11 03:13:51 +00:00
Gerald Squelart
f3c4f65d02 Bug 1753192 - Move core ProfileChunkedBuffers to static singletons in profiler_get_core_buffer() - r=canaltinova
Note that they are still separate buffers for now.

Differential Revision: https://phabricator.services.mozilla.com/D137802
2022-02-11 03:13:51 +00:00
Gerald Squelart
aa44b10600 Bug 1753192 - Removed unused ProfileChunkedBuffer::ExtractChunkManager() - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D137801
2022-02-11 03:13:50 +00:00
Gerald Squelart
9d51c7527c Bug 1753192 - Move InChunkPointer to new header ProfileChunkedBufferDetail.h - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D137800
2022-02-11 03:13:50 +00:00
ahochheiden
c5a6f22e14 Bug 1751781 - Intentionally #undef NAN and redefine it with the value from the STL r=glandium
With the latest Windows 10 SDK (10.0.20348.0), the value of NAN has changed
to differ from the STL. We intentionally #undef the value gotten from the SDK
and replace it with the STL value so that the comparison tests pass regardless
of the Windows SDK version.

Differential Revision: https://phabricator.services.mozilla.com/D137598
2022-02-10 22:47:15 +00:00
Gerald Squelart
c5b8ff3ca4 Bug 1735397 - Don't start profiler in processes excluded by pid - r=florian
When trying to profile only one process, the profiler should not even start in those processes excluded by the filter, so that they don't use any resources (memory and CPU).
To do that, the filter is checked for "pid:" at the multiple locations it may appear:
- In the parent process, when starting the overall profiler, don't send the "Start" IPC to excluded processes.
- When a new process starts and initializes the profiler, don't start the profiler if the filter excludes this process.
- When a new process then registers itself with the parent, don't (re)start the profiler in excluded processes.

Child processes that don't run the profiler may still be asked for a JSON profile at the end of the profiling session. This is handled by sending an empty string, so that the parent process will correctly remove them from the pending-profile list.

Differential Revision: https://phabricator.services.mozilla.com/D135854
2022-02-08 12:47:53 +00:00
Gerald Squelart
ca8a203ae8 Bug 1735397 - mozilla::profiler::detail::FilterHasPid and FiltersExcludePid - r=florian
These will be used to check special thread filter rules around "pid:..." filters.

Differential Revision: https://phabricator.services.mozilla.com/D135853
2022-02-08 12:47:52 +00:00
Gerald Squelart
7e96f5a4d3 Bug 1735397 - Add mozilla/BaseAndGeckoProfilerDetail.h header for shared profiler-only things - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D135852
2022-02-08 12:47:52 +00:00
Kris Wright
51c0acfc7a Bug 1606651 - Remove TSan suppression for nsPluginTag. r=decoder
It looks like this data race might not be hit anymore.

Differential Revision: https://phabricator.services.mozilla.com/D137769
2022-02-08 05:51:10 +00:00
Iulian Moraru
62917bb0d3 Backed out 4 changesets (bug 1735397) for causing spidermonkey build bustages on check_vanilla_allocations.py. CLOSED TREE
Backed out changeset 724e44c19665 (bug 1735397)
Backed out changeset 64546b56bac0 (bug 1735397)
Backed out changeset d55f04c0a444 (bug 1735397)
Backed out changeset 19762488b965 (bug 1735397)
2022-02-08 07:49:20 +02:00
Gerald Squelart
6dca3dab69 Bug 1735397 - Don't start profiler in processes excluded by pid - r=florian
When trying to profile only one process, the profiler should not even start in those processes excluded by the filter, so that they don't use any resources (memory and CPU).
To do that, the filter is checked for "pid:" at the multiple locations it may appear:
- In the parent process, when starting the overall profiler, don't send the "Start" IPC to excluded processes.
- When a new process starts and initializes the profiler, don't start the profiler if the filter excludes this process.
- When a new process then registers itself with the parent, don't (re)start the profiler in excluded processes.

Child processes that don't run the profiler may still be asked for a JSON profile at the end of the profiling session. This is handled by sending an empty string, so that the parent process will correctly remove them from the pending-profile list.

Differential Revision: https://phabricator.services.mozilla.com/D135854
2022-02-08 02:40:50 +00:00
Gerald Squelart
ecc36a6f7e Bug 1735397 - mozilla::profiler::detail::FilterHasPid and FiltersExcludePid - r=florian
These will be used to check special thread filter rules around "pid:..." filters.

Differential Revision: https://phabricator.services.mozilla.com/D135853
2022-02-08 02:40:50 +00:00
Gerald Squelart
3ea972bdd8 Bug 1735397 - Add mozilla/BaseAndGeckoProfilerDetail.h header for shared profiler-only things - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D135852
2022-02-08 02:40:49 +00:00
Markus Stange
740759c4ef Bug 1753272 - On macOS, always enable frame pointer stack walking, even in builds which may not have frame pointers. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D137677
2022-02-03 16:31:05 +00:00
Andi-Bogdan Postelnicu
7858c79fb2 Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio,webdriver-reviewers
Updated with rustfmt 1.4.38-stable (db9d1b2 2022-01-20)

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D137148
2022-01-31 17:00:21 +00:00
Gerald Squelart
50995cc271 Bug 1673513 - Use ProgressLogger in Gecko Profiler - r=florian
Add `ProgressLogger` parameter to most JSON-generating functions.
Each function can update the given `ProgressLogger` between 0% and 100%, and create sub-loggers when calling functions.

The main goal of this instrumentation is to notice when any progress is made by child processes (when the parent process is gathering profiles), so it needs to go deep enough so that it is not stuck on a progress value for "too long" -- During development, that meant progress was always happening when observed every 10ms; In later patches, the overall timeout for no-progress-made will be at least 1 second.

Differential Revision: https://phabricator.services.mozilla.com/D135479
2022-01-31 02:22:27 +00:00
Gerald Squelart
57b6cfaee2 Bug 1673513 - ProgressLogger - r=florian
Class used to log the progress of long operations, and simplifying the use through nested function calls and loops.

Differential Revision: https://phabricator.services.mozilla.com/D135478
2022-01-31 02:22:26 +00:00
Gerald Squelart
cb97352555 Bug 1673513 - ProportionValue - r=florian
Class storing a value between 0 and 1, effectively 0% to 100%.

It will be used through a ProgressLogger object to track the progress of JSON profile generation (see following patches).

Differential Revision: https://phabricator.services.mozilla.com/D135477
2022-01-31 02:22:26 +00:00
Gabriele Svelto
971d0cdf38 Bug 1751041 - Compute the process startup timestamp early during startup r=glandium
Previously the process startup timestamp was computed lazily but this caused
some issues with some of our static analysis infra (see bug 1678152). This
moves computing the timestamp early during process startup and makes it happen
unconditionally.

Differential Revision: https://phabricator.services.mozilla.com/D136406
2022-01-26 19:57:41 +00:00
Julien Wajsberg
cc5e07062d Bug 1639716 - [profiler] Bump the format version to ensure our users get the latest version of the frontend when capturing private browsing data r=gerald
Depends on D129819

Differential Revision: https://phabricator.services.mozilla.com/D136756
2022-01-26 17:26:24 +00:00
Julien Wajsberg
c52080ea1a Bug 1639716 - [profiler] Record the private browsing information in registered pages r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D129416
2022-01-26 17:26:20 +00:00
Mike Hommey
1654ae7332 Bug 1751331 - Use the mozbuild crate in moz_asserts. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D136560
2022-01-25 21:29:50 +00:00
Mike Hommey
b049d1d9cf Bug 1751331 - Use the mozbuild crate in mozglue-static. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D136559
2022-01-25 21:29:50 +00:00
Mike Hommey
e7c54fc571 Bug 1751331 - Remove MOZ_DIST. r=firefox-build-system-reviewers,mhentges
As mentioned in bug 1747354, the location of the dist directory is
relied to be $topobjdir/dist, so just use that consistently rather
than getting it from a separate variable for rust build scripts.

Differential Revision: https://phabricator.services.mozilla.com/D136556
2022-01-25 21:29:49 +00:00
Noemi Erli
f471472a6b Backed out 2 changesets (bug 1678152, bug 1751041) for causing failures in test_missing_intermediate.js CLOSED TREE
Backed out changeset 034ae0e4c467 (bug 1751041)
Backed out changeset 46640f068ae4 (bug 1678152)
2022-01-25 20:09:51 +02:00
Gabriele Svelto
6ef49e257c Bug 1751041 - Compute the process startup timestamp early during startup r=glandium
Previously the process startup timestamp was computed lazily but this caused
some issues with some of our static analysis infra (see bug 1678152). This
moves computing the timestamp early during process startup and makes it happen
unconditionally.

Differential Revision: https://phabricator.services.mozilla.com/D136406
2022-01-25 16:41:21 +00:00
criss
592389ca2d Backed out 10 changesets (bug 1751331) for causing bustages. CLOSED TREE
Backed out changeset 5ce212465a26 (bug 1751331)
Backed out changeset 14d62b8ffa5a (bug 1751331)
Backed out changeset 76f46bd9afa1 (bug 1751331)
Backed out changeset 147faaad046f (bug 1751331)
Backed out changeset f85b049d12f9 (bug 1751331)
Backed out changeset 16d8d3f8378b (bug 1751331)
Backed out changeset 1cd9386a3927 (bug 1751331)
Backed out changeset 20faacba6db6 (bug 1751331)
Backed out changeset 7d17f75bcb38 (bug 1751331)
Backed out changeset 28b9aab1f174 (bug 1751331)
2022-01-25 13:00:25 +02:00
Mike Hommey
47b241bdee Bug 1751331 - Use the mozbuild crate in moz_asserts. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D136560
2022-01-25 09:03:02 +00:00
Mike Hommey
f81fea13ae Bug 1751331 - Use the mozbuild crate in mozglue-static. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D136559
2022-01-25 09:03:02 +00:00
Mike Hommey
5999e70213 Bug 1751331 - Remove MOZ_DIST. r=firefox-build-system-reviewers,mhentges
As mentioned in bug 1747354, the location of the dist directory is
relied to be $topobjdir/dist, so just use that consistently rather
than getting it from a separate variable for rust build scripts.

Differential Revision: https://phabricator.services.mozilla.com/D136556
2022-01-25 09:03:01 +00:00
Jon Coppeard
9463e6b80e Bug 1664535 - Remove TSAN suppression now write barriers are not triggered on background threads r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D100139
2022-01-24 16:32:57 +00:00
Sam Foster
d60fc9a269 Bug 1747429 - Replace preprocessor urlbar* variables with CSS vars. r=dao
* Define urlbarMarginInline and urlbarSearchButtonWidth as CSS rather than preprocessor variables
* Replace the urlbarViewPadding, urlbarViewFaviconWidth and urlbarViewIconMarginEnd preprocessor variables with CSS vars.
* Remove %ifdefs around the license comment in these 2 files
* Update ambiguous/out-of-date comment in the skeleton UI code

Differential Revision: https://phabricator.services.mozilla.com/D135962
2022-01-20 22:46:29 +00:00
Alexandru Michis
c5d4f89a03 Backed out changeset 338f8b736b41 (bug 1747429) as requested by sfoster. 2022-01-20 20:58:34 +02:00
Sam Foster
d292d48758 Bug 1747429 - Replace preprocessor urlbar* variables with CSS vars. r=dao
* Define urlbarMarginInline and urlbarSearchButtonWidth as CSS rather than preprocessor variables
* Replace the urlbarViewPadding, urlbarViewFaviconWidth and urlbarViewIconMarginEnd preprocessor variables with CSS vars.
* Remove %ifdefs around the license comment in these 2 files
* Update ambiguous/out-of-date comment in the skeleton UI code

Differential Revision: https://phabricator.services.mozilla.com/D135962
2022-01-20 00:48:42 +00:00
Gerald Squelart
6ad9abfa16 Bug 1750452 - Replace mutex-locked sampling pause during exec() with atomic variable - r=emilio,mstange
Note: The atomic variable is named `gSkipSampling`, not mentioning forks because it could later be used in other situations, so it's best to describe it by the effect it has.

Differential Revision: https://phabricator.services.mozilla.com/D136205
2022-01-19 03:05:44 +00:00
Gerald Squelart
18d4946ed0 Bug 1744670 - New feature: "Process CPU Utilization" aka "processcpu" - r=florian,canaltinova
The actual implementation is in the following patch.

Differential Revision: https://phabricator.services.mozilla.com/D133599
2022-01-17 23:01:29 +00:00
Mike Hommey
baf00f49c1 Bug 1750084 - Update builders to rustc 1.58. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D135933
2022-01-14 00:37:03 +00:00
Emilio Cobos Álvarez
b09928db79 Bug 1685752 - Add crossbeam_deque's steal to the tsan suppressions. r=Gankra,decoder
Differential Revision: https://phabricator.services.mozilla.com/D135910
2022-01-13 23:42:28 +00:00
Csoregi Natalia
4bb70cbbbc Backed out changeset b745ade60c2c (bug 1750084) for causing gecko decision failure. CLOSED TREE 2022-01-14 01:14:19 +02:00
Mike Hommey
b617ba4e96 Bug 1750084 - Update builders to rustc 1.58. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D135933
2022-01-13 22:18:26 +00:00
Gerald Squelart
67edebb322 Bug 1749498 - PrintUsage doesn't exit anymore, exits are done explicitly - r=canaltinova
`PrintUsageThenExit(code)` was supposed to exit when `code` was not zero, but:
- The name didn't reflect that, so it was confusing that `PrintUsageThenExit(0)` would *not* exit.
- The implementation in the Base Profiler exited anyway! This caused issues with some legacy code that still used the now-removed "threads" feature.

This patch renames the function to just `PrintUsage()` and never exits, leaving the caller to invoke `exit(code)` as needed -- with the added benefit that it's possible to exit with a zero code, useful in cases where an exit is not actually an error.

Differential Revision: https://phabricator.services.mozilla.com/D135666
2022-01-12 12:16:59 +00:00
Cristian Tuns
dea3b789a7 Backed out 2 changesets (bug 1617369, bug 1519636) for causing lint failures on multiple files. CLOSED TREE
Backed out changeset 6726892a0012 (bug 1617369)
Backed out changeset c08caa5f8504 (bug 1519636)
2022-01-11 04:38:34 -05:00
Andi-Bogdan Postelnicu
91c41ec2e4 Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio
Updated with rustfmt 1.4.37-stable (f1edd04 2021-11-29)

Differential Revision: https://phabricator.services.mozilla.com/D135527
2022-01-11 09:16:57 +00:00
Mike Hommey
cca868ba68 Bug 1730004 - Add a crate with diagnostic / nightly asserts. r=nika,emilio
Original patch by emilio.

Differential Revision: https://phabricator.services.mozilla.com/D125190
2022-01-07 21:24:45 +00:00
Andreas Pehrson
2ff8332d74 Bug 1748280 - Gecko Profiler: Fix std::tuple deserialization. r=gerald
I'm gonna guess there was no existing use of the tuple
serialization/deserialization code, because `Bytes` doesn't exist in the
deserializer, and cannot possibly function properly on tuple members that
serialize to a non-constant size, since it's called on a default-constructed
tuple.

This patch took inspiration in the deserializer for Variant and seems to work
fine.

Differential Revision: https://phabricator.services.mozilla.com/D135028
2022-01-05 15:26:24 +00:00
Butkovits Atila
64c8533f75 Backed out 7 changesets (bug 1746361, bug 1748280, bug 1746347) for causing failures at browser_interaction-between-interfaces.js. CLOSED TREE
Backed out changeset eccba94506f0 (bug 1748280)
Backed out changeset baf39ae53772 (bug 1748280)
Backed out changeset 775843562f7e (bug 1748280)
Backed out changeset 0987c68e9683 (bug 1748280)
Backed out changeset 58dd008520da (bug 1746361)
Backed out changeset 6f9e800877a6 (bug 1746347)
Backed out changeset f78e794a9c2f (bug 1746347)
2022-01-05 13:53:57 +02:00