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
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
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
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
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
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
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
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
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
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
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
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
Now the test will warn when more properties than expected are received.
This way we won't forget to update the tests when we add more, but we
also assert that some properties are absent in some cases, as expected.
The test has been also changed a lot to pass in verify mode. To make
this easier we disable the HTTP cache.
Differential Revision: https://phabricator.services.mozilla.com/D117679
(Tl;dr: The original author of this patch was axel@mozilla.com (:pike).
This patch has been modified to run in production automation.)
Cross-channel takes all the en-US strings from the shipping train branches
and consolidates them into a single repository. Originally, this ran out of
https://hg.mozilla.org/users/axel_mozilla.com/cross-channel-experimental/ .
The original version was coupled tightly with specific hg internals, making
hg upgrades fragile. Axel wrote
https://bug1659691.bmoattachments.org/attachment.cgi?id=9170636 before
handing off project ownership; this is the original patch to stop replaying
history to simplify the logic.
This patch also automates the previously manual preparation steps, allows
for running both in automation and locally, and adds retries for production
robustness.
Differential Revision: https://phabricator.services.mozilla.com/D116537
This patch forces perfdocs to produce unix line endings rather than os-specific line endings. This fixes an issue where generating the docs on windows causes all the docs to change because of the line endings.
Differential Revision: https://phabricator.services.mozilla.com/D117919