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

1608 Коммитов

Автор SHA1 Сообщение Дата
Andrew McCreight 45174e0771 Bug 1457281 - Remove dom.ipc.scheduler pref. r=froydnj
The JS engine has changed the APIs that cooperative scheduling relies
on into immediate crashes. Some users seem to set the prefs, and then
we get a lot of crashes on Nightly. This removes the top-level pref to
save them some grief.

I continue to pass the pref as false to the child process to avoid
weirdness if we somehow we get this far when the parent and child have
different versions.

MozReview-Commit-ID: 3o3yV2efx2r

--HG--
extra : rebase_source : 398c4d77ce3f78f3814ac97882b4a5e3190c44f7
2018-04-26 14:21:25 -07:00
Jan Henning 991ff633f3 Bug 1335148 - Part 2: Introduce notification for end of memory pressure. r=gsvelto,snorp
For Fennec on Android, if we haven't received memory pressure notifications from
the OS for a certain amount of time (in the order of ~15 mins), we assume that
we're no longer under memory pressure. In order to turn the bfcache back on when
that happens, we now want to be able to forward this fact to Gecko as well.

Unfortunately, the way memory pressure is tracked using an atomic variable
doesn't easily allow to fully extend the existing priority rules between "new"
and "ongoing" to include a new "stopping of memory pressure" event. Since we're
not using Dispatch*Eventual*MemoryPressure on Android and therefore the queuing
priority behaviour isn't actually relevant for us, we just ignore that and only
enforce that a pending "new" memory pressure event takes priority over a "stop"
event.

MozReview-Commit-ID: 90C9KogUyvf

--HG--
extra : rebase_source : 4e71a31433557d8d486f941953717a88d5d87e7d
2018-03-30 13:26:24 +02:00
Tarek Ziadé 90bafd1f42 Bug 1452580 - remove RELEASE_OR_BETA defines for PerformanceCounter usage - r=baku,erahm,farre
PerformanceCounters are currently disabled in two ways:

- a preference that's off by default "dom.performance.enable_scheduler_timing"
- calls made only for nightly using #ifndef RELEASE_OR_BETA

In order to simplify the code, let's remove the #ifndef and rely only on the pref.
That will also allows us to use the feature in every version going forward.

The performance will not be impacted since the current code is already using
the (cached) pref value to determine if the counters are used.

MozReview-Commit-ID: 47t2M1O13aH

--HG--
extra : rebase_source : e129e1829f1dc37c019e50e156474c4876d6d6cb
2018-04-24 22:03:06 +02:00
Nathan Froyd 9362ad6e83 Bug 1454052 - make MakeScopeExit a MOZ_MUST_USE function; r=gerald
Otherwise, one can do thinkos like:

  MakeScopeExit(...);

and the scope exiting function will execute much earlier than the
intended:

  auto guard = MakeScopeExit(...);
2018-04-18 12:14:18 -04:00
Noemi Erli 1b65998665 Merge inbound to mozilla-central. a=merge 2018-04-14 12:49:03 +03:00
Jan de Mooij 2dd36cfeae Bug 1452982 part 9 - Remove/rename remaining ZoneGroup references. r=jonco 2018-04-14 09:03:47 +02:00
Tom Bannister 988d18881f Bug 1434710 - Replaced all instances of mozilla::IndexSequence, mozilla::MakeIndexSequence and mozilla::IndexSequenceFor with std::index_sequence, std::make_index_sequence and std::index_sequence_for and removed mfbt/IndexSequence.h. r=botond
MozReview-Commit-ID: 1Ema7TUNr5v

--HG--
extra : rebase_source : e5bb164dbe19993214e8c16f92b0a1f5d2ff3fa1
2018-04-09 21:12:13 +10:00
Sebastian Hengst 0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Jim Blandy 863f939532 Bug 1452410 - Simplify ThrottledEventQueue's shutdown behavior. r=froydnj 2018-04-06 14:44:42 -07:00
Nika Layzell 0c3ba13e4c Bug 1437167 - Part 1: Stop using PRIntervalTime as the argument to CondVar::Wait and Monitor::Wait, r=mstange, r=froydnj 2018-04-10 17:49:47 -04:00
Nathan Froyd 038d4e78b8 Bug 1448544 - remove AutoVsyncTelemetry; r=farre
We had this for Quantum DOM, but that effort is stalled/dead, so we
should just remove the code and associated Telemetry histograms.
2018-04-07 11:54:03 -04:00
Tarek Ziadé f9138cc6f4 Bug 1447768 - part 2 - Dispatch counters in the parent process - r=baku
Chromeutils.RequestPerformanceMetrics() is now composed of two parts:
- calls content processes via IPDL to get their counters
- directly dispatch counters from the parent process

MozReview-Commit-ID: HlgcEOzkyAq

--HG--
extra : rebase_source : 60e81a27cd3a1bf1378e6b977529964507633b63
2018-04-04 13:36:25 +02:00
Nathan Froyd efd709bd4f Bug 1447744 - don't implement nsINamed for mozilla::Runnable when it's unused; r=erahm
We only use nsINamed on runnables for certain kinds of telemetry, and
those kinds of telemetry aren't being gathered on RELEASE_OR_BETA
builds.  We effectively make nsINamed::GetName a no-op when we're not
collecting said telemetry.  But implementing nsINamed does have a cost:
the vtable of every runnable (and we have hundreds of subclasses of
mozilla::Runnable) will contain pointers for GetName (and extra pointers
for QueryInterface/AddRef/Release), and all those pointers times all
those subclasses adds up quickly.  Let's not implement nsINamed when
nsINamed isn't going to be used.

This change saves ~100K of binary size on x86-64 Linux; the savings
should be similar on other 64-bit systems, and ~50K on 32-bit systems.
2018-03-23 14:53:55 -04:00
Andreas Pehrson 8bb83ab05d Bug 1351655 - Log which SharedThreadPools are not yet destroyed on shutdown-threads. r=froydnj
We risk a shutdown hang without any clues if a dangling reference somewhere
keeps a SharedThreadPool alive past xpcom-shutdown-threads. This because
xpcom-shutdown-threads waits for all SharedThreadPool to be destroyed before
advancing shutdown further. nsCycleCollector::Shutdown comes after
xpcom-shutdown-threads so it is possible that a reference-cycle unexpectedly
keeps a SharedThreadPool alive and blocks shutdown indefinitely.

This patch attempts to help diagnose future cases like this by printing which
SharedThreadPools we are going to wait for to stderr.

MozReview-Commit-ID: CwTApYUMikA

--HG--
extra : rebase_source : f29d04508cf492c82d65f324d7b1990849a0da13
2018-01-23 11:40:37 +01:00
Miko Mynttinen 65c6bee9d6 Bug 1445302 - Replace TArray.RemoveElementAt(TArray.Length() - 1) pattern with TArray.RemoveLastElement() or TArray.PopLastElement() r=froydnj
MozReview-Commit-ID: rGjabnP2iz

--HG--
extra : rebase_source : 1ef6c5ce028ac9ebd9f3176d57835c43fe46bada
2018-03-13 14:51:33 +01:00
Jan-Ivar Bruaroey 2a02bb226b Bug 1445533 - Use for(:) in MozPromise code. r=gerald
MozReview-Commit-ID: BsKR2o25hIQ

--HG--
extra : rebase_source : b150952128e9e7ad3ccc6603b1584dde40b82c5f
2018-03-13 19:13:18 -04:00
Jan-Ivar Bruaroey 608cdac3cb Bug 1445533 - Remove a refcount in MozPromise::Steal(), and use MakeRefPtr a few places. r=gerald
MozReview-Commit-ID: 2jFzxiqBVpc

--HG--
extra : rebase_source : 54947af96e3fc6abb51e73e1ace4b49a6a95fc46
2018-03-13 09:55:01 -04:00
Tarek Ziadé 86edd52973 Bug 1437438 - Add a performance counter to track scheduler activity - r=farre,froydnj
Adds a PeformanceCounter class that is used in DocGroup and WorkerPrivate
to track runnables execution and dispatch counts.

MozReview-Commit-ID: 51DLj6ORD2O

--HG--
extra : rebase_source : b481c9aa3b735569722bb7472872ec2d22adcb89
2018-03-06 10:19:19 +01:00
Nathan Froyd e7492f2d00 Bug 1443932 - part 1 - add nsIThreadManager::kThreadPoolStackSize; r=erahm
A lot of our thread pools use the default stack size for the platform
they're on, which can be rather large (8MB, usually, on Linux and OS X)
and is probably too much for the typical thread in the thread pool
regardless.  SharedThreadPool already has some logic for selecting a
reasonable stack size for worker threads; let's move that logic to
nsIThreadManager so that logic (and constant) can be shared more
broadly.  (That we already have a couple of instances of
SharedThreadPool usage solely for this constant suggests that it is a
concept that should be available in a more central location.)
2018-03-07 20:33:17 -05:00
Cosmin Sabou ed1b2a8736 Backed out 4 changesets (bug 1437167) for build bustages on nsUpdateDriver.cpp and WindowsMessageLoop.cpp on a CLOSED TREE.
Backed out changeset b98740e7c639 (bug 1437167)
Backed out changeset 4476e8f51fa6 (bug 1437167)
Backed out changeset c79dc40faa41 (bug 1437167)
Backed out changeset b608d2dcbb86 (bug 1437167)
2018-03-06 00:09:46 +02:00
Nika Layzell 262be91f75 Bug 1437167 - Part 1: Stop using PRIntervalTime as the argument to CondVar::Wait and Monitor::Wait, r=mstange, r=froydnj
MozReview-Commit-ID: BN18I8Q6c7S
2018-03-05 16:00:00 -05:00
Chris Peterson d09123f248 Bug 1436263 - Part 1: Replace `final override` virtual function specifiers with just `final`. r=froydnj
MozReview-Commit-ID: DE5HkIhsZ6D

--HG--
extra : rebase_source : 94831c1e13a840dd2ea0600f64bcf70c2bf938d9
extra : source : cf9283bf1b0bca3a6311c98e227329d451f80ecb
2018-02-05 22:46:57 -08:00
Josh Matthews b82cc41d64 Bug 1436742 - Expose docgroup used to dispatch events when possible. r=froydnj
--HG--
extra : rebase_source : a317dda863548a795e450e539d4328b5a4ecc050
2018-02-09 16:17:01 -05:00
Andrea Marchesini 8cdf705535 Bug 1435174 - Remove the renaming 'using namespace workers', r=bkelly 2018-02-05 19:55:07 +01:00
Nathan Froyd ec2a2fe38f Bug 1434856 - move runnable prioritization checks outside of event queue locks; r=erahm
Otherwise, we might enter JS, decide to GC, and deadlock because we were
trying to dispatch tasks to the main thread's event queue while holding
the lock for the event queue.
2018-02-02 13:55:05 -05:00
Byron Campen [:bwc] c3c54d2281 Bug 1431755 - Part 1: Add a variant of NS_GetCurrentThread that does not auto-create an nsIThread. r=froydnj
MozReview-Commit-ID: 9naTxaANX4u

--HG--
extra : rebase_source : 8ab21e09a6c154b90bd233212680fa93a96e0106
2018-01-19 09:41:22 -06:00
Andreas Pehrson f12e78691b Bug 1299515 - Make `const nsMainThreadPtrHandle<T>` usable. r=erahm
This enables having a const nsMainThreadPtrHandle<T> member which we want to
ensure doesn't get assigned to, but whose (the `T`'s) non-const methods are
still usable on main thread. Similar to how RefPtr<T> works.

MozReview-Commit-ID: 8CG0MwIZmLc

--HG--
extra : rebase_source : f0e897d3bf4f9a4d752e964ef63de73a9e710752
2017-11-22 11:24:18 +01:00
Andrea Marchesini a8a933a51f Bug 1425559 - Implement nsIThreadManager::spinEventLoopUntilOrShutdown, r=smaug
Currently nsIThreadManager::spinEventLoopUntil doesn't monitor the shutting
down. Firefox shutting down can be blocked by a 'broken' use of
nsIThreadManager::spinEventLoopUntil.
nsIThreadManager::spinEventLoopUntilOrShutdown should be used instead.
2018-01-28 08:41:36 +01:00
Chris Peterson 944d82e014 Bug 1428535 - Revert some unnecessary -Wsuggest-override warning suppressions.
It was decided in bug 1430669 that we won't enable gcc's -Wsuggest-override warnings at this time, so these ugly pragmas from bug 1428535 won't be necessary.

--HG--
extra : rebase_source : 221b1f40bb071933ad3e320ce2fa491b2a5917fb
extra : amend_source : 7fc3e6ff067aa5ae8d728e1751de3d2590d31493
2018-01-17 11:39:34 -08:00
Chris Peterson 37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08:00
Mike Conley 921cb8735c Bug 1397426 - Rename TabChild's notion of "active tabs" to "visible tabs" and move logic into renderLayers. r=billm
MozReview-Commit-ID: 1bBNwew7uCk

--HG--
extra : rebase_source : 0e59b548c6c01d7feaf9f40c282ab2f55e47bab7
extra : source : 4643e46ff8d3e84d10ff178e15a1be7f734b020f
2017-11-03 11:27:29 -04:00
Andrew McCreight b2ca279d4f Bug 1426779 - Disable precise runnable leakchecking names on release and beta. r=froydnj
The NS_IMPL_NAMED_* macros rely on the mName field, which are not
defined on beta or release, so don't use them on those branches, so
that Firefox will build.

MozReview-Commit-ID: 9wEnPqshBJ8

--HG--
extra : rebase_source : 1ee201c1f0049b02fb57679908915920226592a2
2018-01-04 12:59:02 -08:00
Andreas Farre 9450b8fef3 Bug 1425566 - Collect telemetry for unlabeled idle runnables. r=erahm 2018-01-03 14:19:03 +01:00
Andrew McCreight 4e452aadbf Bug 1410209, part 3 - Use Runnable::mName for the class name with XPCOM leak checking. r=smaug
Most subclasses of Runnable don't bother to override AddRef and
Release, so XPCOM leak checking ends up reporting Runnable, which
makes it impossible to know what is actually leaking.

Each subclass of Runnable is already required to pass in the name of
the class, which is stored in the field mName. This patch changes
Runnable to use mName as the class name for XPCOM leak checking, thus
giving each subclass a specific name without needing to change the
hundreds of existing subclasses of Runnable.

The limitation of this approach is the classes that DO use
NS_IMPL_ADDREF/RELEASE_INHERITED end up using the same class name that
is used by the superclass AddRef/Release, but with a different size,
which causes assertions in the leak checker. To work around this, I
change NS_IMPL_ADDREF/RELEASE_INHERITED to not call into
NS_LOG_ADDREF/RELEASE for classes that are a subclass of
Runnable. This needs to use IsConvertible<> and not IsBaseOf<> because
the latter requires the classes involved to be defined, and headers
can use nsISupportsImpl.h without nsThreadUtils.h.

MozReview-Commit-ID: H0pgvwQSZAE

--HG--
extra : rebase_source : 0be13fe2e649e62be1f9471fc03fac43024eb0aa
2017-10-25 13:51:17 -07:00
Andreas Farre 40c26995ea Bug 1410096 - Move labeled queues to SchedulerGroup. r=smaug
This improves the performance of GetEvent and PutEvent in
LabeledEventQueue by removing a hash table mapping groups to queues.
2017-12-15 21:17:31 +01:00
Andreas Farre 54b84f70d3 Bug 1417107 - Use histogram key suffix 'unlabeled' instead of 'labeled'. r=erahm
Make unlabeled runnables be the runnables we tag with extra
information, since they're the ones we want to decrease.

Note: This changes values gathered for telemetry!
2017-12-15 17:02:50 +01:00
Jean-Yves Avenard a1172cfb0e Bug 1424647: Prevent race on AllPromiseHolder::mPromise. r=jwwang
If any of the promises gets resolved/rejected prior MozPromise::All completing, it would return nullptr

MozReview-Commit-ID: Lqhv2t2upvF

--HG--
extra : rebase_source : 0c85172958c00a2ac3aa0bd33e4e50dd1893c3ba
2017-12-10 23:31:04 +01:00
Eric Rahm 07c97a5afe Bug 1423773 - Part 1: Remove usage of nsStringGlue.h. r=glandium
This removes an unnecessary level of indirection by replacing all
nsStringGlue.h instances with just nsString.h.

--HG--
extra : rebase_source : 340989240af4018f3ebfd92826ae11b0cb46d019
2017-12-06 16:52:51 -08:00
Mike Conley 053fbea1fc Backed out changeset 4643e46ff8d3 (bug 1397426)
--HG--
extra : rebase_source : 3e235d725c42300f3c8f3af51850e3c4e1aa7ddf
2017-12-06 16:03:32 -05:00
Mike Conley cacae0556b Bug 1397426 - Rename TabChild's notion of "active tabs" to "visible tabs" and move logic into renderLayers. r=billm
MozReview-Commit-ID: 1bBNwew7uCk

--HG--
extra : rebase_source : fb907f0e9f02635b122dbf67da7a7c1292427cec
2017-11-03 11:27:29 -04:00
Gabriele Svelto 3e3a359edc Bug 1402519 - Remove MOZ_CRASHREPORTER directives from xpcom; r=froydnj
MozReview-Commit-ID: HS3M0DJQ3qc

--HG--
extra : rebase_source : c535b0760480deea1c9889c629c52857bf52ea64
2017-10-10 11:59:39 +02:00
shindli fb855aa7ba Backed out 16 changesets (bug 1402519) for conflicts during merge r=backout on a CLOSED TREE
Backed out changeset 07fcf163241a (bug 1402519)
Backed out changeset c6d2ad45d8e2 (bug 1402519)
Backed out changeset 8a3caca61294 (bug 1402519)
Backed out changeset 01425eae2c48 (bug 1402519)
Backed out changeset cf298d3815de (bug 1402519)
Backed out changeset e1964f4389cd (bug 1402519)
Backed out changeset f405337f3569 (bug 1402519)
Backed out changeset a76356fd3359 (bug 1402519)
Backed out changeset d3bb350d1c34 (bug 1402519)
Backed out changeset 9d3bfd9f932c (bug 1402519)
Backed out changeset e3dd6e5b073f (bug 1402519)
Backed out changeset e801b0c00134 (bug 1402519)
Backed out changeset 8a4139fa5dca (bug 1402519)
Backed out changeset 8d01c14ac1ca (bug 1402519)
Backed out changeset 24e0dcd01898 (bug 1402519)
Backed out changeset f8fdf450613f (bug 1402519)
2017-11-23 00:11:44 +02:00
Gabriele Svelto 13364cc36b Bug 1402519 - Remove MOZ_CRASHREPORTER directives from xpcom; r=froydnj
MozReview-Commit-ID: HS3M0DJQ3qc

--HG--
extra : rebase_source : bb09e9e3b01d39e91a1377117fa127a09c29cccd
2017-10-10 11:59:39 +02:00
Andrea Marchesini eedd5e2174 Bug 1416724 - part 1 - AbstractThread::Dispatch should propage errors if failing the dispatching of Runnables, r=jwwang 2017-11-15 07:58:02 +01:00
shindli 385fb3428c Backed out 4 changesets (bug 1416724) for failing /builds/worker/workspace/build/src/dom/media/hls/HLSDemuxer.cpp:89:5 r=backout on a CLOSED TREE
Backed out changeset 45352aa4319d (bug 1416724)
Backed out changeset 01d1e5263bcd (bug 1416724)
Backed out changeset bc854c315ec8 (bug 1416724)
Backed out changeset 35a50167485d (bug 1416724)
2017-11-15 09:49:04 +02:00
Andrea Marchesini e521e16895 Bug 1416724 - part 1 - AbstractThread::Dispatch should propage errors if failing the dispatching of Runnables, r=jwwang 2017-11-15 07:58:02 +01:00
Jed Davis c7f8a32bf4 Bug 1401786 - Move base::LaunchApp options into a LaunchOptions struct, like upstream Chromium. r=billm
MozReview-Commit-ID: 74IXV4oGeWR

--HG--
extra : rebase_source : ef4021a60506a8fc5fa5a35e3f3fefb9dbad75d6
2017-09-08 20:35:06 -06:00
Bill McCloskey 9ff9bd7c1e Bug 1412192 - Use main-thread JSContext in SystemZoneResource::IsAvailable (r=froydnj)
MozReview-Commit-ID: BC9OoHVaMEI
2017-11-11 21:04:20 -08:00
Bill McCloskey 0ab7bc4583 Bug 1412191 - Fix CooperativeThreadPool thread count assertion (r=froydnj)
MozReview-Commit-ID: 4oUM0rh4ySs
2017-11-11 21:04:20 -08:00