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

2212 Коммитов

Автор SHA1 Сообщение Дата
Gerald Squelart 484485975e Bug 1679930 - Add ActivePS experimental feature "CPU Utilization" - r=canaltinova
This patch adds "CPU Utilization" ("cpu" for short) as a new feature that will control the upcoming still-experimental CPU measurements.

Differential Revision: https://phabricator.services.mozilla.com/D99054
2021-01-04 07:17:38 +00:00
Gerald Squelart 581ab50327 Bug 1679930 - When the sampler thread function starts, it can store all ActivePS features - r=canaltinova
Instead of only capturing one feature (NoStackSampling), the sampler thread now stores all features so that any feature can be quickly looked at during sampling.

Currently this is still limited to NoStackSampling, a later patch will start using another feature.

Differential Revision: https://phabricator.services.mozilla.com/D99053
2021-01-04 07:16:59 +00:00
Narcis Beleuzu 77844a7997 Backed out 2 changesets (bug 1681445) for causing Bug 1684265
Backed out changeset 3246c882a0da (bug 1681445)
Backed out changeset 38d0eb18ea7a (bug 1681445)
2020-12-28 18:41:59 +02:00
Masatoshi Kimura e70bf4efaa Bug 1684110 - Stop using some 'A'-functions in TestDllInterceptor. r=tkikuchi
Differential Revision: https://phabricator.services.mozilla.com/D100419
2020-12-27 08:40:36 +00:00
Masatoshi Kimura 05b71dcf6e Bug 1684110 - Stop using some 'A'-functions in mozglue/. r=mhowell
Depends on D100465

Differential Revision: https://phabricator.services.mozilla.com/D100466
2020-12-26 00:46:34 +00:00
Masatoshi Kimura f416e99ce3 Bug 1684110 - Stop using some 'A'-functions in mozglue/baseprofiler/. r=gerald
Since modulePath and moduleName are passed to JSONWriter, they must be encoded
in UTF-8. The current code is wrong.

Differential Revision: https://phabricator.services.mozilla.com/D100418
2020-12-24 03:45:28 +00:00
Mike Hommey 4f4d6697ad Bug 1681445 - Add support for macOS in TimeStamp_posix.cpp. r=spohl
Now is already supported when CLOCK_MONOTONIC is supported, but
ComputeProcessUptime is not.  This shares the code with other BSDs, and
makes it look like the implementation in Timestamp_darwin.cpp.

Eventually, we'll remove the one from Timestamp_darwin.cpp.

Differential Revision: https://phabricator.services.mozilla.com/D100069
2020-12-18 15:48:55 +00:00
Emma Malysz 3fa05e5db6 Bug 1671603: display skeleton ui elements in correct position when RTL is enabled r=dthayer
Stores the value of intl.uidirection in the registry

Differential Revision: https://phabricator.services.mozilla.com/D99559
2020-12-22 17:22:07 +00:00
Gerald Squelart 8d7e1cf68d Bug 1678651 - Increase expected max stack record size to 128KB - r=canaltinova
Some sites do have stacks that require more than 64KB to store in the profiler buffer.
Note that this only affects one semi-permanent buffer per process during profiling, and short-lived buffers when capturing stacks in markers.

Differential Revision: https://phabricator.services.mozilla.com/D99981
2020-12-22 10:51:12 +00:00
Gerald Squelart f1f98f5879 Bug 1678651 - Centralize scExpectedMaximumStackSize in ProfileBufferChunkManager - r=canaltinova
The "expected maximum stack size" (currently 64KiB) value was present in multiple places.
Now it's accessible from everywhere as ProfileBufferChunkManager::scExpectedMaximumStackSize, so it's easier to modify as needed.

Differential Revision: https://phabricator.services.mozilla.com/D100222
2020-12-22 10:50:54 +00:00
Gerald Squelart 2c7a8524ac Bug 1678651 - ProfilerChunkedBuffer: Always mark current chunk full when entry doesn't fit - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D99980
2020-12-22 10:50:16 +00:00
Gerald Squelart 72310c2c2a Bug 1678651 - Better ProfileChunkedBuffer::Clear(), recycles released chunks - r=canaltinova
Instead of discarding released chunks, we keep them as "next" chunks, and we make sure there's a valid "current" chunk when possible.

Recycling released chunks means that when using the `ProfileBufferChunkManagerSingle`, the one chunk, in whichever state it may be, will be kept alive and reused.

Differential Revision: https://phabricator.services.mozilla.com/D99979
2020-12-22 10:49:53 +00:00
Gerald Squelart a611efcb7f Bug 1678651 - ProfileChunkedBuffer now keeps track of failed puts - r=canaltinova
When a "Put" operation fails (most probably because no chunk was available to store the data), we remember the number of bytes that couldn't be stored.
This can be useful to give an indication of how much more memory would have been needed for successful puts.

Differential Revision: https://phabricator.services.mozilla.com/D99977
2020-12-22 10:49:12 +00:00
Gerald Squelart 058a0fdb7e Bug 1678651 - Rewrote TestChunkedBufferSingle() to better test buffer-filling scenarios - r=canaltinova
This bug has revealed some issues when the single chunk gets filled, and there are different paths depending on whether the chunk is filled right to the end, or past it.
Later patches will fix these issues and update these tests accordingly.

Differential Revision: https://phabricator.services.mozilla.com/D99976
2020-12-22 10:48:49 +00:00
Gerald Squelart f11383c57a Bug 1678651 - Added ProfileChunkedBuffer state tests - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D99975
2020-12-22 10:48:26 +00:00
Gerald Squelart c0e87f0baa Bug 1678651 - Better debugging assertions in ProfileBufferChunk - r=canaltinova
In DEBUG builds, instead of only testing for the expected chunk state(s), there are now separate assertions for each *un*expected state, which makes it much easier to track the source of failures.

Differential Revision: https://phabricator.services.mozilla.com/D99974
2020-12-22 10:48:08 +00:00
Razvan Maries 6d1746e38b Backed out changeset ef0570dd669b (bug 1664535) for High frequency failures. CLOSED TREE 2020-12-18 22:32:54 +02:00
Alexis Beingessner e2c438e4c8 Bug 1682143 - Add a few more variants of the crossbeam supression. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D100021
2020-12-18 17:00:35 +00:00
Jon Coppeard e6a7c3288b Bug 1664535 - Remove TSAN suppression now write barriers are not triggered on background threads r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D100139
2020-12-18 16:59:51 +00:00
Doug Thayer 42a30153d4 Bug 1678488 - Only show skeleton UI if autoselecting profile r=mossop
So this is an ugly solution, but it was the best I could come up with. We do
not want to show the skeleton UI if we're going to show the profile manager,
and we *will* show the profile manager if StartWithLastProfile=0 is under
[General] in profiles.ini. Accordingly the only ways to do the correct thing
here are to try to mirror edits that firefox makes to the profiles.ini file
to the registry, or to simply read the profiles.ini file ourselves. There are
many ways that profiles.ini could get out of sync with the registry if we
tried to mirror its state there, so going straight to the source of truth
seemed the best option.

There is one case which is still not covered here: if there is no profile for
our install marked as Default=1, then we will show the profile manager. This
should only be possible if the user manually edits their profiles.ini file,
however, and then it should resolve itself after one run, so I don't consider
it a significant enough problem to jump through all the hoops we would need
to jump through to solve it.

Depends on D98525

Differential Revision: https://phabricator.services.mozilla.com/D98936
2020-12-17 16:44:01 +00:00
smolnar 8fca43061d Backed out changeset 5d120a154a6b (bug 1674776) as requested. CLOSED TREE DONTBUILD 2020-12-17 03:22:33 +02:00
Hiroyuki Ikezoe f78a1ad627 Bug 1674776 - Update DocumentTimeline::mLastRefreshDriverTime outside parallel styling. r=boris,decoder
Note that we can probably use mLastRefreshDriverTime directly in
DocumentTimeline::GetCurrentTimeStamp(), i.e. we don't need to use the refresh
driver there, but I'd preserve the current behavior.

Differential Revision: https://phabricator.services.mozilla.com/D97823
2020-12-17 00:51:18 +00:00
Andreea Pavel 9159ca1ff4 Backed out changeset 847bca011f0f (bug 1674776) for causing bug 1682472 on a CLOSED TREE 2020-12-16 12:59:13 +02:00
Steve Fink a1215827bb Bug 1673756 - Add GCCC subcategories for several phases of CC r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D99737
2020-12-15 16:48:23 +00:00
Hiroyuki Ikezoe bc1eb2e0f6 Bug 1674776 - Update DocumentTimeline::mLastRefreshDriverTime outside parallel styling. r=boris,decoder
Note that we can probably use mLastRefreshDriverTime directly in
DocumentTimeline::GetCurrentTimeStamp(), i.e. we don't need to use the refresh
driver there, but I'd preserve the current behavior.

Differential Revision: https://phabricator.services.mozilla.com/D97823
2020-12-14 23:55:06 +00:00
Alexis Beingessner d652e4c378 Bug 1614697 - Remove supression for fixed issue. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D99307
2020-12-14 17:26:32 +00:00
Ted Campbell c90491dbe9 Bug 1601632 - Cleanup ScriptPreloader Runnable behaviour. r=kmag,Gankro,decoder
Add `mWaitingForDecode` to indicate that main-thread is blocked on the
Monitor and should be woken. This avoids generating some of the unused
Runnables. Also ensure `mFinishDecodeRunnablePending` is only accessed while
holding the lock.

Depends on D99403

Differential Revision: https://phabricator.services.mozilla.com/D99404
2020-12-14 15:23:56 +00:00
Ted Campbell d8e3670c2f Bug 1601632 - Make ScriptPreloader::mToken updates Atomic. r=kmag,Gankro,decoder
The `mToken` is used across threads without full locking so it must be marked
as atomic. At the same time, we can use `exchange` operations to read or
write outside of the mMonitor lock.

Depends on D99402

Differential Revision: https://phabricator.services.mozilla.com/D99403
2020-12-14 15:23:48 +00:00
Ted Campbell 70f361ffe6 Bug 1608462 - Simplify locking for ScriptPreloader::MaybeFinishOffThreadDecode. r=kmag,Gankro,decoder
Be consistent about always calling `MaybeFinishOffThreadDecode` without
holding the lock to simplify code. This lets us remove a TSAN deadlock
exception.

Differential Revision: https://phabricator.services.mozilla.com/D99402
2020-12-14 15:23:34 +00:00
Andrew McCreight 215e494a20 Bug 1640445 - Avoid a race between the GC and WriteCache() with an extra field. r=kmag,decoder
See the comment on ScriptHolder for an explanation.

Differential Revision: https://phabricator.services.mozilla.com/D78711
2020-12-11 23:25:27 +00:00
Emma Malysz 3f3b02f520 Bug 1677185, update margins in skeleton UI if menubar is shown r=dthayer
The menubar is permanently shown if autohide is false. If that is the case, we
insert space above the tab and ensure the tab does not have a left margin.
It's height can change, so we store the height in our registry.

Differential Revision: https://phabricator.services.mozilla.com/D97195
2020-12-10 20:29:03 +00:00
Alexis Beingessner 680ebac7e0 Bug 1619162 - Remove supression for fixed issue. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D98949
2020-12-10 07:34:01 +00:00
Doug Thayer 0411080eef Bug 1680258 - Ensure we properly clamp values to draw region r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D99110
2020-12-10 03:38:29 +00:00
Doug Thayer e5fb1240db Bug 1680258 - Don't try to draw rects with 0 width or height r=emalysz
This prevents an assertion from tripping below.

Differential Revision: https://phabricator.services.mozilla.com/D98476
2020-12-10 03:38:07 +00:00
Doug Thayer e2a2d43d90 Bug 1680258 - Check for problematic env vars for skeleton UI r=Gijs
Some env vars have effects similar to command line arguments which present
problems for the skeleton UI, and we want to treat these env vars similarly.

Differential Revision: https://phabricator.services.mozilla.com/D98475
2020-12-10 03:37:59 +00:00
Doug Thayer f0e16e432e Bug 1680258 - Improve skeleton UI arg checking for marionette r=Gijs
Previously, we implemented arg checking with `marionette` just carrying a free
pass, so we could let the arguments which typically come when running tests.
However, some marionette tests do like to play with arguments which we do not
want to get a free pass, such as -safe-mode. These changes allow just the
-profile argument through, as that is necessary for running tests.

Differential Revision: https://phabricator.services.mozilla.com/D98474
2020-12-10 03:37:52 +00:00
Mihai Alexandru Michis 822e8ce413 Backed out 7 changesets (bug 1680258) for causing osx mochitest timeouts.
CLOSED TREE

Backed out changeset 4b885b40c787 (bug 1680258)
Backed out changeset 8eb4ebbd13d0 (bug 1680258)
Backed out changeset 403d7441eb0c (bug 1680258)
Backed out changeset a253801a3155 (bug 1680258)
Backed out changeset 183d89827d4b (bug 1680258)
Backed out changeset 268d2aac128e (bug 1680258)
Backed out changeset e9b9f97caa6c (bug 1680258)
2020-12-09 23:03:09 +02:00
Doug Thayer 0cd0e25f37 Bug 1680258 - Ensure we properly clamp values to draw region r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D99110
2020-12-08 22:35:27 +00:00
Doug Thayer c5df59793d Bug 1680258 - Don't try to draw rects with 0 width or height r=emalysz
This prevents an assertion from tripping below.

Differential Revision: https://phabricator.services.mozilla.com/D98476
2020-12-08 22:35:26 +00:00
Doug Thayer ad7c418754 Bug 1680258 - Check for problematic env vars for skeleton UI r=Gijs
Some env vars have effects similar to command line arguments which present
problems for the skeleton UI, and we want to treat these env vars similarly.

Differential Revision: https://phabricator.services.mozilla.com/D98475
2020-12-08 22:35:25 +00:00
Doug Thayer 227ae0c840 Bug 1680258 - Improve skeleton UI arg checking for marionette r=Gijs
Previously, we implemented arg checking with `marionette` just carrying a free
pass, so we could let the arguments which typically come when running tests.
However, some marionette tests do like to play with arguments which we do not
want to get a free pass, such as -safe-mode. These changes allow just the
-profile argument through, as that is necessary for running tests.

Differential Revision: https://phabricator.services.mozilla.com/D98474
2020-12-08 22:35:25 +00:00
Alessio Placitelli fc6d79e330 Bug 1680474 - Remove Glean's dispatcher TSAN suppression. r=decoder
Even though the Glean dispatcher was shutting down, the SDK was not
properly joining on the thread, triggering a TSAN error. This has been
addressed in a new version of the Glean SDK.

Differential Revision: https://phabricator.services.mozilla.com/D98889
2020-12-07 11:02:42 +00:00
Doug Thayer 1772475d1b Bug 1672789 - Only allow one skeleton UI per instance of an install r=mhowell,cmartin
We don't want to show the skeleton UI if there is already an instance of
Firefox running for that install. Accordingly, we implement something
similar to the profile lock, acquiring exclusive access to
~/AppData/Local/Mozilla/Firefox/SkeletonUILock-<installHash>. If we do not do
this, then when a user clicks firefox.exe while an existing instance is
running, under default conditions we will open the skeleton UI, then
almost immediately terminate and send a message to the existing instance to
open a new window.

Differential Revision: https://phabricator.services.mozilla.com/D98525
2020-12-08 19:23:10 +00:00
Alexis Beingessner 3a6630ec51 Bug 1606803 - revert d4953114117e, still happens rarely. r=decoder
Specifically an instance was being blocked by our nsHostResolver suppression.

Differential Revision: https://phabricator.services.mozilla.com/D99112
2020-12-08 16:56:00 +00:00
Alexis Beingessner 137f4e977f Bug 1670982 - Make the bitflags in CacheStorageService actually atomic. r=decoder,necko-reviewers,dragana,valentin
TSan found races on these flags that are ostensibly benign but this way there's no UB.

This code is a bit weird. These bitfields are seemingly pointless as
they're squeezed between a uint64_t and an Atomic<bool>. There's plenty
of space for 2 more bools there.

Also the Atomic<bool> could theoretically be merged into the flags. For
now, here's the version of this patch that preserves the semantics of
this code as closely as possible, for review by the code owners.

Differential Revision: https://phabricator.services.mozilla.com/D93416
2020-12-08 16:56:23 +00:00
Alexis Beingessner f0c5b52027 Bug 1670982 - Make the bitfields in nsHostResolver atomic. r=decoder,necko-reviewers,dragana,valentin
TSan found races between mResolveAgain and mGetTtl. This makes them non-UB.

The code is a bit weird. Although the values are typed as uint16_t's, they're
used as bools (even assigned true/false). In addition, the atomic bool mTRRUsed
could be folded into these fields, as there is a spare bit. I decided not to
change these things, as network code can have weird representation requirements
that I'd prefer the owners of the code chime in on first.

Differential Revision: https://phabricator.services.mozilla.com/D93417
2020-12-08 16:39:42 +00:00
Bogdan Tara f121ad11ea Backed out 2 changesets (bug 1670982) for tsan xpc shell failures CLOSED TREE
Backed out changeset 3ce1e8c65cbc (bug 1670982)
Backed out changeset e7211a44d968 (bug 1670982)
2020-12-08 01:59:32 +02:00
Alexis Beingessner d9f9c2427e Bug 1670982 - Make the bitflags in CacheStorageService actually atomic. r=decoder,necko-reviewers,dragana,valentin
TSan found races on these flags that are ostensibly benign but this way there's no UB.

This code is a bit weird. These bitfields are seemingly pointless as
they're squeezed between a uint64_t and an Atomic<bool>. There's plenty
of space for 2 more bools there.

Also the Atomic<bool> could theoretically be merged into the flags. For
now, here's the version of this patch that preserves the semantics of
this code as closely as possible, for review by the code owners.

Differential Revision: https://phabricator.services.mozilla.com/D93416
2020-12-07 18:32:51 +00:00
Alexis Beingessner 68b4c43ed6 Bug 1670982 - Make the bitfields in nsHostResolver atomic. r=decoder,necko-reviewers,dragana,valentin
TSan found races between mResolveAgain and mGetTtl. This makes them non-UB.

The code is a bit weird. Although the values are typed as uint16_t's, they're
used as bools (even assigned true/false). In addition, the atomic bool mTRRUsed
could be folded into these fields, as there is a spare bit. I decided not to
change these things, as network code can have weird representation requirements
that I'd prefer the owners of the code chime in on first.

Differential Revision: https://phabricator.services.mozilla.com/D93417
2020-12-07 18:32:33 +00:00
David Major c0208a72b1 Bug 1681123 - Bump mingw-w64 revision to fix _aligned_malloc in clang 12 r=tjr
clang 12 (specifically https://reviews.llvm.org/D91379) made some refactorings to libc++ that exposed a problem in the MinGW headers. That has now been fixed upstream.

In the meantime the headers also gained definitions for ProcessPayloadRestrictionPolicy, so we can remove our workaround for that.

Differential Revision: https://phabricator.services.mozilla.com/D98945
2020-12-07 17:55:27 +00:00
Simon Giesecke 1c53236b70 Bug 1679272 - Include ScopeExit.h exactly where used. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D98888
2020-12-07 14:25:59 +00:00
Kevin Jacobs 1269e1524e Bug 1680655 - Extend TSAN false-positive suppression to EncryptedClientHelloServer. r=decoder
No idea why this didn't show up in earlier try runs, but this is a known false-positive that we need to suppress in the newly-added EncryptedClientHelloServer.

Differential Revision: https://phabricator.services.mozilla.com/D98771
2020-12-04 15:42:25 +00:00
Simon Giesecke 91331998d6 Bug 1679763 - Explicitly instantiate often-used profiler templates. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D98187
2020-12-04 14:21:57 +00:00
Razvan Maries c3c2eaa18e Backed out changeset 975163dad54f (bug 1680402) for causing leaks. CLOSED TREE 2020-12-04 07:06:30 +02:00
Jeff Muizelaar 62e7969d1a Bug 1680402. Use stderr in printf_stderr instead of reopening fd 2. r=glandium
Currently, printf_stderr doesn't show up when running with ./mach run.
This is because we run with -attach-console and that redirects stderr
to a different file descriptor using freopen in UseParentConsole.

The change from just using stderr directly happened in bug 340443 and was done
to avoid some linking issues. That problem doesn't seem to apply anymore so we
should be able to go back to the straightforward implemention that works even
if stderr has been redirected. The mozglue implementation was cargo culted from
xpcom, and there wasn't a reason other than that for the fdopen(dup()) there.

Differential Revision: https://phabricator.services.mozilla.com/D98550
2020-12-04 02:46:57 +00:00
Alexis Beingessner 7dc4ce8177 Bug 1606864 - Add more supressions for new variants. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D98643
2020-12-03 20:57:09 +00:00
Alessio Placitelli b0c6d152de Bug 1662868 - Add a TSAN suppression for the Glean dispatcher. r=decoder
We will investigate the root cause of the TSAN problem in bug
1680474, but we need to land this massive stack first.

Differential Revision: https://phabricator.services.mozilla.com/D98579
2020-12-03 12:01:41 +00:00
Bogdan Tara 24ca702e18 Backed out changeset fdd4de984fd3 (bug 1679763) for profiler related bustage CLOSED TREE 2020-12-02 21:10:06 +02:00
Simon Giesecke e74ea6985a Bug 1679763 - Explicitly instantiate often-used profiler templates. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D98187
2020-12-02 17:00:06 +00:00
Alexis Beingessner 9b93f68a1f Bug 1677049 - disable more flakey tests and add a supression for mochitest-bc. r=malexandru
Differential Revision: https://phabricator.services.mozilla.com/D98485
2020-12-02 16:33:52 +00:00
Geoff Brown 58cf701644 Bug 1607446 - Fix tsan-detected data race in nsJARChannel; r=valentin,decoder
Simply use Atomic to avoid a data race.

Differential Revision: https://phabricator.services.mozilla.com/D98276
2020-12-02 07:36:56 +00:00
Gerald Squelart 2893c11987 Bug 1676079 - For consistency and clarity, add Marker suffix to all marker types - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D98123
2020-11-30 22:52:44 +00:00
Gerald Squelart b9191bb2ce Bug 1646613 - Rename profiler overhead variables to include their true unit - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D97993
2020-11-30 10:44:13 +00:00
Simon Giesecke 8fc9b0ee7c Bug 1677284 - Fix Windows AARch64 bustage. a=bustage-fix
CLOSED TREE

Differential Revision: https://phabricator.services.mozilla.com/D97884
2020-11-23 16:54:12 +00:00
Florian Quèze 0d164d3a9f Bug 1674476 - ChromeUtils.addProfilerMarker should support capturing a stack or setting the category, r=gerald,gregtatum.
Differential Revision: https://phabricator.services.mozilla.com/D95406
2020-11-20 15:41:16 +00:00
Gerald Squelart a56d00ddb7 Bug 1678159 - Move WritePropertyTime to SpliceableJSONWriter::TimeProperty - r=gregtatum
TimeStamps in markers must now be streamed through `SpliceableJSONWriter::TimeProperty(name, timestamp)`.
This is consistent with all other JSON-writing functions being in `SpliceableJSONWriter` (and base class `JSONWriter`).

Depends on D97556

Differential Revision: https://phabricator.services.mozilla.com/D97557
2020-11-20 02:23:08 +00:00
Gerald Squelart 7c60972925 Bug 1678181 - Output chartLabel and tableLabel in marker schema - r=gregtatum
Depends on D97555

Differential Revision: https://phabricator.services.mozilla.com/D97556
2020-11-20 02:19:57 +00:00
Alexis Beingessner 40d9acf18f Bug 1677682 - use a wildcard for generics to avoid accidental regex syntax. r=decoder
Didn't want to mess around with double-escaping slashes

Differential Revision: https://phabricator.services.mozilla.com/D97645
2020-11-19 19:12:32 +00:00
Csoregi Natalia baf3102105 Backed out changeset 88f6cae1d63f (bug 1674770) for causing build bustages. CLOSED TREE 2020-11-19 19:06:26 +02:00
Alexis Beingessner fa2a407bd0 Bug 1674770 - Update parking_lot to get RwLock fix. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D97608
2020-11-19 16:47:35 +00:00
Gerald Squelart d225beb0eb Bug 1671403 - Also prevent re-entrant operations when the ProfilerChild mutex is locked on the current thread - r=canaltinova
Expand `profiler_is_locked_on_current_thread()` to also return true if the ProfilerChild mutex is locked on the current thread.
This will prevent some profiler-re-entrant operations (like native allocation markers) from running.

In particular, this removes the potential deadlock found in bug 1671403:
- SamplerThread: In the sampling loop, lock the main profiler mutex, run a ProfilerChild update, which attempts to lock the ProfilerChild mutex.
- ProfilerChild thread: While processing an IPC message with an update, lock the ProfilerChild mutex, then resolve the update, which records a native allocation with a backtrace that attempts to lock the main profiler mutex.
With this patch, the native allocation won't record a marker while the ProfilerChild mutex is locked.

Differential Revision: https://phabricator.services.mozilla.com/D96969
2020-11-19 11:47:46 +00:00
Gerald Squelart b3314a1582 Bug 1675409 - Removed now-unused ProfilerMarkerPayload and all dependencies - r=gregtatum,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96054
2020-11-18 21:56:57 +00:00
Gerald Squelart a10f7166db Bug 1675409 - Migrated TracingMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96053
2020-11-18 21:55:51 +00:00
Gerald Squelart 8ed348d0c7 Bug 1675409 - Migrated UserTimingMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96051
2020-11-18 21:53:09 +00:00
Gerald Squelart 72195228c9 Bug 1675409 - Fix ProfilerString16View::WrapNullTerminatedString and Span converter - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96047
2020-11-18 21:51:06 +00:00
Gerald Squelart c3d6e979a5 Bug 1675409 - Migrated MediaSampleMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96043
2020-11-18 21:49:52 +00:00
Gerald Squelart fea07678c1 Bug 1675409 - Migrated ContentBuildPayload and ContentFullPaintPayload to Markers 2.0 API - r=gregtatum
In this case, the same marker type "CONTENT_FULL_PAINT_TIME" is used in separate places, so it makes sense to put the marker type definition in a common location.

Differential Revision: https://phabricator.services.mozilla.com/D96042
2020-11-18 21:49:50 +00:00
Gerald Squelart 4d9cfb4113 Bug 1675409 - Migrated LogMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96039
2020-11-18 21:47:24 +00:00
Gerald Squelart 46fed8e10f Bug 1675409 - Migrated LongTaskMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96038
2020-11-18 21:46:56 +00:00
Gerald Squelart 237baa429c Bug 1675409 - Migrated HangMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96036
2020-11-18 21:45:54 +00:00
Gerald Squelart a8f0aede3a Bug 1675409 - Make ProfileBufferRawPointer usable in StreamJSONMarkerData functions - r=gregtatum
To be able to deserialize raw pointers (when streaming markers), `ProfileBufferRawPointer` must be used (to prevent uncontrolled raw pointers), but with the new API implementation the deserializer must accept references to `ProfilerBufferRawPointer` instead of just a raw pointer.

Differential Revision: https://phabricator.services.mozilla.com/D96032
2020-11-18 21:44:35 +00:00
Razvan Maries b7eeb731df Backed out 23 changesets (bug 1675409) for build bustages on Preferences.cpp. CLOSED TREE
Backed out changeset c1a131a55767 (bug 1675409)
Backed out changeset 47d210802a5d (bug 1675409)
Backed out changeset e8ebb1c58d30 (bug 1675409)
Backed out changeset 69a1e9aeff2a (bug 1675409)
Backed out changeset 68f330b387a8 (bug 1675409)
Backed out changeset e4750d9ef5a1 (bug 1675409)
Backed out changeset bb6bb71e5ab3 (bug 1675409)
Backed out changeset 988d7f4716df (bug 1675409)
Backed out changeset ca41382e891c (bug 1675409)
Backed out changeset 90f3fbbbbeda (bug 1675409)
Backed out changeset 9b109d61a6f6 (bug 1675409)
Backed out changeset 3dd66abfdaa2 (bug 1675409)
Backed out changeset 44181df5f0db (bug 1675409)
Backed out changeset bb2603d947fc (bug 1675409)
Backed out changeset 97055cf20a56 (bug 1675409)
Backed out changeset f88fcf09de0d (bug 1675409)
Backed out changeset 7963e1c49786 (bug 1675409)
Backed out changeset 4c379c1061c3 (bug 1675409)
Backed out changeset b8be8ae7da63 (bug 1675409)
Backed out changeset 0b90aa89421e (bug 1675409)
Backed out changeset c10fb46467c9 (bug 1675409)
Backed out changeset 894ac233b290 (bug 1675409)
Backed out changeset 075d1d8e34c2 (bug 1675409)
2020-11-18 20:06:28 +02:00
Sylvestre Ledru bebb9f9181 Bug 1519636 - Reformat with clang-format-11 to the Google coding style r=andi,sg,geckoview-reviewers,snorp
It is bringing some minor changes

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D90795
2020-11-18 09:05:59 +00:00
Kevin Jacobs a27b76b246 Bug 1677849 - Remove TSAN suppressions for certificate functions. r=Gankro
Differential Revision: https://phabricator.services.mozilla.com/D97371
2020-11-17 23:58:10 +00:00
Gerald Squelart ced008cc9f Bug 1675409 - Removed now-unused ProfilerMarkerPayload and all dependencies - r=gregtatum,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96054
2020-11-17 22:26:20 +00:00
Gerald Squelart 9506ea6302 Bug 1675409 - Migrated TracingMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96053
2020-11-17 22:25:06 +00:00
Gerald Squelart 2ab89b23a6 Bug 1675409 - Migrated UserTimingMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96051
2020-11-17 22:22:34 +00:00
Gerald Squelart 3db19002bf Bug 1675409 - Fix ProfilerString16View::WrapNullTerminatedString and Span converter - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96047
2020-11-17 22:20:24 +00:00
Gerald Squelart 6462c5154d Bug 1675409 - Migrated MediaSampleMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96043
2020-11-17 22:19:06 +00:00
Gerald Squelart 586ccbf033 Bug 1675409 - Migrated ContentBuildPayload and ContentFullPaintPayload to Markers 2.0 API - r=gregtatum
In this case, the same marker type "CONTENT_FULL_PAINT_TIME" is used in separate places, so it makes sense to put the marker type definition in a common location.

Differential Revision: https://phabricator.services.mozilla.com/D96042
2020-11-17 22:18:58 +00:00
Gerald Squelart c76eb1b69b Bug 1675409 - Migrated LogMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96039
2020-11-17 22:16:49 +00:00
Gerald Squelart 067cad5579 Bug 1675409 - Migrated LongTaskMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96038
2020-11-17 22:16:16 +00:00
Gerald Squelart 986eaf5787 Bug 1675409 - Migrated HangMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96036
2020-11-17 22:15:10 +00:00
Gerald Squelart 4eddaa6c69 Bug 1675409 - Make ProfileBufferRawPointer usable in StreamJSONMarkerData functions - r=gregtatum
To be able to deserialize raw pointers (when streaming markers), `ProfileBufferRawPointer` must be used (to prevent uncontrolled raw pointers), but with the new API implementation the deserializer must accept references to `ProfilerBufferRawPointer` instead of just a raw pointer.

Differential Revision: https://phabricator.services.mozilla.com/D96032
2020-11-17 22:13:48 +00:00
Mihai Alexandru Michis c0d25b01b2 Backed out 24 changesets (bug 1666566, bug 1675409) for causing hazard failures in profiler/core/platform.cpp
CLOSED TREE

Backed out changeset 4d8af8533fd4 (bug 1666566)
Backed out changeset f031a3a8a20f (bug 1675409)
Backed out changeset 2b7e1a031921 (bug 1675409)
Backed out changeset bda5a24b2d0a (bug 1675409)
Backed out changeset 4282e2284314 (bug 1675409)
Backed out changeset 0637f1b26e9f (bug 1675409)
Backed out changeset 67ae04c8f607 (bug 1675409)
Backed out changeset 6c7b3f3618ef (bug 1675409)
Backed out changeset 2f325c22d169 (bug 1675409)
Backed out changeset 1e48ff70ad8f (bug 1675409)
Backed out changeset 1dfc32d6871d (bug 1675409)
Backed out changeset 4f1f218a777b (bug 1675409)
Backed out changeset e6ac8722b38e (bug 1675409)
Backed out changeset cf132e15fb57 (bug 1675409)
Backed out changeset a126e6b00ba9 (bug 1675409)
Backed out changeset fbc7fbb04f33 (bug 1675409)
Backed out changeset 554c69681474 (bug 1675409)
Backed out changeset 44d0521c701f (bug 1675409)
Backed out changeset 04653dfe4720 (bug 1675409)
Backed out changeset 41ca2c043a00 (bug 1675409)
Backed out changeset 264ae4c805d4 (bug 1675409)
Backed out changeset 5f3bbdac0d52 (bug 1675409)
Backed out changeset 11311c11a6e8 (bug 1675409)
Backed out changeset 0355fbc44baf (bug 1675409)
2020-11-17 19:31:28 +02:00
Gerald Squelart f8c24dd6a4 Bug 1675409 - Removed now-unused ProfilerMarkerPayload and all dependencies - r=gregtatum,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96054
2020-11-17 11:40:46 +00:00
Gerald Squelart e89990aa2c Bug 1675409 - Migrated TracingMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96053
2020-11-17 11:39:42 +00:00
Gerald Squelart c152b9befc Bug 1675409 - Migrated UserTimingMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96051
2020-11-17 11:37:08 +00:00
Gerald Squelart 06ed2337ba Bug 1675409 - Fix ProfilerString16View::WrapNullTerminatedString and Span converter - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96047
2020-11-17 12:05:53 +00:00
Gerald Squelart 4075cd5ed6 Bug 1675409 - Migrated MediaSampleMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96043
2020-11-17 11:33:48 +00:00
Gerald Squelart 8846b82e18 Bug 1675409 - Migrated ContentBuildPayload and ContentFullPaintPayload to Markers 2.0 API - r=gregtatum
In this case, the same marker type "CONTENT_FULL_PAINT_TIME" is used in separate places, so it makes sense to put the marker type definition in a common location.

Differential Revision: https://phabricator.services.mozilla.com/D96042
2020-11-17 11:33:31 +00:00
Gerald Squelart 374448fe41 Bug 1675409 - Migrated LogMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96039
2020-11-17 11:31:37 +00:00
Gerald Squelart ee94544ace Bug 1675409 - Migrated LongTaskMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96038
2020-11-17 11:31:04 +00:00
Gerald Squelart 4a50146cab Bug 1675409 - Migrated HangMarkerPayload to Markers 2.0 API - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D96036
2020-11-17 11:30:03 +00:00
Gerald Squelart 50c0d4ca4f Bug 1675409 - Make ProfileBufferRawPointer usable in StreamJSONMarkerData functions - r=gregtatum
To be able to deserialize raw pointers (when streaming markers), `ProfileBufferRawPointer` must be used (to prevent uncontrolled raw pointers), but with the new API implementation the deserializer must accept references to `ProfilerBufferRawPointer` instead of just a raw pointer.

Differential Revision: https://phabricator.services.mozilla.com/D96032
2020-11-17 11:28:35 +00:00
Alexis Beingessner 9a0f581986 Bug 1671691 - Enable Rust stdlib instrumentation. r=decoder
* Bumps the tsan toolchain to rust-nightly-2020-11-14 that has my patches to make -Zbuild-std work in vendored environments:
  * https://github.com/rust-lang/cargo/pull/8834
  * https://github.com/rust-lang/rust/pull/78790

* Passes -Zbuild-std to cargo when MOZ_TSAN is defined (mk_add_options --enable-thread-sanitizer)

* Removes generic Rust supressions and adds much more specific ones
    * One presumed upstream false positive from tsan not understanding the code
    * One actual upstream bug tsan found (yay!)
    * One new real issue uncovered
    * One issue that probably already existed intermittently but I happened to hit

Differential Revision: https://phabricator.services.mozilla.com/D97165
2020-11-16 18:36:41 +00:00
Christian Holler 1e211d70ab Bug 1623541 - Add temporary suppression. r=Gankro
Differential Revision: https://phabricator.services.mozilla.com/D96982
2020-11-16 14:37:06 +00:00
Doug Thayer 78cca3abfe Bug 1674389 - Implement rounded borders on Skeleton UI rects r=mstange,jrmuizel
I'm hoping that the comments in the code are sufficient documentation of this,
but here is a quick overview. The mockup we got from design has rounded rects
in it, and bordered rounded rects in it, so we need to support drawing those.
Initially we tried using the RoundRect function in GDI. However, 1) GDI doesn't
support anti-aliasing, which is unfortunately noticeable, 2) we were
observing strange issues with only some of the corners being rounded with
RoundRect at higher radii / stroke widths. 3) drawing on top of things drawn
with RoundRect would be complicated and inefficient unless we switched
everything over to GDI calls.

As it stands this drawing code is platform agnostic, assuming we have a way of
blitting a raw bitmap to the screen on a given platform, which is a nice trait
to have and makes me think twice about switching all of the drawing over to
direct GDI calls.

Differential Revision: https://phabricator.services.mozilla.com/D95317
2020-11-13 20:39:10 +00:00
Mihai Alexandru Michis 8bead54135 Backed out changeset 1482b642c46a (bug 1674389) for causing spidermonkey failures in PreXULSkeletonUI.cpp
CLOSED TREE
2020-11-13 22:17:26 +02:00
Doug Thayer c6153cac38 Bug 1674389 - Implement rounded borders on Skeleton UI rects r=mstange,jrmuizel
I'm hoping that the comments in the code are sufficient documentation of this,
but here is a quick overview. The mockup we got from design has rounded rects
in it, and bordered rounded rects in it, so we need to support drawing those.
Initially we tried using the RoundRect function in GDI. However, 1) GDI doesn't
support anti-aliasing, which is unfortunately noticeable, 2) we were
observing strange issues with only some of the corners being rounded with
RoundRect at higher radii / stroke widths. 3) drawing on top of things drawn
with RoundRect would be complicated and inefficient unless we switched
everything over to GDI calls.

As it stands this drawing code is platform agnostic, assuming we have a way of
blitting a raw bitmap to the screen on a given platform, which is a nice trait
to have and makes me think twice about switching all of the drawing over to
direct GDI calls.

Differential Revision: https://phabricator.services.mozilla.com/D95317
2020-11-13 19:36:50 +00:00
Emma Malysz bf453ef8eb Bug 1665461: reflect the correct colors for default themes in the skeleton UI. r=dthayer
This patch supports a skeleton UI for default, light, and dark themes.
It is not enabled for apenglow or any custom themes.

This also takes into account the system theme. If the user has the default
theme selected and is in dark mode, we override the theme and present the
dark theme skeleton UI.

Differential Revision: https://phabricator.services.mozilla.com/D96230
2020-11-12 23:56:44 +00:00
Bogdan Tara e63d1b0d21 Backed out changeset 9c13c984601a (bug 1665461) for browser_preXULSkeletonUIRegistry.js failures CLOSED TREE 2020-11-12 20:49:21 +02:00
Emma Malysz 3e7bd6c9f4 Bug 1665461: reflect the correct colors for default themes in the skeleton UI. r=dthayer
This patch supports a skeleton UI for default, light, and dark themes.
It is not enabled for apenglow or any custom themes.

This also takes into account the system theme. If the user has the default
theme selected and is in dark mode, we override the theme and present the
dark theme skeleton UI.

Differential Revision: https://phabricator.services.mozilla.com/D96230
2020-11-12 16:05:47 +00:00
Toshihito Kikuchi dacc9d3479 Bug 1659438 - Part3: Add an array of the dependent modules paths to SharedSection. r=mhowell
This patch adds a list of the executable's dependent module's path to SharedSection
as an array of the offset to a string and a string buffer.  A following patch will
use this data from the browser process and the sandboxed processes.

Depends on D96283

Differential Revision: https://phabricator.services.mozilla.com/D96284
2020-11-10 20:52:00 +00:00
Toshihito Kikuchi 187d19452d Bug 1659438 - Part2: Transfer Kernel32ExportsSolver as a shared memory. r=mhowell
We transfer several ntdll's function addresses to a child process directly via
`WriteProcessMemory`.  This patch changes the way to transfer data to using
a section object as Chromium sandbox does, so that we can transfer more data
with the same cost as transferring a single handle value.

Depends on D96282

Differential Revision: https://phabricator.services.mozilla.com/D96283
2020-11-10 20:51:00 +00:00
Emma Malysz 21991a311d Bug 1670957, add placeholder rectangles for toolbarbuttons and display in skeleton UI r=dthayer,smaug,Gijs
If a searchbar is present, draw that similar to a urlbar.
This also changes how we store the urlbar, as we know will use our custom struct
to cleanly store the width and height.

Differential Revision: https://phabricator.services.mozilla.com/D95029
2020-11-10 16:48:10 +00:00
Toshihito Kikuchi 925e53c4f3 Bug 1672367 - Block Digital Guardian's module older than 7.6. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D96434
2020-11-10 13:21:18 +00:00
Doug Thayer 67c1c99d93 Bug 1666653 - Set sPreXULSkeletonUIEnabled correctly r=agashlin
Differential Revision: https://phabricator.services.mozilla.com/D95576
2020-11-06 20:58:46 +00:00
Doug Thayer 7d126d9916 Bug 1666653 - Only draw the skeleton UI when cmdline args are approved r=agashlin
Differential Revision: https://phabricator.services.mozilla.com/D95575
2020-11-06 20:58:43 +00:00
Doug Thayer 26315aa98c Bug 1674221 - Prefix Skeleton UI reg names with exe path r=agashlin
Differential Revision: https://phabricator.services.mozilla.com/D95541
2020-11-06 19:35:20 +00:00
Gerald Squelart e7313b8f47 Bug 1674737 - Use SpliceableJSONWriter::UniqueStringElement in DeserializeAfterKindAndStream - r=gregtatum
Unique strings are used to encode all markers' 'name' field, SpliceableJSONWriter::UniqueStringElement can be used for that (instead of a caller-provided callback, which was necessary before UniqueJSONStrings was de-duplicated).

Differential Revision: https://phabricator.services.mozilla.com/D95513
2020-11-06 11:29:11 +00:00
Gerald Squelart 7e48b598df Bug 1674737 - Make SpliceableJSONWriter optionally point at a UniqueJSONStrings, with pass-through functions - r=gregtatum
Some markers (e.g., Screenshot) use unique strings in their data.

The UniqueJSONStrings used during streaming is attached to the SpliceableJSONWriter, and StreamJSONMarkerData can use pass-through functions UniqueStringProperty() and UniqueStringElement().

Differential Revision: https://phabricator.services.mozilla.com/D95512
2020-11-06 11:28:42 +00:00
Gerald Squelart 5f4f178337 Bug 1674737 - Use SpliceableJSONWriter instead of JSONWriter when streaming markers - r=gregtatum
Some markers (e.g., GC major/minor/slice) need to splice JSON strings in their data.
So now, instead of JSONWriter, StreamJSONMarkerData functions will be given a mozilla::baseprofiler::SpliceableJSONWriter.

Differential Revision: https://phabricator.services.mozilla.com/D95511
2020-11-06 11:28:33 +00:00
Gerald Squelart 2fd5e93f78 Bug 1674968 - Fix UniqueJSONStrings copy constructor, to actually copy from the source - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D95833
2020-11-06 01:36:09 +00:00
Gerald Squelart 896ddd992a Bug 1674968 - UniqueJSONStrings unit tests - r=gregtatum
`UniqueJSONStrings` constructors now accept a `JSONWriter::CollectionStyle` to pass to the internal JSON writer.
The default won't change how the unique string list is output (with friendly indented lines), but tests can use `JSONWriter::SingleLineStyle` to make comparison strings more readable and maintainable.

Differential Revision: https://phabricator.services.mozilla.com/D95832
2020-11-06 01:35:36 +00:00
Narcis Beleuzu 0723378bf7 Backed out 2 changesets (bug 1674221) for SM bustages on PreXULSkeletonUI.cpp
Backed out changeset 3d9b951db0f4 (bug 1674221)
Backed out changeset 5092fde1ebe1 (bug 1674221)
2020-11-05 22:54:10 +02:00
Doug Thayer 21230c3f49 Bug 1674221 - Prefix Skeleton UI reg names with exe path r=agashlin
Differential Revision: https://phabricator.services.mozilla.com/D95541
2020-11-05 20:18:16 +00:00
Alexis Beingessner e75e8e5b98 Bug 1608068 - Remove supression for seemingly fixed issue. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D95128
2020-11-03 01:02:11 +00:00
Florian Quèze 49855a4e40 Bug 1674234 - Add a profiler marker for creating the skeleton UI, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D95219
2020-11-02 19:45:22 +00:00
Bogdan Tara 6b2d214e53 Backed out 2 changesets (bug 1601632, bug 1608068) for ScriptPreloader related tsan failures CLOSED TREE
Backed out changeset 2f14d44bacf2 (bug 1601632)
Backed out changeset ebd82e2edbdc (bug 1608068)
2020-11-03 02:58:08 +02:00
Alexis Beingessner 2507488d07 Bug 1506812 - Wrap all accesses to URLPreloader's mReaderThread in a mutex. r=decoder,nika
The shutdown code of BackgroundReadFiles races with BeginBackgroundRead.
This is paritally obfuscated by the usage of the initialEvent convenience
of NS_NewNamedThread, so this change also removes that in favour of explicit
dispatch. (xpcom devs want to remove the convenience anyway)

Differential Revision: https://phabricator.services.mozilla.com/D94877
2020-11-02 23:26:05 +00:00
Alexis Beingessner 19c8d885b8 Bug 1601632 - Remove supression for seemingly fixed issue. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D95129
2020-11-02 23:22:22 +00:00
Alexis Beingessner b2c9198c9c Bug 1608068 - Remove supression for seemingly fixed issue. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D95128
2020-11-02 23:22:13 +00:00
Gerald Squelart 4fedf5eb76 Bug 1674045 - Remove unused ProfilerStringView::String() - r=gregtatum
The previous patch removed the only two uses of ProfilerStringView::String().
Since it can be potentially expensive (creating a `std::string` object, sometimes allocating a buffer, and copying the string contents), it's best to remove it completely.

Differential Revision: https://phabricator.services.mozilla.com/D95116
2020-11-02 13:56:14 +00:00
Gerald Squelart 9acb23c062 Bug 1674045 - UniqueJSONStrings takes string spans instead of pointers - r=gregtatum
For consistency with `JSONWriter` (which UniqueJSONStrings' functions use), and for added safety and some efficiency, UniqueJSONStrings now takes `Span<const char`> arguments instead of raw pointers to null-terminated strings.

Differential Revision: https://phabricator.services.mozilla.com/D95114
2020-11-02 13:55:16 +00:00
Gerald Squelart c68a3c6b21 Bug 1674045 - Add documentation to UniqueJSONStrings, and clean up - r=gregtatum
Document the class and methods.
`GetOrAddIndex` is only used internally, so it can be private.
`SpliceStringTableElements` can now only work on rvalue UniqueJSONStrings, this emphasizes that it shouldn't be used anymore after this call.

Differential Revision: https://phabricator.services.mozilla.com/D95113
2020-11-02 13:54:43 +00:00
Gerald Squelart 7e610c2025 Bug 1674045 - Deduplicate UniqueJSONStrings - r=gregtatum
The two identical copies are `UniqueJSONStrings` are combined and moved almost verbatim to BaseProfilerJSONWriter.h.

Differential Revision: https://phabricator.services.mozilla.com/D95112
2020-11-02 13:54:20 +00:00
Doug Thayer 9fbd3ff6c4 Bug 1674540 - Remove unused prthread.h include r=agashlin
This snuck in after I forgot to delete this upon realizing I couldn't
use nspr stuff in mozglue.

Differential Revision: https://phabricator.services.mozilla.com/D95530
2020-11-02 16:03:04 +00:00
Alexis Beingessner bd3c1f855c Bug 1601286 - Remove supression for seemingly fixed issue. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D95130
2020-11-02 15:05:56 +00:00
Alexis Beingessner 0d1f97e1a4 Bug 1615265 - Backed out changeset 6e297cea9592 and applied proper change. r=decoder
I accidentally got these two mixed up!!

Differential Revision: https://phabricator.services.mozilla.com/D95132
2020-11-02 15:07:02 +00:00
Narcis Beleuzu 115a0628bb Backed out 2 changesets (bug 1674234) for SM bustages on PreXULSkeletonUI.cpp . CLOSED TREE
Backed out changeset 093306c14ca2 (bug 1674234)
Backed out changeset 2684003a37f9 (bug 1674234)
2020-10-31 01:01:33 +02:00
Alexis Beingessner 05c2cbb42e Bug 1607138 - Backed out changeset fb3f09394f1d. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D95410
2020-10-30 21:10:08 +00:00
Florian Quèze 313e538484 Bug 1674234 - Add a profiler marker for creating the skeleton UI, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D95219
2020-10-30 20:58:14 +00:00
Gabriele Svelto 863c8dfec7 Bug 1665411 - Use first-fit mutexes on macOS r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D93319
2020-10-30 13:10:29 +00:00
Doug Thayer 30478629cf Bug 1666874 - Support maximized windows for skeleton UI r=agashlin
Most of this patch is a dance to avoid size flickering of the skeleton UI
window. We change all Resize/Move/SetSizeMode calls from before the first
nsWindow::Show call. Normally those have no effect, since the window isn't
shown yet, and if the window is not maximized, they typically match the
sizes we've gotten out of the registry anyway. However, if we are maximized,
then they produce a lot of visual noise. We can however achieve the desired
effect by just calling SetWindowPlacement.

Similarly, we switch the window styles of the skeleton UI window to match those
of the toplevel Windows window, and adjust the client rect from our window proc
in a way that matches the adjustments in nsWindow in the WM_NCCALCSIZE handler.
We do this because otherwise we get a flicker as soon as we change the styles
and nonclient margins as the fake chrome pops up and then back down.

Lastly we also change the extended window styles so that they match. We
historically added WS_EX_TOOLWINDOW here to hide the toolbar entry, because it
would otherwise switch out to a new toolbar entry when we changed the window
styles. However since our new styles match, we no longer need to do this. It
was also causing the maximized window to paint over the Windows taskbar.

Differential Revision: https://phabricator.services.mozilla.com/D93534
2020-10-29 19:04:02 +00:00
Doug Thayer 620dfb6899 Bug 1665455 - Animate the Skeleton UI r=agashlin
For a better user experience during slow startups (and to match the design
by Markus Jaritz), we want to animate the placeholder elements (the grey
rectangles which hold the place of text and icons) with a light moving
gradient.

A question may arise regarding whether the performance cost of running this
animation is worth the improved user experience. My claim is yes, hinging
mostly on the observation that the performance cost is small.

On my machine, one frame of the animation takes at most 0.15ms, and runs
every 16.15ms. This means we eat less than 1% CPU time on one core of the
system. It should also be noted that this animation runs primarily during
the window wherein we are prefetching dlls, AKA while we are blocked on IO
and the CPU is more likely to be idle.

On slower systems, one frame may take longer - however, on slower systems
we should also be blocked *more* by IO, making the trade favorable.

For further anecdotal evidence of this being okay, when I run this on slow
reference hardware shortly after OS startup, I do not see any dropped frames,
indicating that this has very little trouble completing, and is thus quite
cheap.

Regarding testing, I will invoke the same logic as for the rest of the
skeleton UI patches - it would involve quite a bit of work to test this in
automation given our existing frameworks. It may be worth it at some point,
but certainly not while this is a feature that we are just experimenting
with and which is not enabled by default.

Differential Revision: https://phabricator.services.mozilla.com/D91453
2020-10-29 19:03:59 +00:00
Toshihito Kikuchi f0d4e3e5eb Bug 1672357 - Do not reserve all regions in the 32bit virtual space. r=mhowell
One of the scenarios in TestMMPolicy.exe is to reserve all regions but one free
region, and then FindRegion can find that free region.  However, it intermittently
failed to find a free region on 32bit.  Probably a different thread invoked by
the system reserved it before the main thread does.  A proposed fix is to limit
the address range to reserve.

Differential Revision: https://phabricator.services.mozilla.com/D95188
2020-10-29 18:35:32 +00:00
Butkovits Atila 304bfab038 Backed out 2 changesets (bug 1666874, bug 1665455) for causing bustage on PreXULSkeletonUI.cpp. CLOSED TREE
Backed out changeset 967c4cf56fd2 (bug 1666874)
Backed out changeset e46238e6aabf (bug 1665455)
2020-10-29 16:57:35 +02:00
Doug Thayer 38c0351ae3 Bug 1666874 - Support maximized windows for skeleton UI r=agashlin
Most of this patch is a dance to avoid size flickering of the skeleton UI
window. We change all Resize/Move/SetSizeMode calls from before the first
nsWindow::Show call. Normally those have no effect, since the window isn't
shown yet, and if the window is not maximized, they typically match the
sizes we've gotten out of the registry anyway. However, if we are maximized,
then they produce a lot of visual noise. We can however achieve the desired
effect by just calling SetWindowPlacement.

Similarly, we switch the window styles of the skeleton UI window to match those
of the toplevel Windows window, and adjust the client rect from our window proc
in a way that matches the adjustments in nsWindow in the WM_NCCALCSIZE handler.
We do this because otherwise we get a flicker as soon as we change the styles
and nonclient margins as the fake chrome pops up and then back down.

Lastly we also change the extended window styles so that they match. We
historically added WS_EX_TOOLWINDOW here to hide the toolbar entry, because it
would otherwise switch out to a new toolbar entry when we changed the window
styles. However since our new styles match, we no longer need to do this. It
was also causing the maximized window to paint over the Windows taskbar.

Differential Revision: https://phabricator.services.mozilla.com/D93534
2020-10-29 14:09:54 +00:00
Doug Thayer 220a9763bb Bug 1665455 - Animate the Skeleton UI r=agashlin
For a better user experience during slow startups (and to match the design
by Markus Jaritz), we want to animate the placeholder elements (the grey
rectangles which hold the place of text and icons) with a light moving
gradient.

A question may arise regarding whether the performance cost of running this
animation is worth the improved user experience. My claim is yes, hinging
mostly on the observation that the performance cost is small.

On my machine, one frame of the animation takes at most 0.15ms, and runs
every 16.15ms. This means we eat less than 1% CPU time on one core of the
system. It should also be noted that this animation runs primarily during
the window wherein we are prefetching dlls, AKA while we are blocked on IO
and the CPU is more likely to be idle.

On slower systems, one frame may take longer - however, on slower systems
we should also be blocked *more* by IO, making the trade favorable.

For further anecdotal evidence of this being okay, when I run this on slow
reference hardware shortly after OS startup, I do not see any dropped frames,
indicating that this has very little trouble completing, and is thus quite
cheap.

Regarding testing, I will invoke the same logic as for the rest of the
skeleton UI patches - it would involve quite a bit of work to test this in
automation given our existing frameworks. It may be worth it at some point,
but certainly not while this is a feature that we are just experimenting
with and which is not enabled by default.

Differential Revision: https://phabricator.services.mozilla.com/D91453
2020-10-28 19:22:54 +00:00