Commit Graph

1779 Commits

Author SHA1 Message Date
Doug Thayer
a8ad8e7325 Bug 1652140 - Check for null data from zip before trying to cache it r=froydnj
We're crashing occasionally here due to an assertion in Span.h. We would
also likely have problems down the road if we tried to cache nullptrs in
the startup cache. I think this is all we need to handle this as gracefully
as we are able - at least, this should make it so the recent StartupCache
changes are no longer making failure any less graceful.

Differential Revision: https://phabricator.services.mozilla.com/D83189
2020-07-14 15:36:09 +00:00
Kris Maglione
6a39211860 Bug 1464542: Part 3b - Add existing Services.jsm registrations to the new services cache. r=mccr8,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D81419
2020-07-09 21:42:25 +00:00
Csoregi Natalia
b355fcc4bf Backed out 6 changesets (bug 1464542) for xpcshell failures on test_Services.js. CLOSED TREE
Backed out changeset b50af9005851 (bug 1464542)
Backed out changeset 9d3a0ea2cf65 (bug 1464542)
Backed out changeset 71c3475fcbc2 (bug 1464542)
Backed out changeset 51ff93220a95 (bug 1464542)
Backed out changeset e84de1547c09 (bug 1464542)
Backed out changeset bbecc16d08eb (bug 1464542)
2020-07-09 23:19:26 +03:00
Kris Maglione
d09458dc51 Bug 1464542: Part 3b - Add existing Services.jsm registrations to the new services cache. r=mccr8,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D81419
2020-07-09 17:59:16 +00:00
Gerald Squelart
309270517d Bug 1651280 - Only use GetFileType(HANDLE) from NtCreateFile if that was successful - r=canaltinova
If the original `NtCreateFile()` call failed, the file handle may have been left untouched, and is therefore probably uninitialized or in another unusable state.

Differential Revision: https://phabricator.services.mozilla.com/D82647
2020-07-08 09:16:45 +00:00
Doug Thayer
b274aafa4b Bug 1627075 - Route Omnijar requests through StartupCache r=froydnj
This should be a relatively straightforward patch. Essentially, we implement
a wrapper class (and friends) around nsZipArchive (and friends), which transparently
caches entries from the underlying zip archive in the StartupCache. This will break
without changes to the StartupCache, made in the patch after this, which allow it
to be used off of the main thread, and outside the main process.

Depends on D77635

Differential Revision: https://phabricator.services.mozilla.com/D77634
2020-07-08 02:46:34 +00:00
Doug Thayer
3a305bb054 Bug 1627075 - Allow lazily initializing nsZipArchives r=froydnj
Opening our Omnijars can be expensive, and it should be deferrable until after
startup is completed, provided we have a startup cache. In a previous patch in this
stack, we implemented caching of the zip central directory for omnijars, but we
still have to open the file in order to hand the object off to various omnijar
consumers. In a later patch, we will wrap nsZipArchive access in a class which
will allow us to transparently cache nsZipArchive results. These two get us
most of the way to not needing to read from the underlying omnijar files during
startup, but there are still nontrivial pieces, like nsZipFind for instance,
which we don't want to just duplicate inside of a wrapper class, so we would
like to sort out a way in which we can use an nsZipArchive class, but not
actually back it up with the real underlying file until we really need data
from it which we can't find in a cache.

Depends on D77633

Differential Revision: https://phabricator.services.mozilla.com/D78584
2020-07-08 02:44:13 +00:00
Doug Thayer
00ed10f38d Bug 1627075 - Init StartupCache before Omnijar r=froydnj
We need to be able to init StartupCache before the Omnijar in order to cache
all of the Omnijar contents we access. This patch implements that.

Depends on D77632

Differential Revision: https://phabricator.services.mozilla.com/D77633
2020-07-08 02:43:30 +00:00
Doug Thayer
d9fd460e11 Bug 1627075 - Build Omnijar file list from startup cache r=froydnj
We would like to be able to defer opening the omnijar files until after startup
if the StartupCache has already been populated. Opening the omnijar files takes
a nontrivial time, at least on Windows, and almost everything in the omnijar
should be fairly compressible, and thus makes sense to live in the StartupCache.
See the last patch in this series for a little more discussion on numbers, but
tl;dr: we saw a 12% improvement in time to about:home being finished on reference
hardware with these changes together with the changes from the descendant patches.

Differential Revision: https://phabricator.services.mozilla.com/D77632
2020-07-08 02:43:02 +00:00
Narcis Beleuzu
a182c015f5 Backed out 6 changesets (bug 1627075) for bustages on startupcache/StartupCache.cpp . CLOSED TREE
Backed out changeset 21605186687e (bug 1627075)
Backed out changeset e29b15980da2 (bug 1627075)
Backed out changeset eb5265addd5e (bug 1627075)
Backed out changeset dfd71f4ecb81 (bug 1627075)
Backed out changeset 13ecd68b3c0d (bug 1627075)
Backed out changeset 333d035afe92 (bug 1627075)
2020-07-07 23:30:48 +03:00
Doug Thayer
a2595a8402 Bug 1627075 - Route Omnijar requests through StartupCache r=froydnj
This should be a relatively straightforward patch. Essentially, we implement
a wrapper class (and friends) around nsZipArchive (and friends), which transparently
caches entries from the underlying zip archive in the StartupCache. This will break
without changes to the StartupCache, made in the patch after this, which allow it
to be used off of the main thread, and outside the main process.

Depends on D77635

Differential Revision: https://phabricator.services.mozilla.com/D77634
2020-07-07 17:04:27 +00:00
Doug Thayer
2046625fac Bug 1627075 - Allow lazily initializing nsZipArchives r=froydnj
Opening our Omnijars can be expensive, and it should be deferrable until after
startup is completed, provided we have a startup cache. In a previous patch in this
stack, we implemented caching of the zip central directory for omnijars, but we
still have to open the file in order to hand the object off to various omnijar
consumers. In a later patch, we will wrap nsZipArchive access in a class which
will allow us to transparently cache nsZipArchive results. These two get us
most of the way to not needing to read from the underlying omnijar files during
startup, but there are still nontrivial pieces, like nsZipFind for instance,
which we don't want to just duplicate inside of a wrapper class, so we would
like to sort out a way in which we can use an nsZipArchive class, but not
actually back it up with the real underlying file until we really need data
from it which we can't find in a cache.

Depends on D77633

Differential Revision: https://phabricator.services.mozilla.com/D78584
2020-07-07 17:02:42 +00:00
Doug Thayer
fafe31f134 Bug 1627075 - Init StartupCache before Omnijar r=froydnj
We need to be able to init StartupCache before the Omnijar in order to cache
all of the Omnijar contents we access. This patch implements that.

Depends on D77632

Differential Revision: https://phabricator.services.mozilla.com/D77633
2020-07-07 17:02:33 +00:00
Doug Thayer
7915db05b2 Bug 1627075 - Build Omnijar file list from startup cache r=froydnj
We would like to be able to defer opening the omnijar files until after startup
if the StartupCache has already been populated. Opening the omnijar files takes
a nontrivial time, at least on Windows, and almost everything in the omnijar
should be fairly compressible, and thus makes sense to live in the StartupCache.
See the last patch in this series for a little more discussion on numbers, but
tl;dr: we saw a 12% improvement in time to about:home being finished on reference
hardware with these changes together with the changes from the descendant patches.

Differential Revision: https://phabricator.services.mozilla.com/D77632
2020-07-07 17:02:30 +00:00
Mihai Alexandru Michis
87cb0ad6fa Backed out 6 changesets (bug 1627075) for causing bustages in StartupCache.cpp
CLOSED TREE

Backed out changeset fc144caf5d06 (bug 1627075)
Backed out changeset a345e05df151 (bug 1627075)
Backed out changeset 288a67aed661 (bug 1627075)
Backed out changeset 2cb021a493d8 (bug 1627075)
Backed out changeset 920398d1c3d3 (bug 1627075)
Backed out changeset ebdcd96a9d20 (bug 1627075)
2020-07-07 08:47:14 +03:00
Doug Thayer
e3f3b7b80b Bug 1627075 - Route Omnijar requests through StartupCache r=froydnj
This should be a relatively straightforward patch. Essentially, we implement
a wrapper class (and friends) around nsZipArchive (and friends), which transparently
caches entries from the underlying zip archive in the StartupCache. This will break
without changes to the StartupCache, made in the patch after this, which allow it
to be used off of the main thread, and outside the main process.

Depends on D77635

Differential Revision: https://phabricator.services.mozilla.com/D77634
2020-07-07 04:36:27 +00:00
Doug Thayer
51a40f3027 Bug 1627075 - Allow lazily initializing nsZipArchives r=froydnj
Opening our Omnijars can be expensive, and it should be deferrable until after
startup is completed, provided we have a startup cache. In a previous patch in this
stack, we implemented caching of the zip central directory for omnijars, but we
still have to open the file in order to hand the object off to various omnijar
consumers. In a later patch, we will wrap nsZipArchive access in a class which
will allow us to transparently cache nsZipArchive results. These two get us
most of the way to not needing to read from the underlying omnijar files during
startup, but there are still nontrivial pieces, like nsZipFind for instance,
which we don't want to just duplicate inside of a wrapper class, so we would
like to sort out a way in which we can use an nsZipArchive class, but not
actually back it up with the real underlying file until we really need data
from it which we can't find in a cache.

Depends on D77633

Differential Revision: https://phabricator.services.mozilla.com/D78584
2020-07-07 04:34:19 +00:00
Doug Thayer
7dcd89a08d Bug 1627075 - Init StartupCache before Omnijar r=froydnj
We need to be able to init StartupCache before the Omnijar in order to cache
all of the Omnijar contents we access. This patch implements that.

Depends on D77632

Differential Revision: https://phabricator.services.mozilla.com/D77633
2020-07-07 04:34:07 +00:00
Doug Thayer
5b755bb7f3 Bug 1627075 - Build Omnijar file list from startup cache r=froydnj
We would like to be able to defer opening the omnijar files until after startup
if the StartupCache has already been populated. Opening the omnijar files takes
a nontrivial time, at least on Windows, and almost everything in the omnijar
should be fairly compressible, and thus makes sense to live in the StartupCache.
See the last patch in this series for a little more discussion on numbers, but
tl;dr: we saw a 12% improvement in time to about:home being finished on reference
hardware with these changes together with the changes from the descendant patches.

Differential Revision: https://phabricator.services.mozilla.com/D77632
2020-07-07 04:33:49 +00:00
Gerald Squelart
9de7e9a9b5 Bug 1640325 - Implement IOInterposeObserver::Observation::FileType() on Windows - r=canaltinova
Use `GetFileType(HANDLE)` on Windows.
Unlike `HandleToFilename`, `GetFileType` is fast enough that we don't need to use a `SmallArrayLRUCache` for it.

The pipe I/Os should not be visible anymore in the startup tests.

Differential Revision: https://phabricator.services.mozilla.com/D82303
2020-07-06 23:43:18 +00:00
Gerald Squelart
6447251c76 Bug 1640325 - FileIO markers show the type of file if known - r=canaltinova
Platform-specific observations will be able to specify a file type.
They will appear in distinct rows in the profiler.firefox.com Marker Chart.
The default type is "File", which is shown in markers as "FileIO" like before.

Differential Revision: https://phabricator.services.mozilla.com/D80399
2020-07-06 23:42:55 +00:00
Gerald Squelart
f3b8c9b60a Bug 1529610 - LRU cache of Windows filenames in WinIOAutoObservation - r=canaltinova,florian
Caching filenames in 32-entry LRU array covers >95% of calls, and makes the average `Filename()` call 5 to 10 times cheaper.

browser_start_content_mainthreadio.js needed to be updated to handle operations that now have a filename thanks to the cache.

Since `ClearPoisonIOInterposer()` is never called (see bug 1647107), during Firefox shutdown we put LRUCache in a shutdown mode, which bypasses the cache in case it is still used at that time.

Differential Revision: https://phabricator.services.mozilla.com/D79767
2020-07-06 23:42:38 +00:00
Gerald Squelart
4e67253eee Bug 1529610 - SmallArrayLRUCache - r=canaltinova
A small LRU cache (i.e., evicting Least Recenty Used items) that's most optimized for most recently used items.

Differential Revision: https://phabricator.services.mozilla.com/D82302
2020-07-06 23:42:05 +00:00
Noemi Erli
b13f2bcb47 Backed out 7 changesets (bug 1627075) for causing @nsZipArchive crashes CLOSED TREE
Backed out changeset 9705b2759d45 (bug 1627075)
Backed out changeset 699212a443c3 (bug 1627075)
Backed out changeset 7ae4df10749c (bug 1627075)
Backed out changeset ece9a4223349 (bug 1627075)
Backed out changeset 6c4eedaa0d04 (bug 1627075)
Backed out changeset f5106898239f (bug 1627075)
Backed out changeset b6029c7c0016 (bug 1627075)
2020-07-02 14:05:53 +03:00
Doug Thayer
3742aac030 Bug 1627075 - Route Omnijar requests through StartupCache r=froydnj
This should be a relatively straightforward patch. Essentially, we implement
a wrapper class (and friends) around nsZipArchive (and friends), which transparently
caches entries from the underlying zip archive in the StartupCache. This will break
without changes to the StartupCache, made in the patch after this, which allow it
to be used off of the main thread, and outside the main process.

Depends on D77635

Differential Revision: https://phabricator.services.mozilla.com/D77634
2020-07-02 02:51:41 +00:00
Doug Thayer
45d135813f Bug 1627075 - Allow lazily initializing nsZipArchives r=froydnj
Opening our Omnijars can be expensive, and it should be deferrable until after
startup is completed, provided we have a startup cache. In a previous patch in this
stack, we implemented caching of the zip central directory for omnijars, but we
still have to open the file in order to hand the object off to various omnijar
consumers. In a later patch, we will wrap nsZipArchive access in a class which
will allow us to transparently cache nsZipArchive results. These two get us
most of the way to not needing to read from the underlying omnijar files during
startup, but there are still nontrivial pieces, like nsZipFind for instance,
which we don't want to just duplicate inside of a wrapper class, so we would
like to sort out a way in which we can use an nsZipArchive class, but not
actually back it up with the real underlying file until we really need data
from it which we can't find in a cache.

Depends on D77633

Differential Revision: https://phabricator.services.mozilla.com/D78584
2020-07-02 03:12:49 +00:00
Doug Thayer
a336fc378c Bug 1627075 - Init StartupCache before Omnijar r=froydnj
We need to be able to init StartupCache before the Omnijar in order to cache
all of the Omnijar contents we access. This patch implements that.

Depends on D77632

Differential Revision: https://phabricator.services.mozilla.com/D77633
2020-07-02 02:49:49 +00:00
Doug Thayer
10f4af3f14 Bug 1627075 - Build Omnijar file list from startup cache r=froydnj
We would like to be able to defer opening the omnijar files until after startup
if the StartupCache has already been populated. Opening the omnijar files takes
a nontrivial time, at least on Windows, and almost everything in the omnijar
should be fairly compressible, and thus makes sense to live in the StartupCache.
See the last patch in this series for a little more discussion on numbers, but
tl;dr: we saw a 12% improvement in time to about:home being finished on reference
hardware with these changes together with the changes from the descendant patches.

Differential Revision: https://phabricator.services.mozilla.com/D77632
2020-07-02 02:49:31 +00:00
Mihai Alexandru Michis
bab20702a8 Backed out 6 changesets (bug 1627075) for causing failures regarding startupcache.
CLOSED TREE

Backed out changeset cf23b456ba12 (bug 1627075)
Backed out changeset b07887474f51 (bug 1627075)
Backed out changeset 65c0e6790a33 (bug 1627075)
Backed out changeset 6cd31f17a931 (bug 1627075)
Backed out changeset 0f0d1bd2a8ac (bug 1627075)
Backed out changeset 763a5a7b43a0 (bug 1627075)
2020-07-01 22:16:28 +03:00
Doug Thayer
ab4b703a53 Bug 1627075 - Route Omnijar requests through StartupCache r=froydnj
This should be a relatively straightforward patch. Essentially, we implement
a wrapper class (and friends) around nsZipArchive (and friends), which transparently
caches entries from the underlying zip archive in the StartupCache. This will break
without changes to the StartupCache, made in the patch after this, which allow it
to be used off of the main thread, and outside the main process.

Depends on D77635

Differential Revision: https://phabricator.services.mozilla.com/D77634
2020-07-01 17:09:53 +00:00
Doug Thayer
b52c9d39c1 Bug 1627075 - Allow lazily initializing nsZipArchives r=froydnj
Opening our Omnijars can be expensive, and it should be deferrable until after
startup is completed, provided we have a startup cache. In a previous patch in this
stack, we implemented caching of the zip central directory for omnijars, but we
still have to open the file in order to hand the object off to various omnijar
consumers. In a later patch, we will wrap nsZipArchive access in a class which
will allow us to transparently cache nsZipArchive results. These two get us
most of the way to not needing to read from the underlying omnijar files during
startup, but there are still nontrivial pieces, like nsZipFind for instance,
which we don't want to just duplicate inside of a wrapper class, so we would
like to sort out a way in which we can use an nsZipArchive class, but not
actually back it up with the real underlying file until we really need data
from it which we can't find in a cache.

Depends on D77633

Differential Revision: https://phabricator.services.mozilla.com/D78584
2020-07-01 18:04:48 +00:00
Doug Thayer
e1810ad0e8 Bug 1627075 - Init StartupCache before Omnijar r=froydnj
We need to be able to init StartupCache before the Omnijar in order to cache
all of the Omnijar contents we access. This patch implements that.

Depends on D77632

Differential Revision: https://phabricator.services.mozilla.com/D77633
2020-07-01 17:07:29 +00:00
Doug Thayer
b19fd0dabb Bug 1627075 - Build Omnijar file list from startup cache r=froydnj
We would like to be able to defer opening the omnijar files until after startup
if the StartupCache has already been populated. Opening the omnijar files takes
a nontrivial time, at least on Windows, and almost everything in the omnijar
should be fairly compressible, and thus makes sense to live in the StartupCache.
See the last patch in this series for a little more discussion on numbers, but
tl;dr: we saw a 12% improvement in time to about:home being finished on reference
hardware with these changes together with the changes from the descendant patches.

Differential Revision: https://phabricator.services.mozilla.com/D77632
2020-07-01 17:07:17 +00:00
Simon Giesecke
9364b353d4 Bug 1648010 - Remove NS_NAMED_LITERAL_CSTRING and NS_NAMED_LITERAL_STRING macros. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80631
2020-07-01 08:42:31 +00:00
Simon Giesecke
cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Butkovits Atila
44b8ac984c Backed out changeset e33817395845 (bug 1529610) as requested by dev. CLOSED TREE 2020-06-18 15:38:56 +03:00
Gerald Squelart
61581471a7 Bug 1529610 - LRU cache of Windows filenames in WinIOAutoObservation - r=canaltinova,florian
Caching filenames in 32-entry LRU array covers >95% of calls, and makes the average `Filename()` call 5 to 10 times cheaper.

browser_start_content_mainthreadio.js needed to be updated to handle operations that now have a filename thanks to the cache.

Differential Revision: https://phabricator.services.mozilla.com/D79767
2020-06-18 08:26:51 +00:00
Nicholas Nethercote
a8f5f49b8a Bug 1645982 - Rename some service getters in Services.py to better match the types. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79791
2020-06-16 23:32:21 +00:00
Emma Malysz
c2ded60e72 Bug 1610134: revert late writes from nsTerminator. r=dthayer
After investigating the potential to reduce the nsTerminator's crash timeout from
1 min, to 20s, and then finally 40s, we have decided to this does not provide
significant gains to justify increasing the amount of shutdown hang crashes
and potential to lose data. We should maintain the crash timeout at 1 min.

Differential Revision: https://phabricator.services.mozilla.com/D77939
2020-06-04 19:18:21 +00:00
Bas Schouten
8032d4373e Bug 1606706 - Part 2: Integrate new TaskController code into tree and allow usage by pref. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D74672
2020-06-04 00:02:18 +00:00
Bogdan Tara
2719f07eb0 Backed out 2 changesets (bug 1606706) for talos tests timeouts CLOSED TREE
Backed out changeset ab3e1a067a71 (bug 1606706)
Backed out changeset c47cf57dab71 (bug 1606706)
2020-06-03 11:51:04 +03:00
Bas Schouten
3a3972c388 Bug 1606706 - Part 2: Integrate new TaskController code into tree and allow usage by pref. r=smaug,?
Differential Revision: https://phabricator.services.mozilla.com/D74672
2020-06-02 11:36:38 +00:00
Nathan Froyd
02baef509b Bug 1641907 - add clarifying comments for AppInfoService getter(s); r=lina
People seemed to be taking the comment as indicative that Services.py
wasn't providing everything they needed, so make it clearer that you can
still get `nsIXULAppInfo`, you just have to work a little harder.

Differential Revision: https://phabricator.services.mozilla.com/D77477
2020-05-29 16:48:14 +00:00
Dan Minor
3c647c3f98 Bug 1638361 - Allow nsIUUIDGenerator to be used from socket process; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D76706
2020-05-26 18:30:15 +00:00
Jean-Yves Avenard
38cfa9db61 Bug 1637890 - P4. Process events dispatched by destructors during shutdown. r=froydnj
We allow the last tasks dispatched during shutdown to be run rather than just leaking them.

Differential Revision: https://phabricator.services.mozilla.com/D75497
2020-05-19 06:06:18 +00:00
Jean-Yves Avenard
de5872ee7a Bug 1637890 - P2. Don't use ClearOnShutdown to destroy AbstractThread::MainThread(). r=froydnj
During the last cycle collection, state watchers may attempt to dispatch tasks to the current AbstractThread, so we can't clear the TLS entry until that step has completed.

We want the object to be deleted last; ordering in call to ClearOnShutdown() can't guarantee it.

Differential Revision: https://phabricator.services.mozilla.com/D75498
2020-05-18 16:12:28 +00:00
Kershaw Chang
7922f6e91f Bug 1549323 - Make sure session cache is cleared in socket process r=keeler
Differential Revision: https://phabricator.services.mozilla.com/D74906
2020-05-14 12:21:59 +00:00
Bob Owen
c86a9b6e30 Bug 1632583: Only register taskbar button creation message in the parent process. r=aklotz
This also removes XRE_Win32kCallsAllowed and replaces its other use.

Differential Revision: https://phabricator.services.mozilla.com/D73909
2020-05-05 16:11:44 +00:00
Doug Thayer
51492737fb Bug 1630655 - Squash TSAN data race report in IOInterposer r=aklotz
In practice this shouldn't substantially change the behavior, but
it gets around being UB, and it shouldn't really cost us in terms
of performance. The alternative would be adding it to the TSAN
whitelist, which feels worse.

Differential Revision: https://phabricator.services.mozilla.com/D72015
2020-04-30 17:17:21 +00:00
Bobby Holley
d90069e220 Bug 1631304 - Reject AbstractThread dispatches after the main thread has ceased event proccessing. r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D72263
2020-04-28 21:18:19 +00:00