Граф коммитов

9072 Коммитов

Автор SHA1 Сообщение Дата
Gerald Squelart e7e9ae90ae Bug 1721110 - profiler_current_thread_id() now returns ProfilerThreadId - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D120225
2021-07-21 04:16:59 +00:00
Gerald Squelart 7bc3116790 Bug 1721110 - baseprofiler::profiler_current_thread_id() now returns BaseProfilerThreadId - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D120224
2021-07-21 04:16:59 +00:00
Gerald Squelart 0e7895310f Bug 1721110 - profiler_current_process_id() now returns ProfilerProcessId - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D120223
2021-07-21 04:16:58 +00:00
Gerald Squelart 72f0855bfa Bug 1721110 - Introduce BaseProfilerProcessId and BaseProfilerThreadId - r=florian
These classes should replace the `int` type that is currently used to store process and thread ids. The next patches will start using them. Advantages:
- Prevent type mismatches, e.g., giving a process id (or other number) to a function expecting a thread id.
- Prevent nonsensical arithmetic operations.
- Make the unspecified id more abstract, so it's more obvious and portable.
- Make conversions to/from numbers (for display or storage) more visible.
- Allow future changes of APIs using them less risky.
- Allow future changes of the ids themselves (e.g., to be able to use bigger underlying types on some platforms, or even the opaque std:🧵:id type.)

Differential Revision: https://phabricator.services.mozilla.com/D120221
2021-07-21 04:16:57 +00:00
Gerald Squelart a966352bcd Bug 1721110 - {,Base}ProfilerUtils.h with process&thread functions taken from {,Base}ProfilerState.h - r=florian
This new header isolates the process and thread functions that should be available in all builds, and in most other profiler headers.
Non-MOZ_GECKO_PROFILER implementations return ids 0 (unspecified process/thread). `profiler_is_main_thread()` returns false, it's arbitrary but consistent with `0` (it makes little sense to use it there anyway.)

Differential Revision: https://phabricator.services.mozilla.com/D120220
2021-07-21 04:16:57 +00:00
Gerald Squelart 171c2eed5f Bug 1721110 - {,Base}ProfilerState.h improvements: Sprinkle nodiscard's and more - r=florian
The next patch will extract parts of these headers into a separate file, so it's best to do this clean-up now, to best preserve history.
- Add [[nodiscard]] to all functions that return something. (There are no cases where that returned value could really be ignored.)
- Hide scProfilerMainThreadId in a "detail" namespace, to emphasize that it's an implementation detail that the user shouldn't access directly.
- Combine tightly-nested namespaces start/end into single lines, it's more readable.

Differential Revision: https://phabricator.services.mozilla.com/D120219
2021-07-21 04:16:56 +00:00
Gerald Squelart 02a156fe92 Bug 1720846 - Fix non-unified build by adding missing #includes - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D120301
2021-07-20 09:31:17 +00:00
Kajal Sah 2bf658dd41 Bug 1718713 - Creates dummy custom element in new screenshot. r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D119209
2021-07-19 16:47:34 +00:00
Alex Lopez 77ce415604 Bug 1696251 - Replace self with command_context where possible in existing mach commands. r=mhentges,webdriver-reviewers,perftest-reviewers,whimboo
This step removes all the dependencies of mach commands to
having a MachCommandBase as the `self` by using the `command_context`
argument instead. This also removes any remaining statefulness from those
classes that implement mach commands, ultimately making it easier to move
existing commands out of classes in a follow-up.

Differential Revision: https://phabricator.services.mozilla.com/D118058
2021-07-19 16:04:25 +00:00
surajeet310 407f1ae5ac Bug 1717651 - Removed instances of 'ensure_subprocess_env' from tools/lint/eslint r=mhentges
Since Python 2 is no longer used in tools/lint/eslint,hence 'ensure_subprocess_env' is obsolete.

Differential Revision: https://phabricator.services.mozilla.com/D119917
2021-07-16 21:06:25 +00:00
Sylvestre Ledru ef018c2533 Bug 1720922 - Update sphinx 4.1.1 and its dependencies r=firefox-build-system-reviewers,mhentges
Depends on D120087

Differential Revision: https://phabricator.services.mozilla.com/D120088
2021-07-16 17:38:43 +00:00
Butkovits Atila a07f790e42 Backed out changeset e1921c5112d8 (bug 1696251) for causing bustages complaining about 'CommandContext'. CLOSED TREE 2021-07-16 20:35:55 +03:00
Butkovits Atila 9cd21f6f85 Backed out changeset d1f54e2176d1 (bug 1718124) for causing lint failures at perfdocs/config.yml. CLOSED TREE 2021-07-16 20:17:56 +03:00
Kimberly Sereduck 56e729107d Bug 1718124: Add documentation for Raptor benchmark and scenario tests;r=perftest-reviewers,AlexandruIonescu
Differential Revision: https://phabricator.services.mozilla.com/D118750
2021-07-16 16:56:50 +00:00
Alex Lopez 190e03aaab Bug 1696251 - Replace self with command_context where possible in existing mach commands. r=mhentges,webdriver-reviewers,perftest-reviewers,whimboo
This step removes all the dependencies of mach commands to
having a MachCommandBase as the `self` by using the `command_context`
argument instead. This also removes any remaining statefulness from those
classes that implement mach commands, ultimately making it easier to move
existing commands out of classes in a follow-up.

Differential Revision: https://phabricator.services.mozilla.com/D118058
2021-07-16 15:51:29 +00:00
Florian Quèze 4593f874da Bug 1720853 - Move profiler_add_*_marker functions out of the public GeckoProfiler.h header, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D120066
2021-07-16 15:26:23 +00:00
Florian Quèze 4f4eb91a27 Bug 1720851 - fix includes in NetworkMarker.cpp, r=gerald,necko-reviewers,kershaw.
Differential Revision: https://phabricator.services.mozilla.com/D120062
2021-07-16 15:26:23 +00:00
Florian Quèze 292c1a1f60 Bug 1720368 - Remove MOZ_GECKO_PROFILER ifdefs around profiler_init and profiler_shutdown calls, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D119809
2021-07-15 22:04:23 +00:00
Florian Quèze 57d1e300f5 Bug 1720362 - Remove the last MOZ_GECKO_PROFILER ifdefs in ipc code, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D119801
2021-07-15 22:04:22 +00:00
Florian Quèze c4c51c4002 Bug 1720358 - Make AutoProfilerLabel available even when MOZ_GECKO_PROFILER is not defined, and remove ifdefs, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D119795
2021-07-15 22:04:22 +00:00
Florian Quèze 4f6e64dec4 Bug 1720289 - remove MOZ_GECKO_PROFILER ifdefs around network markers, r=necko-reviewers,gerald,kershaw.
Differential Revision: https://phabricator.services.mozilla.com/D119740
2021-07-15 22:04:21 +00:00
surajeet310 cb818a9aa9 Bug 1717651 - Removed instances of 'ensure_subprocess_env' from tools/tryselect/selectors r=mhentges
'ensure_subprocess_env' is obsolete now as Python 2 is no longer used in tools/tryselect/selectors .

Differential Revision: https://phabricator.services.mozilla.com/D119979
2021-07-15 21:40:50 +00:00
Tom Ritter 1b9b6b72db Bug 1666222: Cut over a ton of NowUnfuzzed calls -> Now 4/5 r=smaug,extension-reviewers,zombie
With Fuzzyfox removed, Now() does what NowUnfuzzed() did.

Differential Revision: https://phabricator.services.mozilla.com/D119639
2021-07-14 18:18:17 +00:00
Gerald Squelart 9b0d666eda Bug 1719240 - Rework PSMutex into PSAutoLock - r=canaltinova
This prevents unwanted direct access to the mutex, and removes duplicated code.

And make the Base Profiler mutex&lock consistent.

Differential Revision: https://phabricator.services.mozilla.com/D119147
2021-07-13 12:20:49 +00:00
Gerald Squelart 2323e31002 Bug 1719240 - Use BaseProfilerMutex and Lock for state-change APIs - r=canaltinova
PSMutex/Autolock are reserved for the main profiler mutex (which will change in the next patch.)

Differential Revision: https://phabricator.services.mozilla.com/D119146
2021-07-13 12:20:49 +00:00
Tooru Fujisawa cc92ef732d Bug 1708448 - Move property and element functions into js/public/PropertyAndElement.h. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D119619
2021-07-13 11:52:42 +00:00
Andi-Bogdan Postelnicu 90ec98c524 Bug 1719812 - Upgrade llvm toolchain to 12.0.1. r=firefox-build-system-reviewers,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D119493
2021-07-12 13:44:32 +00:00
Steve Fink 09c0d66bcc Bug 1718819 - Export gBreakpadEnabled symbol to fix minidump suppression mechanism. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D119467
2021-07-10 14:17:31 +00:00
Gerald Squelart bc59d71b79 Bug 1719670 - Clear running times when starting a profile, to avoid a big CPU value when restarting the profiler - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D119411
2021-07-09 11:21:25 +00:00
Sandor Molnar d8c88ba66a Backed out changeset 932f7478dc2a (bug 1717047) for causing bug 1719684. CLOSED TREE 2021-07-08 19:41:24 +03:00
Florian Quèze df151e59a2 Bug 1719218 - Remove the need for MOZ_GECKO_PROFILER ifdefs in code using ChildProfilerController, r=gerald,necko-reviewers,dragana.
Differential Revision: https://phabricator.services.mozilla.com/D119132
2021-07-08 16:20:10 +00:00
Florian Quèze 673e38408d Bug 1719218 - Build ProfilerParent even when MOZ_GECKO_PROFILER is not defined, r=gerald,necko-reviewers,nika,dragana.
Differential Revision: https://phabricator.services.mozilla.com/D119131
2021-07-08 16:20:08 +00:00
Michael Froman bbce1490f9 Bug 1719491 - revert clang-format of tools/profiler/public/GeckoTraceEvent.h. r=ng
Bug 1714577 meant to exclude tools/profiler/public/GeckoTraceEvent.h from
clang-format, but the trailing comment in .clang-format-ignored broke that.
Bug 1519636 then formatted the file.

This fixes the exclusion in .clang-format-ignore and backs out the
clang-format on tools/profiler/public/GeckoTraceEvent.h.

Differential Revision: https://phabricator.services.mozilla.com/D119297
2021-07-07 15:57:17 +00:00
Julien Wajsberg e2636f5dd9 Bug 1717047 - [profiler, netwerk] Support all redirections in the parent process r=canaltinova,necko-reviewers,dragana
This moves the adding of the end marker for redirects in nsHttpChannel
to SetupReplacementChannel, so that all redirects are properly caught.
Without that, some requests will show as unfinished in the profiler
frontend.

Some of the redirects are internal and we may be able to flag and ignore
them in the frontend, but that's work for the future.

Because all redirections get a "REDIRECT" end marker, including the
internal redirection to the service worker's intercepted channel, we now
need an additional "START" marker there as well.

All existing profiler tests related to service workers needed to be
updated because there's an extra redirect marker in all these requests,
as well as several pairs of markers that all have the same id.

This also adds a new profiler test for handling the http->https case
that we wouldn't catch before this patch.

Differential Revision: https://phabricator.services.mozilla.com/D118836
2021-07-07 14:09:47 +00:00
Aaron Klotz b1e6df55c3 Bug 1715650: Add linter for detecting COM initialization; r=linter-reviewers,andi
This patch adds a new linter that will error when new code mentions any one of
the following strings:

* `CoInitialize`;
* `CoInitializeEx`;
* `OleInitialize`;
* `RoInitialize`;
* `CoUninitialize`;
* `OleUninitialize`; and
* `RoUninitialize`.

Since I don't care about context, and just want to flag code containing these
names, I opted for a `regex` linter.

Yes, the regex does match a few strings beyond the above list (in particular, it
also matches additional strings that end with an `Ex` suffix), but since
functions with those names don't exist anyway (and would be errors in their own
right), I am not concerned about it.

All existing occurrences have been added to the exclusion list, with the
intent of removing most of them over time.

Differential Revision: https://phabricator.services.mozilla.com/D119129
2021-07-06 14:05:42 +00:00
Gabriele Svelto 2c9bfe697b Bug 1717909 - Fetch only one file at a time from Microsoft's symbol servers; r=marco,calixte
Differential Revision: https://phabricator.services.mozilla.com/D118837
2021-06-26 06:37:29 +00:00
Florian Quèze 19046b7c39 Bug 1718019 - Skip the entire folders of profiler tests when MOZ_GECKO_PROFILER is not defined instead of returning early in each test, r=julienw
Differential Revision: https://phabricator.services.mozilla.com/D118690
2021-06-25 22:11:25 +00:00
Florian Quèze c87b4eb7b7 Bug 1717991 - Profiler headers should declare all the marker related functions even when MOZ_GECKO_PROFILER is not defined, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D118679
2021-06-25 13:28:01 +00:00
Gerald Squelart 26512bc218 Bug 1716712 - Use JIT information in DoFramePointerBacktrace on x64 - r=canaltinova
This is similar to what DoMozStackWalkBacktrace does, by looking where the stack walker stopped, and if it can be restarted at a calling C++-to-JIT entry frame.

Note: The code is pretty much a modified copy, but factoring out the common parts would be difficult because of the specific local variables, the different stack-walking functions, and the different register storages.

Also, instead of mentioning the OS (was only Windows), the choice of platform support is now based on the actual Profiler stack walkers that are used.

Differential Revision: https://phabricator.services.mozilla.com/D118109
2021-06-25 09:48:25 +00:00
Gerald Squelart d5629753f3 Bug 1716274 - profiler_add/remove_state_change_callback - r=canaltinova
Callbacks can be registered to be called at specific profiler state changes.
This may be useful to make sure some markers are recorded at the end of the profile time range, if some information would be useful to always have available (and it doesn't fit in meta-information or elsewhere).

Differential Revision: https://phabricator.services.mozilla.com/D118128
2021-06-24 07:25:55 +00:00
Alexis Beingessner cbc6c14a6c Bug 1717002 - document how to download tsan toolchains. r=andi DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D118612
2021-06-23 17:08:00 +00:00
Julien Wajsberg 693009ee54 Bug 1717414 - [profiler, netwerk] Report the new channel id in redirect network markers r=necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D118468
2021-06-23 16:03:50 +00:00
Julien Wajsberg 3dcc5b5fe6 Bug 1717414 - [profiler] Add a new property to network markers to report the new channel id for redirection processes r=gerald
Then this will make it possible in the UI to relate the redirected
request with its redirection.

With this patch a debug build of Firefox will crash when a redirection
happens, but the next patch will fix this.

Differential Revision: https://phabricator.services.mozilla.com/D118467
2021-06-23 16:03:49 +00:00
Andrew Halberstadt 82e328843f Bug 1717427 - [tryselect] Use 'raise_for_status' when downloading estimates data, r=mhentges
These requests had except blocks to catch all requests exceptions. But because
we weren't calling 'raise_for_status', exceptions were never raised, resulting
in bizarre error tracebacks later on.

Depends on D118356

Differential Revision: https://phabricator.services.mozilla.com/D118357
2021-06-22 20:54:19 +00:00
Andrew Halberstadt 6aec441fb8 Bug 1717427 - [tryselect] Don't allow 'display_estimates' to fail the whole |mach try| run, r=mhentges
A failure displaying estimates should never cause the try push to fail, as it
is entirely optional. This adds a blanket except to catch any exception that
was mishandled inside the estimates submodule.

It still displays a traceback as any failures displayed here should still
legitimately be fixed or have smoother error handling.

Differential Revision: https://phabricator.services.mozilla.com/D118356
2021-06-22 20:54:19 +00:00
Andrew Halberstadt d3508233ee Bug 1717691 - [tryselect] Ensure we re-compute the cache key for target_task_set after '--full', r=mhentges
When a user runs 'mach try --full', we continue computing the target task set
and cache it anyway (since we were already almost there and starting over in
the event they re-run without '--full' is very expensive.

However, when implementing the 'cache_key' function in bug 1714178, I forgot to
recompute the key in this case, causing the contents of 'target_task_set' to
overwrite the 'full_task_set' cache.

This also includes a minor improvement to re-use the 'full_task_set' cache
regardless of 'disable_target_task_filter', as that flag has zero bearing on
the full task graph. This should result in fewer cache misses when using
--full.

Differential Revision: https://phabricator.services.mozilla.com/D118531
2021-06-22 20:53:08 +00:00
Sylvestre Ledru 68ef92902d Bug 1717447 - mozlint/spell: update to version 2.1.0 r=linter-reviewers,marco DONTBUILD
Depends on D118294

Differential Revision: https://phabricator.services.mozilla.com/D118292
2021-06-21 15:29:11 +00:00
Sylvestre Ledru b8c513cc04 Bug 1717447 - mozlint/spell: don't run on tools/lint/cpp/mingw-headers.txt r=linter-reviewers,marco DONTBUILD
Depends on D118291

Differential Revision: https://phabricator.services.mozilla.com/D118293
2021-06-21 15:29:10 +00:00
Sylvestre Ledru 1e5ffa4271 Bug 1717447 - mozlint/spell: add a .in file r=linter-reviewers,marco DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D118291
2021-06-21 15:29:10 +00:00
Gerald Squelart c83e6a0508 Bug 1715922 - Windows timer resolution is enhanced by default, except if notimerresolutionchange feature is set - r=canaltinova
This reverses bug 1703410: By default the profiler now changes the timer resolution (normally 64Hz) when the requested sampling interval is lower than 10ms, to allow fast-enough sampling for most uses.

But since this can influence other timers in Firefox, it makes debugging some types of issues more difficult. To help with this, there is now a "No Timer Resolution change" on Windows, which prevents the profiler from changing the timer resolution, at a risk of slowing down sampling in some processes.

Differential Revision: https://phabricator.services.mozilla.com/D117626
2021-06-21 11:48:23 +00:00