Commit Graph

1871 Commits

Author SHA1 Message Date
Gabriele Svelto
3e93e048a8 Bug 1584969 - Use nsMaybeWeakPtr to simplify the nsIProcess implementation r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D47601

--HG--
extra : moz-landing-system : lando
2019-09-30 18:28:31 +00:00
Dorel Luca
fd7b19e2eb Backed out changeset 9364cff86a7e (bug 1584568) by dev's request
--HG--
extra : rebase_source : 2e7ac1ee673380994328df1d6436235895d5b5e3
2019-09-27 23:54:11 +03:00
Nathan Froyd
e284917829 Bug 1584568 - add a way to get the background event target; r=KrisWright
This function is needed for people whose needs don't map cleanly to
`NS_DispatchToBackgroundThread`, usually because they're using the event
target to do thread consistency checks.  Once we have this function, we
can start converting singleton threads/thread pools that want to use
functionality like the above.

Differential Revision: https://phabricator.services.mozilla.com/D47454

--HG--
extra : moz-landing-system : lando
2019-09-27 17:16:40 +00:00
Nathan Froyd
580e41da6a Bug 1584339 - move background event target logic into a separate class; r=KrisWright
Eventually, we're going to want to hand out an `nsIEventTarget*` to people
wanting to dispatch to background threads, but for whatever reason not
wanting to use the `NS_DispatchToBackgroundThread` API (probably because
they want to verify correctness by checking that certain methods are, in
fact, running on the background event target).  And because we're going to
want to have some sort of division between CPU-bound and IO-bound tasks, we
can't just hand out references to a single thread pool.  We need some sort
of intermediate object for both of these goals, and that is what the added
`BackgroundEventTarget` class is.

Differential Revision: https://phabricator.services.mozilla.com/D47343

--HG--
extra : moz-landing-system : lando
2019-09-27 15:30:34 +00:00
Brian Hackett
7a471baa7e Bug 1483398 - Disable idle scheduler when recording/replaying, r=smaug.
Differential Revision: https://phabricator.services.mozilla.com/D47257

--HG--
extra : moz-landing-system : lando
2019-09-26 20:20:11 +00:00
Nathan Froyd
5a3128b973 Bug 1583964 - make IsOnCurrentThread for thread pools constant-time; r=KrisWright
It's fairly common for clients to hold a pointer to some private thread
and then inquire about `IsOnCurrentThread` in debug checks.  As we
migrate these private threads into some `nsIEventTarget` implementation
that might be running on thread pools, we need to ensure that those
`IsOnCurrentThread` continues to be relatively cheap.  The current
implementation for thread pools is not particularly efficient.

The inefficiency comes from having to iterate over all the threads in
the pool.  But there's no need to do this; we can just have each thread
set a particular thread-local variable to the thread pool it's running
on, and check the value of that thread-local variable instead.

Differential Revision: https://phabricator.services.mozilla.com/D47139

--HG--
extra : moz-landing-system : lando
2019-09-25 22:02:08 +00:00
Josh Aas
ec1207f341 Bug 1450059 - part 1 - add a NS_DispatchToBackgroundThread function; r=KrisWright
We have a number of people starting up singleton threads for the sole
purpose of running a single runnable on them.  These consumers often
leave the thread running until some point close to shutdown, or they
never shut it down at all.  Let's add a helper function to do the thing
they actually want to do, and then we can modify the implementation of
that function as necessary as we merge singleton threads (and even
thread pools) together.

Differential Revision: https://phabricator.services.mozilla.com/D46997

--HG--
extra : moz-landing-system : lando
2019-09-25 04:03:28 +00:00
Mihai Alexandru Michis
4e1448e7e6 Backed out 2 changesets (bug 1510226) for causing xpcshell crashes and xpcshell failures in test_TelemetrySession.js CLOSED TREE
Backed out changeset cb739de6606d (bug 1510226)
Backed out changeset b6f670610dc3 (bug 1510226)
2019-09-25 04:25:07 +03:00
Doug Thayer
ecdf4c1ca3 Bug 1510226 - Do not block main thread in nsThread::Init r=froydnj
To remove the blocking inside nsThread::Init, two things needed
to happen:

- Switch the ThreadInitData value passed as the argument for
  ThreadFunc to a heap allocation, so that it can outlive the call
  to nsThread::Init.
- Initialize mThread and mEventTarget->mThread to the return
  value of PR_CreateThread, so that to the callers, checks which
  depend on these values being set can continue to function.

Differential Revision: https://phabricator.services.mozilla.com/D41248

--HG--
extra : moz-landing-system : lando
2019-09-23 21:07:04 +00:00
Doug Thayer
65be2b22c1 Bug 1510226 - Remove vestigial references to cooperative scheduling r=froydnj
GetCurrentPhysicalThread and GetCurrentVirtualThread are, in practice,
identical, as the TLS override that GetCurrentVirtualThread depends on
is never actually set. This simply removes that and renames some things/
deletes some comments.

Differential Revision: https://phabricator.services.mozilla.com/D41247

--HG--
extra : moz-landing-system : lando
2019-08-20 18:03:11 +00:00
Olli Pettay
1d1349d4bf Bug 1563063 - Cross-process idle handling, r=farre
This is to get initial feedback/review.
PIdleScheduler.ipdl has the documentation about the basic architecture.
(v15)

Differential Revision: https://phabricator.services.mozilla.com/D45162

--HG--
extra : moz-landing-system : lando
2019-09-24 14:33:57 +00:00
Jean-Yves Avenard
912b0df630 Bug 1575744 - P4. Add MozPromise::FromDomPromise. r=bholley
Similar to MozPromise::FromGeckoResult.

Allows to create a MozPromise that will be resolved/rejected when the JS promise does the same.
It would be nice to be able to chain the two promise types, but it would be an additional effort.
MozPromise::FromDomPromise is limited to primitive types only and the reject value type must be nsresult.

Differential Revision: https://phabricator.services.mozilla.com/D46017

--HG--
extra : moz-landing-system : lando
2019-09-20 04:09:46 +00:00
arthur.iakab
a595388e84 Backed out changeset 5ed078313a10 (bug 1563063)for causing browser-chrome failures on browser_test_feature_preferencereads.js a=backout 2019-09-21 16:36:09 +03:00
Olli Pettay
a1f7c1bbdf Bug 1563063 - Cross-process idle handling, r=farre
This is to get initial feedback/review.
PIdleScheduler.ipdl has the documentation about the basic architecture.
(v15)

Differential Revision: https://phabricator.services.mozilla.com/D45162

--HG--
extra : moz-landing-system : lando
2019-09-20 19:31:58 +00:00
Bogdan Tara
bee28f01d7 Backed out 8 changesets (bug 1575744) for HttpChannelParent related assertion failures
Backed out changeset af61675dd488 (bug 1575744)
Backed out changeset bf794b9373c8 (bug 1575744)
Backed out changeset 39ffb74d2e12 (bug 1575744)
Backed out changeset c1547b3df672 (bug 1575744)
Backed out changeset 382ee8672027 (bug 1575744)
Backed out changeset 5abb38484f11 (bug 1575744)
Backed out changeset d5244c1bbfe8 (bug 1575744)
Backed out changeset c74b81debf73 (bug 1575744)

--HG--
rename : netwerk/base/nsIProcessSwitchRequestor.idl => netwerk/base/nsICrossProcessSwitchChannel.idl
2019-09-20 06:58:44 +03:00
Jean-Yves Avenard
bafae6af97 Bug 1575744 - P4. Add MozPromise::FromDomPromise. r=bholley
Similar to MozPromise::FromGeckoResult.

Allows to create a MozPromise that will be resolved/rejected when the JS promise does the same.
It would be nice to be able to chain the two promise types, but it would be an additional effort.
MozPromise::FromDomPromise is limited to primitive types only and the reject value type must be nsresult.

Differential Revision: https://phabricator.services.mozilla.com/D46017

--HG--
extra : moz-landing-system : lando
2019-09-20 02:21:12 +00:00
Bogdan Tara
7e0aba7d00 Backed out changeset b0c0887e223c (bug 1563063) for browser_test_feature_preferencereads and browser_test_profile_multi_frame_page_info failures CLOSED TREE 2019-09-19 23:18:06 +03:00
Olli Pettay
bcf140f437 Bug 1563063 - Cross-process idle handling, r=farre
This is to get initial feedback/review.
PIdleScheduler.ipdl has the documentation about the basic architecture.
(v15)

Differential Revision: https://phabricator.services.mozilla.com/D45162

--HG--
extra : moz-landing-system : lando
2019-09-18 23:53:42 +00:00
Chris H-C
457b8d15c8 Bug 1577937 - StaticDataMutex for when you want a DataMutex but Static r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D45558

--HG--
extra : moz-landing-system : lando
2019-09-12 19:58:01 +00:00
Tom Ritter
be6c896158 Bug 1575974 - Report any non-zero exit code as a process failure in nsIProcess r=gsvelto
EXIT_FAILURE is 'implementation defined' but can be defined to be 1.
In our case, pingsender exits with EXIT_FAILURE but nsIProcess wasn't
reporting it as failure because it thought failures were always negative.

Differential Revision: https://phabricator.services.mozilla.com/D45038

--HG--
extra : moz-landing-system : lando
2019-09-11 04:40:11 +00:00
Razvan Maries
b7da3be2b0 Backed out 3 changesets (bug 1575974) for xpcshell perma fails on test_nsIProcess.js. CLOSED TREE
Backed out changeset e32925d2b886 (bug 1575974)
Backed out changeset a9512bb19ea7 (bug 1575974)
Backed out changeset 521655c73cd1 (bug 1575974)
2019-09-11 00:23:26 +03:00
Tom Ritter
c925942e2d Bug 1575974 - Report any non-zero exit code as a process failure in nsIProcess r=gsvelto
EXIT_FAILURE is 'implementation defined' but can be defined to be 1.
In our case, pingsender exits with EXIT_FAILURE but nsIProcess wasn't
reporting it as failure because it thought failures were always negative.

Differential Revision: https://phabricator.services.mozilla.com/D45038

--HG--
extra : moz-landing-system : lando
2019-09-10 18:01:29 +00:00
Dorel Luca
17bf280715 Backed out 3 changesets (bug 1575974) for MinGW build bustage. CLOSED TREE
Backed out changeset cc4a00226229 (bug 1575974)
Backed out changeset 225d858fe335 (bug 1575974)
Backed out changeset 1dc0b5a41dc8 (bug 1575974)
2019-09-10 18:39:44 +03:00
Tom Ritter
323d7cb7e2 Bug 1575974 - Report any non-zero exit code as a process failure in nsIProcess r=gsvelto
EXIT_FAILURE is 'implementation defined' but can be defined to be 1.
In our case, pingsender exits with EXIT_FAILURE but nsIProcess wasn't
reporting it as failure because it thought failures were always negative.

Differential Revision: https://phabricator.services.mozilla.com/D45038

--HG--
extra : moz-landing-system : lando
2019-09-10 10:44:10 +00:00
Simon Giesecke
a7b804f7af Bug 1575479 - Encapsulate mBaseHashtableET::mData. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D45004

--HG--
extra : moz-landing-system : lando
2019-09-10 13:51:09 +00:00
Coroiu Cristina
77681b7832 Backed out 2 changesets (bug 1575479) for build bustage at build/src/gfx/thebes/gfxFT2Fonts.h on a CLOSED TREE
Backed out changeset dcbc7c69fb64 (bug 1575479)
Backed out changeset 6d54a8115393 (bug 1575479)
2019-09-10 15:01:10 +03:00
Simon Giesecke
dda41fa097 Bug 1575479 - Encapsulate mBaseHashtableET::mData. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D45004

--HG--
extra : moz-landing-system : lando
2019-09-06 14:14:06 +00:00
Gerald Squelart
95f77c2409 Bug 1576819 - Use PROFILER_ADD_MARKER{,_WITH_PAYLOAD} everywhere - r=gregtatum
All calls to `profiler_add_marker()` (outside of the profilers code) are
now replaced by either:
- `PROFILER_ADD_MARKER(name, categoryPair)`
- `PROFILER_ADD_MARKER_WITH_PAYLOAD(name, categoryPair, TypeOfMarkerPayload,
                                    (payload, ..., arguments))`

This makes all calls consistent, and they won't need to prefix the category pair
with `JS::ProfilingCategoryPair::`.

Also it will make it easier to add (and later remove) internal-profiling
instrumentation (bug 1576550), and to replace heap-allocated payloads with
stack-allocated ones (bug 1576555).

Differential Revision: https://phabricator.services.mozilla.com/D43588

--HG--
extra : moz-landing-system : lando
2019-09-04 07:56:51 +00:00
Nathan Froyd
f7a731abd5 Bug 1573160 - shutdown newly-spawned threads if we're shutting down; r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D41551

--HG--
extra : moz-landing-system : lando
2019-08-15 17:29:26 +00:00
Nathan Froyd
87c432d06a Bug 1570982 - remove CPP_THROW_NEW; r=glandium
We always define it to the same thing, and we're inconsistent in whether
we use `CPP_THROW_NEW` or `throw()`, so we might as well just use the
standard C++ thing and get rid of some baggage.

Differential Revision: https://phabricator.services.mozilla.com/D40425

--HG--
extra : moz-landing-system : lando
2019-08-14 01:32:41 +00:00
Aaron Klotz
fb977a3526 Bug 1571875: Part 2 - Change over all existing static local uses of DynamicallyLinkedFunctionPtr to use StaticDynamicallyLinkedFunctionPtr instead; r=mhowell
Depends on D40885

Differential Revision: https://phabricator.services.mozilla.com/D40886

--HG--
extra : moz-landing-system : lando
2019-08-07 15:58:09 +00:00
Cameron McCormack
d075470483 Bug 1053379 - Simplify CodeAddressService so non-DMD users can rely on defaults. r=njn
None of the StringTable implementations were freeing their strdup'd
strings, either.

Differential Revision: https://phabricator.services.mozilla.com/D40757

--HG--
extra : moz-landing-system : lando
2019-08-06 21:58:12 +00:00
Bobby Holley
c14858c637 Bug 1571092 - Mark various MozPromise-returning methods MOZ_MUST_USE. r=jld
Differential Revision: https://phabricator.services.mozilla.com/D40528

--HG--
extra : moz-landing-system : lando
2019-08-05 20:10:58 +00:00
Nicholas Nethercote
18fae65f38 Bug 1563139 - Remove StaticPrefs.h. r=glandium
This requires replacing inclusions of it with inclusions of more specific prefs
files.

The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.

Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.

Differential Revision: https://phabricator.services.mozilla.com/D39138

--HG--
extra : moz-landing-system : lando
2019-07-26 01:10:23 +00:00
Bobby Holley
5d23efb2eb Bug 1566583 - Bridge GeckoResult to MozPromise and return a GeckoResult from GeckoProcessManager::start. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D38436

--HG--
extra : moz-landing-system : lando
2019-07-24 21:10:14 +00:00
Coroiu Cristina
f3386dea34 Backed out 4 changesets (bug 1566583) for apilint and checkstyle failure at geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java on a CLOSED TREE
Backed out changeset 3700ef585384 (bug 1566583)
Backed out changeset fbc829be6c4f (bug 1566583)
Backed out changeset 14ea9c84bb0e (bug 1566583)
Backed out changeset 92f3b1bb34a4 (bug 1566583)
2019-07-24 22:59:54 +03:00
Bobby Holley
53719788a1 Bug 1566583 - Bridge GeckoResult to MozPromise and return a GeckoResult from GeckoProcessManager::start. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D38436

--HG--
extra : moz-landing-system : lando
2019-07-24 19:19:40 +00:00
Olli Pettay
7f18b121db Bug 1566573, Add prefs to control idle time limits, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D38242

--HG--
extra : moz-landing-system : lando
2019-07-17 09:19:44 +00:00
Olli Pettay
5474e37783 Bug 1566459, add a way to check underlying IPC message type from runnable, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D38215

--HG--
extra : moz-landing-system : lando
2019-07-16 19:21:40 +00:00
Olli Pettay
9eeb5dab4f Bug 1541229, higher minimum idle period during page load, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D37908

--HG--
extra : moz-landing-system : lando
2019-07-16 12:07:49 +00:00
Nika Layzell
eb98932636 Bug 1561783 - Make nsThread::mIsMainThread a bool, r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D36142

--HG--
extra : moz-landing-system : lando
2019-06-27 00:37:53 +00:00
Jon Coppeard
ace8608f82 Bug 1560931 - Fire memory-pressure-stop events on Windows r=gsvelto
I'd like to rely on always getting a stop event when the system recovers from a memory pressure situation.  AIUI this already happens on Android platforms but not on Windows.  This adds the stop event for Windows.

Differential Revision: https://phabricator.services.mozilla.com/D35679
2019-06-24 18:22:53 +01:00
Olli Pettay
c6b69378d0 Bug 1559220 - Special case IndexedDB threads in wakeup telemetry, r=erahm
The approach isn't perhaps super elegant, but it is a small and simple tweak.

Differential Revision: https://phabricator.services.mozilla.com/D34923

--HG--
extra : moz-landing-system : lando
2019-06-16 21:03:45 +00:00
Olli Pettay
2d108f18b0 Bug 1554292 - Add simple telemetry probe to gather information about threads' wakeup frequency, r=erahm
This patch takes the approach to count up to 100 wakeups and reports then time it took for that period. Regression in wakeups could
show up as decreased mean or median time.

Differential Revision: https://phabricator.services.mozilla.com/D32543

--HG--
extra : moz-landing-system : lando
2019-06-05 20:26:09 +00:00
Bob Owen
387477fb68 Bug 1464032 Part 12: Add CanvasParent, CanvasChild and RecordedTextureData. r=mattwoodrow, jld
RecordedTextureData records TextureData calls for play back in the GPU process.
CanvasChild and CanvasParent set up the recorder and translator.
They also help to manage the starting of translation and co-ordinating the
translation with the frame transactions.
This patch also includes other changes to wire up recording and playback.
2018-12-02 14:19:11 +00:00
Jean-Yves Avenard
e4ba671378 Bug 1552643 - P3. rename medium_high_event_queue.enabled pref. r=froydnj
To make it more inline other preferences naming.

Differential Revision: https://phabricator.services.mozilla.com/D32251

--HG--
extra : moz-landing-system : lando
2019-05-26 15:00:09 +00:00
Sylvestre Ledru
d57d4905f1 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D30883

--HG--
extra : moz-landing-system : lando
2019-05-25 17:46:15 +00:00
Gurzau Raul
967bc2a754 Backed out 31 changesets (bug 1552643, bug 1550422) for xpcshell crash on a CLOSED TREE.
Backed out changeset e30c1aa75529 (bug 1552643)
Backed out changeset caadcd7e02d3 (bug 1552643)
Backed out changeset aa7086ab09be (bug 1552643)
Backed out changeset 0b4029671710 (bug 1550422)
Backed out changeset a16295296035 (bug 1550422)
Backed out changeset 3b70307c0db5 (bug 1550422)
Backed out changeset 69df7818d4a3 (bug 1550422)
Backed out changeset d98dfc565927 (bug 1550422)
Backed out changeset 6f0997976944 (bug 1550422)
Backed out changeset 0edd264464c2 (bug 1550422)
Backed out changeset 9ea6da7a74ec (bug 1550422)
Backed out changeset f855f9309c8b (bug 1550422)
Backed out changeset 1033546224a7 (bug 1550422)
Backed out changeset ade7384c6186 (bug 1550422)
Backed out changeset 75b04de7e99c (bug 1550422)
Backed out changeset 91c3acdb2454 (bug 1550422)
Backed out changeset 77d2f80257d1 (bug 1550422)
Backed out changeset e0cd10d35327 (bug 1550422)
Backed out changeset 097091082423 (bug 1550422)
Backed out changeset 2f328853c1ab (bug 1550422)
Backed out changeset f92f2cc29cb1 (bug 1550422)
Backed out changeset 6dc82f88333d (bug 1550422)
Backed out changeset c20f66494d69 (bug 1550422)
Backed out changeset 2ba22cddeb6f (bug 1550422)
Backed out changeset 3aa72f89e295 (bug 1550422)
Backed out changeset ab4c4e806977 (bug 1550422)
Backed out changeset 72e5de040dda (bug 1550422)
Backed out changeset 7d3c2d486706 (bug 1550422)
Backed out changeset 132e0b8d8468 (bug 1550422)
Backed out changeset 54c85ac75dd0 (bug 1550422)
Backed out changeset d7ba4a18dd54 (bug 1550422)
2019-05-25 09:07:49 +03:00
Jean-Yves Avenard
7160d797f9 Bug 1552643 - P3. rename medium_high_event_queue.enabled pref. r=froydnj
To make it more inline other preferences naming.

Differential Revision: https://phabricator.services.mozilla.com/D32251

--HG--
extra : moz-landing-system : lando
2019-05-25 02:03:21 +00:00
Randell Jesup
a859c53225 Bug 1553856: LazyIdleThread should set names for the nsThreads it spawns r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D32385

--HG--
extra : moz-landing-system : lando
2019-05-24 12:50:05 +00:00