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

9425 Коммитов

Автор SHA1 Сообщение Дата
Gerald Squelart 8ff93952a4 Bug 1737058 - Empty MOZ_PROFILER_SHUTDOWN in child processes, so they don't needlessly and dangerously write their profile to the same file - r=canaltinova
The user shouldn't set MOZ_PROFILER_SHUTDOWN to an empty string, it wouldn't work anyway.
So now there is an extra check for that, to avoid even attempting to write a profile when there is no actual filename.

Thanks to this, the parent process can now just re-set MOZ_PROFILER_SHUTDOWN to "" in its children, so that they won't try to output their own profile into the same file. (This used to mostly work, because the parent process was the last to write its profile; but anecdotal data shows this may not alwaybe be true.)

As a bonus optimization, this means that child processes don't waste time needlessly saving their profile to disk.

Differential Revision: https://phabricator.services.mozilla.com/D129237
2021-10-22 08:41:27 +00:00
Frederik Braun 07077e4449 Bug 1736781 - Update eslint-plugin-no-unsanitized to version 3.2.0 r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D128988
2021-10-21 13:08:11 +00:00
Gerald Squelart 1af62d829d Bug 1577658 - Read samples&markers from all threads at once - r=canaltinova
Finally it all comes together!
Factored-out functions from previous patches are now used by the new functions, which work with streaming contexts, in order to prepare stacks are other things first, then read the profile buffer just once to extract all samples and markers, and finally output this data in the expected JSON format.

One trick, is that when working on "legacy" entries (mostly related to samples), we need to handle "modern" marker entries as we encounter them; this happens in EntryGetter, and also when reading compact stacks and same-samples.

Differential Revision: https://phabricator.services.mozilla.com/D128444
2021-10-21 05:47:25 +00:00
Gerald Squelart 1538b47534 Bug 1577658 - Factor DoStreamSamplesToJSON out of ProfileBuffer::StreamSamplesToJSON - r=canaltinova
This refactoring is a bit more complex (to prepare for the next patch).

The body of StreamSamplesToJSON was moved to a function that takes a lambda, which will provide streaming parameters relevant to the thread id of each read sample.
For now, it's only used by StreamSamplesToJSON, so in this case the lambda only checks if the entry thread id is the expected one, and it provides the JSON writer and other things needed to write these samples.

One extra complexity is that the `ProfileSample sample` that was outside the loop is now removed -- because in later patches this code will handle samples from different threads, so they cannot all share this one sample object. Instead the information that must be carried over is in the streaming parameters (mPreviousStackState and mPreviousStack), so that they correspond to one thread each. But the overall logic is the same, apart from where this out-of-the-loop information lives.

And another difference is that old samples (before `aSinceTime`) are fully processed, and then discarded just before being output, because we need their information to be in the thread's UniqueStacks, in case it's used by a later same-as-before sample.

Differential Revision: https://phabricator.services.mozilla.com/D128443
2021-10-21 05:47:25 +00:00
Gerald Squelart 8bca70e031 Bug 1577658 - Add classes containing process and thread streaming contexts - r=canaltinova
ThreadStreamingContext contains all the information needed to output samples and markers relevant to one thread.

ProcessStreamingContext contains a list of ThreadStreamingContext's for all profiled threads. This way, when reading the profile buffer, it will be possible to send each sample&marker to the relevant JSON writer.

Differential Revision: https://phabricator.services.mozilla.com/D128442
2021-10-21 05:47:24 +00:00
Gerald Squelart 211590ad5a Bug 1577658 - Factor StreamTablesAndTraceLogger out of ProfiledThreadData::StreamJSON - r=canaltinova
This new function will be used a second time in a later patch.

Differential Revision: https://phabricator.services.mozilla.com/D128441
2021-10-21 05:47:24 +00:00
Gerald Squelart e65f8f7ae1 Bug 1577658 - Make ProfiledThreadData::StreamTraceLoggerJSON a static non-member function - r=canaltinova
StreamTraceLoggerJSON doesn't rely on ProfiledThreadData, so it can just be a file-static function.
The code hasn't changed at all, the function needed to be moved up the file, before its first use.

Differential Revision: https://phabricator.services.mozilla.com/D128440
2021-10-21 05:47:23 +00:00
Gerald Squelart 4280107150 Bug 1577658 - Factor out DoStreamSamplesAndMarkers to abstract sample and marker data output - r=canaltinova
The body of StreamSamplesAndMarkers has been factored out into a templated function, with some lambdas to cover the buffer-reading and streaming of samples and markers.
In a later patch, DoStreamSamplesAndMarkers will be used to also stream already-processed samples and markers.

Differential Revision: https://phabricator.services.mozilla.com/D128439
2021-10-21 05:47:23 +00:00
Gerald Squelart edc791b35d Bug 1577658 - EntryGetter::RestartAfter - r=canaltinova
While processing the profile buffer, the EntryGetter's iterator is used to read some "modern" entries, but then the EntryGetter is left to skip these entries again until the next "legacy" entry (with `e.Next()`).

Now, after reading modern entries, the EntryGetter's iterator is updated to directly skip the already-read modern entries.
And in a later patch this will be in fact necessary, otherwise we would process this modern data twice!

Differential Revision: https://phabricator.services.mozilla.com/D128438
2021-10-21 05:47:22 +00:00
Gerald Squelart 678e287e4d Bug 1577658 - Factor PrepareUniqueStacks out of ProfiledThreadData::StreamJSON - r=canaltinova
The start of StreamJSON is about setting up the UniqueStacks, it can be factored out.
In a later patch, this will be used to prepare the UniqueStacks for each thread in one loop, before processing the profile buffer.

Differential Revision: https://phabricator.services.mozilla.com/D128437
2021-10-21 05:47:22 +00:00
Gerald Squelart 153c2bb05e Bug 1577658 - UniqueStacks constructor can accept a ProfilerCodeAddressService - r=canaltinova
When it's constructed, UniqueStacks can now take a ProfilerCodeAddressService pointer, instead of having to add it separately.
It will be even more useful in a later patch, when constructing it as a struct member in one shot.

Differential Revision: https://phabricator.services.mozilla.com/D128434
2021-10-21 05:47:21 +00:00
Gerald Squelart 302a5711fa Bug 1577658 - DeserializeAfterKindAndStream takes a lambda: (tid) -> writer - r=canaltinova
Previously, DeserializeAfterKindAndStream would take a JSON writer and a thread id, using the thread id (if specified) to only output markers from that thread to the given writer.

Now, DeserializeAfterKindAndStream takes a lambda, which will be called with the thread id found in the marker, that lambda can either return null (nothing to output) or a pointer to a writer, in which case the marker is read and output to the given writer.
This makes DeserializeAfterKindAndStream more flexible, and will allow handling markers from different threads, each possibly being output to different writers.

Also, for simplicity the entry is now always fully read, so there is no need for the caller to do anything. The return bool is therefore unnecessary, and has been removed.

Differential Revision: https://phabricator.services.mozilla.com/D128433
2021-10-21 05:47:21 +00:00
Andi-Bogdan Postelnicu 0d12e234b2 Bug 1731582 - Move to clang-13 r=firefox-build-system-reviewers,mhentges,decoder
Join work with glandium.

Differential Revision: https://phabricator.services.mozilla.com/D126208
2021-10-20 12:03:20 +00:00
Gerald Squelart 6c62474dd7 Bug 1736489 - Always output the last counter sample before each change - r=florian
The makes the graphs much more correct:
If there were multiple skipped samples, the front-end would graph a long diagonal line between the samples before and after the skipped ones, making it look like the value gradually changed during that time.
Instead, by forcing the output of values before a change, this shows a better graph, with a horizontal line while the value didn't change, and a more abrupt diagonal line between the last two sample times when the change actually happened.

Also always output the very last sample, to clarify the final value (in case it was the same as previous ones.)

Differential Revision: https://phabricator.services.mozilla.com/D128841
2021-10-20 02:24:08 +00:00
Gerald Squelart 79a0e2a2fd Bug 1736489 - Add gtests for counters in JSON profiles - r=florian
This patch adds generic checks in all JSON profiles, that "counters" look valid.
And in GeckoProfiler.Counters, there are new checks for manually-added counters.

WaitForSamplingState had to be moved up. It's more efficient and reliable than an arbitraty `PR_Sleep` to wait for samples to be taken.

Differential Revision: https://phabricator.services.mozilla.com/D128840
2021-10-20 02:24:08 +00:00
Andrew Halberstadt cf4e5e6294 Bug 1736559 - [lint] Ignore all 'package-lock.json' files in codespell linter, r=linter-reviewers,sylvestre
Depends on D128885

Differential Revision: https://phabricator.services.mozilla.com/D128886
2021-10-19 19:11:09 +00:00
Andrew Halberstadt 4dd650366c Bug 1736559 - [lint] Fix codespell silently fixing files, r=linter-reviewers,sylvestre
We have a check in the 'CodespellProcess' class to ignore errors that are
fixing single letter camelCase errors (since these tend to be used frequently.

Unfortunately, when using '--fix', these errors are fixed regardless as the
fixing happens with the codespell process. Since we increment the 'fix'
variable after the check happens, we don't even report that anything was
'fixed'.

Ideally we would find a way to prevent these types of errors from being fixed,
but for now this at will at least ensure that the user is notified that
something was modified.

Differential Revision: https://phabricator.services.mozilla.com/D128885
2021-10-19 19:11:09 +00:00
Heitor Neiva 1b6ed32435 Bug 527670 - Refactor Update Verify readme, r=aki
Added instructions to run update-verify locally

Differential Revision: https://phabricator.services.mozilla.com/D128796
2021-10-19 13:43:51 +00:00
Gerald Squelart df50ece611 Bug 1735697 - Remove profiler_can_accept_markers(), use profiler_thread_is_being_profiled() instead - r=florian
Differential Revision: https://phabricator.services.mozilla.com/D128577
2021-10-18 23:11:30 +00:00
Gerald Squelart 424aac2b72 Bug 1735697 - Only record markers from actually-profiled threads - r=florian
`profiler_add_marker()` now checks if the marker's target thread is actively being profiled. This is to prevent adding markers that would be discarded anyway, from taking CPU time to process, and from using space in the profile buffer.

This means that `profiler_thread_is_being_profiled(ProfilerThreadId)` must be used when a marker is intended for another thread, i.e., when it uses the MarkerThreadId option.

(Note: since baseprofiler::profiler_thread_is_being_profiled(ProfilerThreadId) is not available, baseprofiler::AddMarker cannot prevent markers targetted at non-profiled thread; There are none yet anyway.)

Differential Revision: https://phabricator.services.mozilla.com/D128576
2021-10-18 23:11:30 +00:00
Gerald Squelart 8bf5fd4b34 Bug 1735697 - profiler_is_being_profiled checks for pauses, and can check another thread - r=florian
If the profiler is paused, then really, threads are not *being* profiled.

profiler_is_active_and_unpaused() was added, to help with non-MOZ_GECKO_PROFILER builds.

(Note: baseprofiler::profiler_thread_is_being_profiled(ProfilerThreadId) is not possible to implement, but it's not needed anyway.)

Differential Revision: https://phabricator.services.mozilla.com/D128707
2021-10-18 23:11:29 +00:00
Gerald Squelart a685378366 Bug 1735697 - ProfilerThreadRegistry::WithOffThreadRefOr - r=florian
ProfilerThreadRegistry::WithOffThreadRefOr is to ProfilerThreadRegistry::WithOffThreadRef as
ProfilerThreadRegistration::WithOnThreadRefOr is to ProfilerThreadRegistration::WithOnThreadRef.

So it is similar to ProfilerThreadRegistry::WithOffThreadRef, but it returns whatever the callback returns if the thread id was found, otherwise it returns a fallback value.

Differential Revision: https://phabricator.services.mozilla.com/D128575
2021-10-18 23:11:29 +00:00
Nika Layzell 40de6947f1 Bug 1734700 - Use the IO event queue for IOUtils background tasks, r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D128311
2021-10-18 19:34:59 +00:00
Mark Banner 5e856096fc Bug 1736022 - For ESLint, mark 'handleRequest' as a used variable for sjs files. r=Gijs
Depends on D128594

Differential Revision: https://phabricator.services.mozilla.com/D128595
2021-10-18 14:28:26 +00:00
Mark Banner 660f501442 Bug 1736022 - Speed up ESLint rule no-arbitrary-setTimeout.js. r=Gijs
This moves the more expensive check for testing the file type until after we've found an instance of setTimeout.
This is quicker as the initial checks are for simple comparisons.

Differential Revision: https://phabricator.services.mozilla.com/D128594
2021-10-18 14:28:25 +00:00
Evgenia Kotovich 0d0980ee0d Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-18 09:26:33 +00:00
Daisuke Akatsuka 4e72afc41d Bug 1678607: Implement a mechanism to fire bookmark-tags-changed event. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D128326
2021-10-18 04:43:44 +00:00
Alexandru Michis 5b0d89d8d6 Backed out 3 changesets (bug 1678607) for causing bc failures in browser_bookmark_add_tags.js
Backed out changeset bf20be578758 (bug 1678607)
Backed out changeset fd3fbf15e95d (bug 1678607)
Backed out changeset 2688fa3d2bc2 (bug 1678607)
2021-10-18 03:10:58 +03:00
Daisuke Akatsuka ef8ed2e02d Bug 1678607: Implement a mechanism to fire bookmark-tags-changed event. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D128326
2021-10-17 22:47:36 +00:00
Noemi Erli 2bba3cec69 Backed out changeset 2ab6bb03dcc1 (bug 1576768) for causing failures in test_double_submit.html CLOSED TREE 2021-10-18 02:05:57 +03:00
Evgenia Kotovich 3e3dff109c Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-17 14:59:14 +00:00
Alexandru Michis dac6815201 Backed out changeset 7c08aa027893 (bug 1576768) for causing multiple failures.
CLOSED TREE
2021-10-15 16:52:43 +03:00
Evgenia Kotovich a8b32926fa Bug 1576768 - Automatically format .sjs files using prettier. r=Standard8,agi,zombie,extension-reviewers
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D128482
2021-10-15 12:58:11 +00:00
Kimberly Sereduck bf944ccf36 Bug 1735540: Update ImageMagick url for Windows browsertime requirements r=perftest-reviewers,AlexandruIonescu
Differential Revision: https://phabricator.services.mozilla.com/D128383
2021-10-14 15:03:02 +00:00
Mathew Hodson 05af5b9c98 Bug 1735681 - Add colorama to pylint_requirements.in. r=ahal
This makes sure colorama stays in pylint_requirements.txt next
time someone regenerates it on a non-Windows machine. Since
colorama is only required by pylint on Windows.

Differential Revision: https://phabricator.services.mozilla.com/D128426
2021-10-14 13:14:02 +00:00
Nihanth Subramanya e6d5cae88b Bug 1731780 - Reject .only() chained onto add_task in tests. r=Gijs,mythmon,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D128027
2021-10-13 21:26:40 +00:00
Mathew Hodson 3df2d4789a Bug 1734971 - Add pylint requirements for Windows. r=linter-reviewers,sylvestre
This adds colorama, which is required by pylint only on Windows.

Differential Revision: https://phabricator.services.mozilla.com/D128007
2021-10-13 17:05:42 +00:00
Renovate Bot c9b15cac97 no bug - Update dependency flake8 to v4 r=linter-reviewers,ahal DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D128092
2021-10-13 14:16:38 +00:00
Mats Palmgren 31935fdc02 Bug 1735445 - Land initial CSS Gap Decorations draft spec in tree for internal reviewing purposes. NPOTB DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D128324
2021-10-13 04:12:29 +00:00
Gerald Squelart 2570aaff04 Bug 1735273 - Continue streaming thread after an initial same-as-before sample - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D128163
2021-10-12 23:19:21 +00:00
Gerald Squelart 0998b61022 Bug 1735244 - Moved inter-thread access assertion after the thread is actually unregistered - r=canaltinova
The data-mutex lock assertion in the ThreadRegistration destructor was done too early, because that ThreadRegistration could still be publicly accessible through the ThreadRegistry at that time.
This assertion is now moved after `ThreadRegistry::UnregisterThread`, after which other threads shouldn't have access to this ThreadRegistration anymore.

This patch also adds a stress gtest that registers and unregisters a thread many times, and a separate thread attempts to access and lock the test thread data. It did trigger the previous assertion before it was moved.

Differential Revision: https://phabricator.services.mozilla.com/D128162
2021-10-12 23:14:11 +00:00
Gregory Mierzwinski 0b3a97aaf8 Bug 1733434 - Reduce browser-cycles and disable media autoplay in live site tests. r=perftest-reviewers,kimberlythegeek
CLOSED TREE

This patch reduces the number of browser-cycles that a live-site test (cnn in this case) does from 25 down to 5. Furthermore, we also disable media autoplay for all live site tests. This change required an update to browsertime to prevent default prefs from being set and overriding our prefs.

Differential Revision: https://phabricator.services.mozilla.com/D127831
2021-10-12 17:50:33 +00:00
Heitor Neiva 3a37f1b522 Bug 527670 - add named arguments to update_verify r=aki
Quality of life improvement to update_verify script and taskgraph cli arguments

Differential Revision: https://phabricator.services.mozilla.com/D128300
2021-10-12 21:11:26 +00:00
Alexandru Michis 4283df0b14 Backed out changeset e6df1ed94379 (bug 1733434) for causing btime and awsy failures.
CLOSED TREE
2021-10-13 01:12:12 +03:00
Andrei Oprea c73cc990d7 Bug 1730924 - Upgrade ajv.js from 4.1.1 to 6.12.6 r=k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D127625
2021-10-12 19:41:05 +00:00
Gregory Mierzwinski 97f49d7a5e Bug 1733434 - Reduce browser-cycles and disable media autoplay in live site tests. r=perftest-reviewers,kimberlythegeek
This patch reduces the number of browser-cycles that a live-site test (cnn in this case) does from 25 down to 5. Furthermore, we also disable media autoplay for all live site tests. This change required an update to browsertime to prevent default prefs from being set and overriding our prefs.

Differential Revision: https://phabricator.services.mozilla.com/D127831
2021-10-12 17:50:33 +00:00
Alexandru Michis ba57f54149 Backed out changeset 837ba61b9975 (bug 1730924) for causing xpcshell failures in services/sync.
CLOSED TREE
2021-10-12 20:13:05 +03:00
Andrei Oprea db4ace8177 Bug 1730924 - Upgrade ajv.js from 4.1.1 to 6.12.6 r=k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D127625
2021-10-12 14:43:02 +00:00
Agi Sferro 2bd64785fc Bug 1571899 - Use google-java-format via spotless to enforce Java formatting. r=ahal,owlish
This change adds a new lint `android-format` which enforces formatting of Java
code using google-java-format.

To run the lint simply run:

./mach lint -l android-format

This command also support automatically fixing all errors running by adding
--fix:

./mach lint -l android-format --fix

This change also removes all the formatting-related checkstyle checks which are
now implicitly enforced by the formatter.

Differential Revision: https://phabricator.services.mozilla.com/D127734
2021-10-11 18:11:55 +00:00
Mark Banner f7ee253451 Bug 1734823 - Enable ESLint rule no-unused-vars globally for xpcshell test*.js files. r=necko-reviewers,Gijs,valentin
This enables it as a warning for all files, and as an error for some files.

Differential Revision: https://phabricator.services.mozilla.com/D127944
2021-10-11 11:07:02 +00:00
Nazım Can Altınova 79e498d6d6 Bug 1733335 - Make std::vector an opaque type in the profiler Rust API r=emilio
This was causing asan and dt failures because bindgen was computing the size of
MarkerSchema as 122 bytes instead of 144 bytes. This was causing a heap buffer
overflow. After making the std::vector an opaque type, it computes the size
properly as 144 bytes.

Depends on D127114

Differential Revision: https://phabricator.services.mozilla.com/D127956
2021-10-11 07:59:11 +00:00
Nazım Can Altınova 146befbbdb Bug 1733335 - Add tracing marker type for the Rust side r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D127112
2021-10-11 07:59:09 +00:00
Nazım Can Altınova 142d00a761 Bug 1733335 - Add {add,subtract}_microseconds and Clone implementations to ProfilerTime r=emilio
Clone will make the ProfilerTime easier to use. And {add,subtract}_microseconds
implementations are helpful when you need to subtract/add some duration before
adding a marker. There is a similar code in the Webrender marker code, and this
will allow them to use the new API instead of some custom code.

Differential Revision: https://phabricator.services.mozilla.com/D127111
2021-10-11 07:59:09 +00:00
Sylvestre Ledru 2949a57b84 no bug - doc: add more references to the tsan doc r=decoder DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D127638
2021-10-08 08:46:03 +00:00
Daisuke Akatsuka 4ab0a903c6 Bug 1678627: Implement a mechanism to fire bookmark-time-changed event. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D125924
2021-10-07 22:10:20 +00:00
Kagami Sascha Rosylight 84ad995e6d Bug 1728604 - Normalize path before doc path comparison r=mhentges
Differential Revision: https://phabricator.services.mozilla.com/D127656
2021-10-07 12:32:57 +00:00
Sandor Molnar ac87f8501e Backed out 4 changesets (bug 1733335) for causing multiple dt failures. CLOSED TREE
Backed out changeset 8c14ac28d042 (bug 1733335)
Backed out changeset 066819ce0e86 (bug 1733335)
Backed out changeset c44e1bb6d9ff (bug 1733335)
Backed out changeset 4cd1efb42295 (bug 1733335)
2021-10-06 17:49:47 +03:00
Nazım Can Altınova 9651c20007 Bug 1733335 - Add tracing marker type for the Rust side r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D127112
2021-10-06 11:35:15 +00:00
Nazım Can Altınova a92da6752f Bug 1733335 - Add {add,subtract}_microseconds and Clone implementations to ProfilerTime r=emilio
Clone will make the ProfilerTime easier to use. And {add,subtract}_microseconds
implementations are helpful when you need to subtract/add some duration before
adding a marker. There is a similar code in the Webrender marker code, and this
will allow them to use the new API instead of some custom code.

Differential Revision: https://phabricator.services.mozilla.com/D127111
2021-10-06 11:35:15 +00:00
Nazım Can Altınova fd4169aaec Bug 1728539 - Add a documentation about profiler Rust API r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D127430
2021-10-06 07:58:49 +00:00
Andrew Halberstadt 95449daa6d Bug 1732723 - Rename "taskgraph" Python module to "gecko_taskgraph". r=jmaher
For a long time two copies of the 'taskgraph' module have existed in parallel.
We've attempted to keep them in sync, but over time they have diverged and the
maintenance burden has increased.

In order to reduce this burden, we'd like to re-join the two code bases. The
canonical repo will be the one that lives outside of mozilla-central, and this
module will depend on it. Since they both have the same module name (taskgraph)
we need to rename the version in mozilla-central to avoid collisions.

Other consumers of 'taskgraph' (like mobile repos) have standardized on
'<project>_taskgraph' as their module names. So replicating that here as well.

Differential Revision: https://phabricator.services.mozilla.com/D127118
2021-09-30 09:50:08 -04:00
Marian-Vasile Laza 6c22452994 Backed out 4 changesets (bug 1733335) for causing build bustages. CLOSED TREE
Backed out changeset 45a3ae02f837 (bug 1733335)
Backed out changeset 41c62acfb5a6 (bug 1733335)
Backed out changeset cf3b6b6cc6c6 (bug 1733335)
Backed out changeset b919d9cfb8e5 (bug 1733335)
2021-10-05 15:07:44 +03:00
Nazım Can Altınova aae1952697 Bug 1733335 - Add tracing marker type for the Rust side r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D127112
2021-10-05 11:34:27 +00:00
Nazım Can Altınova 91c01ff2f9 Bug 1733335 - Add {add,subtract}_microseconds and Clone implementations to ProfilerTime r=emilio
Clone will make the ProfilerTime easier to use. And {add,subtract}_microseconds
implementations are helpful when you need to subtract/add some duration before
adding a marker. There is a similar code in the Webrender marker code, and this
will allow them to use the new API instead of some custom code.

Differential Revision: https://phabricator.services.mozilla.com/D127111
2021-10-05 11:34:26 +00:00
Daisuke Akatsuka a1a45ffa6a Bug 1678626: Implement a mechanism to fire bookmark-guid-changed event. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D125770
2021-10-05 00:53:46 +00:00
Daisuke Akatsuka e59acf8e6b Bug 1678624: Implement a mechanism to fire bookmark-url-changed event. r=mak
Depends on D103148

Differential Revision: https://phabricator.services.mozilla.com/D103883
2021-10-05 00:53:44 +00:00
Mirko Brodesser c61c10a2ce Bug 1731994: part 8) Rename `nsIContentPermissionRequest`'s `isHandlingUserInput` to `hasValidTransientUserGestureActivation`. r=edgar
It's more accurate.

Differential Revision: https://phabricator.services.mozilla.com/D126916
2021-10-04 12:16:00 +00:00
Daisuke Akatsuka d246521ee5 Bug 1678623: Implement a mechanism to fire bookmark-title-changed event. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D103147
2021-10-01 12:01:29 +00:00
Gregory Mierzwinski f3383774cc Bug 1732742 - Add an installation step for vismet requirements. r=perftest-reviewers,AlexandruIonescu
This patch adds an installation step for vismet requirements in the mach browsertime setup. Without this change, the check would falsely report that the instlalation failed even though it never actually ran. The current code has the pillow/pyssim setup being done after the check, with this change we'll be able to use --install-vismet-reqs to have them installed during the setup.

Differential Revision: https://phabricator.services.mozilla.com/D126703
2021-09-30 15:27:42 +00:00
Mitchell Hentges 76d5d89cb0 Bug 1723031: Update Jinja2 pin to be compatible with `glean-parser` r=ahal
`glean-parser==3.6.0` requires `Jinja2>=2.10.1`.

Differential Revision: https://phabricator.services.mozilla.com/D126283
2021-09-28 14:59:31 +00:00
Gabriele Svelto 6aa933461e Bug 1717909 - Ensure that symbol files for system libraries on Windows contain unwinding information r=calixte
This also reverts 5d32419d6b5b

Differential Revision: https://phabricator.services.mozilla.com/D126767
2021-09-28 09:26:55 +00:00
Mike Hommey 49ee506e32 Bug 1732208 - Silence the unused-but-set-variable warning in platform-linux-android.cpp. r=gerald
platform-linux-android.cpp:199:9: error: variable 'r' set but not used [-Werror,-Wunused-but-set-variable]
    int r = sem_init(&mMessage2, /* pshared */ 0, 0);
        ^
platform-linux-android.cpp:206:9: error: variable 'r' set but not used [-Werror,-Wunused-but-set-variable]
 not used [-Werror,-Wunused-but-set-variable]
    int r = sem_destroy(&mMessage2);
        ^

Differential Revision: https://phabricator.services.mozilla.com/D126459
2021-09-28 00:02:47 +00:00
criss f2dcba95fa Backed out 10 changesets (bug 1712151, bug 1724279, bug 1730712, bug 1717051, bug 1723031, bug 1731145) for causing failures on test_yaml.py
Backed out changeset 7f64d538701b (bug 1723031)
Backed out changeset 394152994966 (bug 1723031)
Backed out changeset 9bfeb01bcc9a (bug 1723031)
Backed out changeset 3d283616a57d (bug 1730712)
Backed out changeset bc677b409650 (bug 1724279)
Backed out changeset 784c94c2f528 (bug 1723031)
Backed out changeset 6e1bde40e3b4 (bug 1723031)
Backed out changeset 7adf7e2136a3 (bug 1712151)
Backed out changeset 2aef162b9a1b (bug 1717051)
Backed out changeset 9beeb6d3d95b (bug 1731145)
2021-09-28 00:32:38 +03:00
Mitchell Hentges 46d5044ce9 Bug 1723031: Update Jinja2 pin to be compatible with `glean-parser` r=ahal
`glean-parser==3.6.0` requires `Jinja2>=2.10.1`.

Differential Revision: https://phabricator.services.mozilla.com/D126283
2021-09-27 20:27:21 +00:00
Alex Lopez 63022efc7a Bug 1696251: Allow mach commands as stand-alone functions and adapt existing commands. r=mhentges,webdriver-reviewers,perftest-reviewers,sparky,whimboo
This removes the `@CommandProvider` decorator and the need to implement
mach commands inside subclasses of `MachCommandBase`, and moves all
existing commands out from classes to module level functions.

Differential Revision: https://phabricator.services.mozilla.com/D121512
2021-09-27 18:12:51 +00:00
Steve Fink c11679da97 Bug 1710408 - Do not record JSContext info if the js feature is disabled r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D126392
2021-09-27 16:40:56 +00:00
Henrik Skupin 61219bc48f Bug 1723084 - Add try preset for the remote protocol. r=webdriver-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D126231
2021-09-23 11:01:21 +00:00
Butkovits Atila eb735ac57e Backed out changeset 53b1fa0faa6d (bug 1696251) for breaking the static-analysis integration. a=backout 2021-09-23 13:06:40 +03:00
Alex Lopez a8e7083c84 Bug 1696251: Allow mach commands as stand-alone functions and adapt existing commands. r=mhentges,webdriver-reviewers,perftest-reviewers,sparky,whimboo
This removes the `@CommandProvider` decorator and the need to implement
mach commands inside subclasses of `MachCommandBase`, and moves all
existing commands out from classes to module level functions.

Differential Revision: https://phabricator.services.mozilla.com/D121512
2021-09-21 20:38:16 +00:00
Alex Lopez 78a61815e0 Bug 1696251 - Rename methods that would shadow builtin functions when de-classing. r=mhentges
Differential Revision: https://phabricator.services.mozilla.com/D126275
2021-09-21 20:38:15 +00:00
Mark Banner 7ad142bf38 Bug 1445813 - Allow globalThis as a second parameter to defineLazyScriptGetter and friends. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D126071
2021-09-21 12:42:37 +00:00
Sandor Molnar b0b9b300de Backed out changeset 539feb1c3bda (bug 1445813) for causing ES lint failure. CLOSED TREE 2021-09-21 15:19:18 +03:00
Mark Banner 1f1d768907 Bug 1445813 - Allow globalThis as a second parameter to defineLazyScriptGetter and friends. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D126071
2021-09-21 11:42:28 +00:00
Nazım Can Altınova a15be90d61 Bug 1654413 - Deserialize and stream the markers and marker schemas r=emilio,gerald
Now we can deserialize and stream everything to the JSON.

Differential Revision: https://phabricator.services.mozilla.com/D124027
2021-09-21 11:08:12 +00:00
Nazım Can Altınova ca180f8629 Bug 1654413 - Add add_marker Rust profiler API and serialize the marker to the buffer r=emilio,gerald
This only adds the API and then adds the profiler payload to the buffer. The
deserialization and streaming will happen in the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D124026
2021-09-21 11:08:11 +00:00
Nazım Can Altınova a5b9cfdadb Bug 1654413 - Add MarkerSchema struct and its enums for marker API r=emilio,gerald
You can see the `mozilla::MarkerSchema` for the C++ counterpart. This Rust
struct simply wraps the C++ object and keeps the reference of it as RAII. This
heap allocates the inner C++ object but it's fine to do it here, because it's
we only create a MarkerSchema object at the end of a profiling session and it
happens once per marker type. It should be very rare.

Differential Revision: https://phabricator.services.mozilla.com/D124025
2021-09-21 11:08:11 +00:00
Nazım Can Altınova c850585eae Bug 1654413 - Add JSONWriter struct for marker schema r=emilio,gerald
JSON writer will be used for the third and last marker API. This is needed
because we need to describe a marker payload struct on how to serialize it.

Differential Revision: https://phabricator.services.mozilla.com/D124024
2021-09-21 11:08:11 +00:00
Nazım Can Altınova 978dbc8ab8 Bug 1654413 - Add add_text_marker Rust API r=emilio,gerald
This is the second API for the markers. This allows one payload as a text for
more information. See the PROFILER_MARKER_TEXT macro for the C++ counterpart.

Differential Revision: https://phabricator.services.mozilla.com/D124023
2021-09-21 11:08:10 +00:00
Nazım Can Altınova 02f9877e83 Bug 1654413 - Add add_untyped_marker Rust API r=emilio,gerald
This is the first and simplest API for the markers. There will be two more
APIs in the following patches (add_text_marker and add_marker). You can see the
PROFILER_MARKER_UNTYPED macro for the C++ counterpart.

Differential Revision: https://phabricator.services.mozilla.com/D124022
2021-09-21 11:08:10 +00:00
Nazım Can Altınova 7f96087d60 Bug 1654413 - Add a MarkerStack Rust enum for the marker API r=emilio,gerald
MarkerStack object is a bit more complex in the C++ side. But we don't need a
complex object like that in here. A simple enum is enough to determine what
type of marker stack we are capturing. C++ side will be handling the capturing
of the stack.

Differential Revision: https://phabricator.services.mozilla.com/D124021
2021-09-21 11:08:09 +00:00
Nazım Can Altınova 7ec023dfe3 Bug 1654413 - Add a MarkerTiming and MarkerOptions Rust structs for the marker API r=emilio,gerald
These structs are needed for the marker APIs. We also have the same structs as
the C++ classes. See `mozilla::MarkerTiming` and `mozilla::MarkerOptions`.

Differential Revision: https://phabricator.services.mozilla.com/D124020
2021-09-21 11:08:09 +00:00
Nazım Can Altınova 2957052aa8 Bug 1654413 - Add a small gecko_profiler_category macro as a sugar for marker categories r=emilio
This is a syntactical sugar to write the categories more easily. I prefer to
have this macro because this is the same syntax as the categories in the label
frames API.

Differential Revision: https://phabricator.services.mozilla.com/D124019
2021-09-21 11:08:08 +00:00
Nazım Can Altınova 53a1965f9e Bug 1654413 - Add ProfilerTime Rust struct for marker API r=emilio,gerald
This will be used to get the time from profiler, so marker API can use it to
understand the start or end time.

Differential Revision: https://phabricator.services.mozilla.com/D124018
2021-09-21 11:08:08 +00:00
Nazım Can Altınova de9c311511 Bug 1654413 - Rerun the profiler API build.rs when the included header files are changed r=emilio
For some reason, I thought that `parse_callbacks(Box::new(CargoCallbacks))`
would also automatically adds the initial header files that are manually added.
But apparently `parse_callbacks` is only executed when the inner included
header files are found.

Differential Revision: https://phabricator.services.mozilla.com/D124017
2021-09-21 11:08:08 +00:00
Butkovits Atila c06a3dd9fa Backed out changeset 510dd46a9de7 (bug 1696251) for causing Android build bustages. 2021-09-21 05:16:50 +03:00
Gerald Squelart 824d0d8d1a Bug 1729434 - Prevent more reentrant deadlocks in nativeallocations - r=canaltinova
Some profiler operations have moved from using the main profiler mutex, to their own finer-grained mutexes. So we need to expose whether these are also locked on the current thread, in particular so that nativeallocations will not be intercepted during that time, which could re-enter the profiler code, potentially causing deadlocks.

Differential Revision: https://phabricator.services.mozilla.com/D126069
2021-09-20 23:32:10 +00:00
Gerald Squelart 423863eb2c Bug 1729434 - Rework ThreadIntercept to block while calling profiler_is_locked_on_current_thread - r=canaltinova
In the following patch, profiler_is_locked_on_current_thread could allocate memory on some platforms (e.g.: While accessing the TLS on Linux, because the very first access on a thread allocates some memory for it.)
So we need to prevent the interception of memory allocations before calling profiler_is_locked_on_current_thread.
This is done by making the ThreadIntercept class RAII, so that as soon as it's created it already blocks nested interceptions, before calling profiler_is_locked_on_current_thread if necessary to potentially block even more interceptions.

This has the advantage of making ThreadIntercept safer overall, there is now only one way to use it: Create on the stack, and check `IsBlocked()`.
Other functions like `Block()` and `Unblock()` previously made it possible to do incorrect things.
We don't need the extra space of `Maybe` from the old `MaybeGet()` function anymore.
And ThreadIntercept itself is smaller than AutoBlockIntercepts and its reference to the old ThreadIntercept inside the Maybe.

Differential Revision: https://phabricator.services.mozilla.com/D126068
2021-09-20 23:32:10 +00:00
Alex Lopez fe61e94ec8 Bug 1696251: Allow mach commands as stand-alone functions and adapt existing commands. r=mhentges,webdriver-reviewers,perftest-reviewers,sparky,whimboo
This removes the `@CommandProvider` decorator and the need to implement
mach commands inside subclasses of `MachCommandBase`, and moves all
existing commands out from classes to module level functions.

Differential Revision: https://phabricator.services.mozilla.com/D121512
2021-09-20 20:21:07 +00:00
Alex Lopez f9280b82f8 Bug 1696251: Rename setup to avoid name conflict when declassing mach commands. r=mhentges,perftest-reviewers,AlexandruIonescu
Differential Revision: https://phabricator.services.mozilla.com/D126035
2021-09-20 18:06:48 +00:00
Andi-Bogdan Postelnicu e2cab5c39c Bug 1731542 - remove `infer` from our static-analysis pipeline. r=static-analysis-reviewers,marco
Differential Revision: https://phabricator.services.mozilla.com/D126070
2021-09-20 12:47:44 +00:00