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

1568 Коммитов

Автор SHA1 Сообщение Дата
Sebastian Hengst 7eec7a0a11 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: mr7OYuaLKE
2017-09-21 15:23:43 +02:00
Nathan Froyd 3393422869 Bug 1401662 - don't inline nsThreadManager::get(); r=erahm
Defining get() in the declaration of nsThreadManager implicitly sticks
an "inline" on the function, which is not what we want: inlining it
spreads around a lot of static initialization code.  Providing an
out-of-line definition is much better in terms of code size.
2017-09-20 17:10:20 -04:00
Byron Campen [:bwc] 6b3da0609f Bug 1383019: Move more logic under the protection of nsTimerImpl::mMutex, and simplify. r=froydnj, a=abillings
MozReview-Commit-ID: JjYScKwyika

--HG--
extra : rebase_source : a5a8a17f86459ace51d9250454bd4cf1433130b0
2017-09-14 12:19:24 -05:00
Philippe Normand fb80b50e2e Bug 1399825 - Include nsXULAppAPI.h in nsThreadManager.cpp. r=Ms2ger
This ensures XRE_IsContentProcess() is defined, as it's used in this file.

MozReview-Commit-ID: GwBYcFBiUBK
2017-09-14 12:51:41 +01:00
James Cheng 0c675a3236 Bug 1393710 - Add thread name into NS_DebugBreak for better debugging. r=froydnj
MozReview-Commit-ID: AvqajMgtpuh

--HG--
extra : rebase_source : 13e99f103abc9e39ec4cff15f720cd09a9e6b2c5
2017-08-30 11:13:50 +08:00
Wes Kocher 1ea82f66aa Merge m-c to autoland, a=merge
MozReview-Commit-ID: AHxJvcR2Tpa
2017-09-20 17:47:16 -07:00
Blake Kaplan 04b86e2150 Bug 1398393 - Set Servo thread state on cooperative threads. r=billm
By doing this we avoid triggering assertions in the Servo code that ensure
we have registered the thread with Servo and set the proper state on it.

MozReview-Commit-ID: K6qHrYoQDLm

--HG--
extra : rebase_source : d01b0aad42273f6b92b7cfd5f5fe17ffe7b4cda0
2017-09-08 16:50:34 -07:00
Blake Kaplan c1ce54a82a Bug 1401412 - Destroy this singleton during XPCOM shutdown. r=smaug
Unfortunately, this needed some additional trickery in order to keep its
constructor "private". I stole this trick from [1]. With this patch, we tear
down the statistics object during XPCOM shutdown intead of after it. I don't
believe that we need the object to live past the ClearOnShutdown destructors.

[1] http://rienajouter.blogspot.com/2014/10/makeshared-and-makeunique-for-classes.html

MozReview-Commit-ID: JsiN6Bq9Yp4

--HG--
extra : rebase_source : dd26c8e6906a6c9fd500c28379f8c63fd7c3ad6a
2017-09-19 17:38:05 -07:00
Bill McCloskey 0f4e7d4fe6 Bug 1398423 - Fix LabeledEventQueue bug with unlabeled events (r=froydnj)
MozReview-Commit-ID: 7ru62QTkya2
2017-09-11 19:11:03 -07:00
Bill McCloskey b9683a5b18 Bug 1398423 - Make linked list of SchedulerGroups static (r=froydnj)
MozReview-Commit-ID: GgfdRlhPiHP
2017-09-11 19:11:01 -07:00
Bill McCloskey 9c4cbe52d1 Bug 1398417 - Fix PrioritizedEventQueue bugs with input event prioritization (r=stone)
MozReview-Commit-ID: 4wk8EUv0h7C
2017-09-11 19:10:57 -07:00
James Cheng fb6af85bd2 Bug 1397344 - Use Decay to ensure StoreCopyPassByXXX stores the value by copy not by reference. r=gerald
MozReview-Commit-ID: Ec9yjYdQ1jC

--HG--
extra : rebase_source : 6b2f63bf7af9a3c8a879ac6f3865abf6be9a4155
2017-09-07 17:02:13 +08:00
Bill McCloskey 9cbaae8cfc Bug 1396155 - Allow LabeledEventQueue to be used outside the Scheduler (r=froydnj)
MozReview-Commit-ID: 4yEX39HXh9W
2017-09-07 22:31:34 -07:00
Bill McCloskey 4219e067da Bug 1396155 - Support active tab prioritization and round-robin scheduling in LabeledEventQueue (r=froydnj)
MozReview-Commit-ID: Ax5rWAKN50h
2017-09-07 22:31:34 -07:00
Philippe Normand af237419fa Bug 1402824 - Include nsComponentManagerUtils.h in nsThreadUtils.cpp to fix non-unified build. r=billm
do_CreateInstance was used without prior declaration.

MozReview-Commit-ID: 4LkXAcZytM7

--HG--
extra : rebase_source : a983330be02ed058a109ba3bbfd6ecdd3f2ddf56
2017-09-25 11:01:25 +01:00
Philippe Normand 41218b0c60 Bug 1402824 - Include LabeledEventQueue.h in ThreadEventQueue.cpp to fix non-unified build. r=billm
LabeledEventQueue was used without prior declaration.

MozReview-Commit-ID: 3aqGDb0cZFY

--HG--
extra : rebase_source : 08e207b2024e5ba1be1eb0c55ddbe7b0fc405637
2017-09-25 10:59:47 +01:00
Philippe Normand 98e504e3be Bug 1402824 - Include AbstractThread in SystemGroup.cpp to fix non-unified build. r=billm
AbstractThread was used without prior declaration.

MozReview-Commit-ID: BmP83mmjX3b

--HG--
extra : rebase_source : 4f079246b7dd6c378eba97897f74a3c9623540df
2017-09-25 10:59:02 +01:00
Philippe Normand 4e80469013 Bug 1402824 - Include nsIThreadInteral.h in SynchronizedEventQueue to fix non-unified. r=billm
nsIThreadObserver (defined in nsIThreadInternal.h) was used without prior
declaration.

MozReview-Commit-ID: 9cSuERgUPtl

--HG--
extra : rebase_source : 15219cba6f5a41c42aa1103d8c958a55ac3b9af0
2017-09-25 10:56:13 +01:00
Philippe Normand 8bb48e0de1 Bug 1402824 - Add missing includes in Scheduler.h to fix non-unified build. r=billm
nsTArray and EventLoopActivation were used without prior declaration.

MozReview-Commit-ID: C05YG6Nzh52

--HG--
extra : rebase_source : 3f78b6a1d73f4d59d3aac4b2da79c27cae404897
2017-09-25 10:55:10 +01:00
Philippe Normand 5b8e8cc97d Bug 1402824 - Include Linkedlist.h in LabeledEventQueue to fix non-unified build. r=billm
The LinkedList.h header is requires for the sSchedulerGroups variable
declaration.

MozReview-Commit-ID: 6T0WPKQER9S

--HG--
extra : rebase_source : 545e60bdec4e186a03cb20e342e561e104abcd98
2017-09-25 10:51:41 +01:00
Philippe Normand 7f9b32afd8 Bug 1402824 - Add missing includes in PrioritizedEventQueue to fix non-unified build. r=billm
InputEventStatistics::Get() requires the InputEventStatistics.h #include.
MakeScopeExit() requires the ScopeExit.h #include.
LabeledEventQueue.h is required for the PrioritizedEventQueue class.

MozReview-Commit-ID: 7gRwhV3YQXw

--HG--
extra : rebase_source : 54b56317b2876db2ed679e9f47ffb87fdf83cdd2
2017-09-25 10:50:04 +01:00
Philippe Normand 5008d0d827 Bug 1402824 - Include nsTArray.h in InputEventStatistics.h to fix non-unified build. r=smaug
The nsTArray type was used without prior declaration.

MozReview-Commit-ID: KMUgXO2kBIY

--HG--
extra : rebase_source : 671ffe885ae7220bff746d433f55196519d05b8c
2017-09-25 10:45:25 +01:00
Philippe Normand 342808b8f7 Bug 1402824 - Include nsIRunnable in EventQueue.cpp to fix non-unified build. r=billm
nsIRunnable was used without prior declaration.

MozReview-Commit-ID: CVEkaw6xBsC

--HG--
extra : rebase_source : 06c71dfada5e26725d7771284a9f400bf7b5fdd8
2017-09-25 10:43:30 +01:00
Philippe Normand 1c42fb2d93 Bug 1402824 - Add missing includes in CooperativeThreadPool to fix non-unified build. r=billm
nsCOMPtr and nsThreadPoolNaming types were used without prior
declaration.

MozReview-Commit-ID: Gt7gksujs13

--HG--
extra : rebase_source : 57bbdb4f0d7ae0789dfc095fd4b6c99ad780f1ad
2017-09-25 10:37:31 +01:00
Sebastian Hengst 937c786bbf Backed out changeset db56e6da54d3 (bug 1402824) 2017-09-26 10:38:43 +02:00
Sebastian Hengst 6571c9215d Backed out changeset 75e36b75f564 (bug 1402824) 2017-09-26 10:38:37 +02:00
Sebastian Hengst 600c5355d9 Backed out changeset 0ffa25137672 (bug 1402824) 2017-09-26 10:38:31 +02:00
Sebastian Hengst 8232763b0e Backed out changeset ef139c527822 (bug 1402824) 2017-09-26 10:38:26 +02:00
Sebastian Hengst c6bf3aad6d Backed out changeset 52d49783fdd0 (bug 1402824) 2017-09-26 10:38:20 +02:00
Sebastian Hengst 878a269886 Backed out changeset a414320a4559 (bug 1402824) 2017-09-26 10:38:15 +02:00
Sebastian Hengst a0c6f2e117 Backed out changeset 1ac08c6d8373 (bug 1402824) 2017-09-26 10:38:09 +02:00
Sebastian Hengst a4a4be50bb Backed out changeset e0dd9d0e8bc1 (bug 1402824) 2017-09-26 10:38:04 +02:00
Sebastian Hengst 8b5da0b224 Backed out changeset a3c51e77dccb (bug 1402824) 2017-09-26 10:37:58 +02:00
Sebastian Hengst 26d8084399 Backed out changeset c17cf6e4ee95 (bug 1402824) 2017-09-26 10:37:53 +02:00
Philippe Normand d6bf4142ea Bug 1402824 - Include nsComponentManagerUtils.h in nsThreadUtils.cpp to fix non-unified build. r=billm
do_CreateInstance was used without prior declaration.

MozReview-Commit-ID: 4LkXAcZytM7

--HG--
extra : rebase_source : ff47c25472aec22889b8f42822ac49091c3706cf
2017-09-25 11:01:25 +01:00
Philippe Normand 7c969f97d2 Bug 1402824 - Include LabeledEventQueue.h in ThreadEventQueue.cpp to fix non-unified build. r=billm
LabeledEventQueue was used without prior declaration.

MozReview-Commit-ID: 3aqGDb0cZFY

--HG--
extra : rebase_source : e247b49b646f714e38dedb6a93d1b499e01b0c5a
2017-09-25 10:59:47 +01:00
Philippe Normand 53ea2b86ed Bug 1402824 - Include AbstractThread in SystemGroup.cpp to fix non-unified build. r=billm
AbstractThread was used without prior declaration.

MozReview-Commit-ID: BmP83mmjX3b

--HG--
extra : rebase_source : 3687625921e1d5e589f8e59901f75bf72a8d4c91
2017-09-25 10:59:02 +01:00
Philippe Normand 7d356a9f14 Bug 1402824 - Include nsIThreadInteral.h in SynchronizedEventQueue to fix non-unified. r=billm
nsIThreadObserver (defined in nsIThreadInternal.h) was used without prior
declaration.

MozReview-Commit-ID: 9cSuERgUPtl

--HG--
extra : rebase_source : b7a3a47114680dbb69c9d0f17fa75ebbc8f444dc
2017-09-25 10:56:13 +01:00
Philippe Normand dc24f18589 Bug 1402824 - Add missing includes in Scheduler.h to fix non-unified build. r=billm
nsTArray and EventLoopActivation were used without prior declaration.

MozReview-Commit-ID: C05YG6Nzh52

--HG--
extra : rebase_source : e939b277fbeb11d82af21c077faecd82af0697c6
2017-09-25 10:55:10 +01:00
Philippe Normand 13921736ff Bug 1402824 - Include Linkedlist.h in LabeledEventQueue to fix non-unified build. r=billm
The LinkedList.h header is requires for the sSchedulerGroups variable
declaration.

MozReview-Commit-ID: 6T0WPKQER9S

--HG--
extra : rebase_source : 23f442b30d8a9160c08b52b38800e891748b4367
2017-09-25 10:51:41 +01:00
Philippe Normand c1b72ba6c8 Bug 1402824 - Add missing includes in PrioritizedEventQueue to fix non-unified build. r=billm
InputEventStatistics::Get() requires the InputEventStatistics.h #include.
MakeScopeExit() requires the ScopeExit.h #include.
LabeledEventQueue.h is required for the PrioritizedEventQueue class.

MozReview-Commit-ID: 7gRwhV3YQXw

--HG--
extra : rebase_source : a94bbd653143ead43a317ba6470beb6d99ab584d
2017-09-25 10:50:04 +01:00
Philippe Normand 406ccc819b Bug 1402824 - Include nsTArray.h in InputEventStatistics.h to fix non-unified build. r=smaug
The nsTArray type was used without prior declaration.

MozReview-Commit-ID: KMUgXO2kBIY

--HG--
extra : rebase_source : 3bdca144a43ef7353ef9a62f94dfdc6dc2adfcc0
2017-09-25 10:45:25 +01:00
Philippe Normand 23addbba2a Bug 1402824 - Include nsIRunnable in EventQueue.cpp to fix non-unified build. r=billm
nsIRunnable was used without prior declaration.

MozReview-Commit-ID: CVEkaw6xBsC

--HG--
extra : rebase_source : 95b377eda3befeed66f37e6833a680ae4333303c
2017-09-25 10:43:30 +01:00
Philippe Normand bf61a1b347 Bug 1402824 - Add missing includes in CooperativeThreadPool to fix non-unified build. r=billm
nsCOMPtr and nsThreadPoolNaming types were used without prior
declaration.

MozReview-Commit-ID: Gt7gksujs13

--HG--
extra : rebase_source : 18c5572548dc181ffe921154d9da00113a5e0090
2017-09-25 10:37:31 +01:00
Doug Thayer 2e2f55c74a Bug 1382440 - Fix CPUUsageWatcher on OSX and Linux r=froydnj
Properly enclose all relevant details of CPUUsageWatcher in ifdefs
which control whether it should be active or not. Additionally,
apparently clock_gettime is not defined on OSX prior to 10.12, so
this is failing to compile for OSX on the build server, but not
locally. However, clock_get_time and getrusage should cover our
use cases sufficiently.

MozReview-Commit-ID: Ffi6yXLb9gO

--HG--
extra : rebase_source : 84f9cf3b2074883dc6fe6d5a50ff27ffdb008a4f
2017-08-28 14:00:22 -07:00
Doug Thayer 8aae071723 Bug 1382440 - Watch CPU usage in BHR r=froydnj
We would like to be able to see if a given hang in BHR occurred
under high CPU load, as this is an indication that the hang is
of less use to us, since it's likely that the external CPU use
is more responsible for it.

The way this works is fairly simple. We get the system CPU usage
on a scale from 0 to 1, and we get the current process's CPU
usage, also on a scale from 0 to 1, and we subtract the latter
from the former. We then compare this value to a threshold, which
is 1 - (1 / p), where p is the number of (virtual) cores on the
machine. This threshold might need to be tuned, so that we
require an entire physical core in order to not annotate the hang,
but for now it seemed the most reasonable line in the sand.

I should note that this considers CPU usage in child or parent
processes as external. While we are responsible for that CPU usage,
it still indicates that the stack we receive from BHR is of little
value to us, since the source of the actual hang is external to
that stack.

MozReview-Commit-ID: JkG53zq1MdY

--HG--
extra : rebase_source : 16553a9b5eac0a73cd1619c6ee01fa177ca60e58
2017-07-24 13:46:09 -07:00
Andrew McCreight f3d6766f0e Bug 1394176 - Use default values for scheduler prefs if the parent process didn't send any. r=billm
In some unknown circumstance, possibly if the parent process has a
different version than the child process, the child does not receive
scheduler prefs, which makes it read out of an uninitialized local
variable. This can probably happen because the scheduler prefs are
checked before we do the ContentChild::Init version check. Bill also
suggested that the pref env var might be getting truncated.

This patch improves on the situation by using null for the prefs array
if none was sent, and falling back on the default values, which leave
the scheduler disabled.

This also checks that the pref string is at least long enough to avoid
a buffer overflow. Note that if the end of the string isn't an integer
we'll end up with an sPrefThreadCount of zero, which can't be good.

MozReview-Commit-ID: ByHLFMEpgyZ

--HG--
extra : rebase_source : 8f6368b88ec3746f4d1c7716a962bb2ac3c2f3b5
2017-08-29 10:30:03 -07:00
Sean V Kelley b24a6c913e Bug 1376858 - Use SystemGroup to label nsIThread::AsyncShutdown, r=billm
MozReview-Commit-ID: IDPE6zhEnVI

--HG--
extra : rebase_source : c6c47ba59dc983ba0747f4a222a88e9fbac3efb2
2017-08-27 18:58:54 -07:00
Andrew McCreight c06c75d418 Bug 1394655 - Don't call SetNextIdleDeadlineRef on beta or release. r=froydnj
MozReview-Commit-ID: sIO4thBdpq

--HG--
extra : rebase_source : a66b6372ab2effeb6ecc53b6eb170c117a9ba1df
2017-08-28 20:53:05 -07:00
Bill McCloskey f90a87caa9 Bug 1350432 - Initial Quantum DOM scheduler implementation, disabled by default (r=froydnj)
MozReview-Commit-ID: JWBxz3bwgwD
2017-08-25 10:28:23 -07:00
Bill McCloskey 2270017046 Bug 1350432 - Add MutexAutoLock::AssertOwns (r=froydnj)
MozReview-Commit-ID: KQGaHRFDxo4
2017-08-25 10:28:23 -07:00
Bill McCloskey 9cd553af84 Bug 1350432 - Remove mEventObservers to SynchronizedEventQueue (r=froydnj)
MozReview-Commit-ID: 8Xt1gdxFDr4
2017-08-25 10:28:23 -07:00
Bill McCloskey 8d0e884b2f Bug 1391850 - Allow IdleDispatch from any thread (r=smaug)
MozReview-Commit-ID: FWb48VV0do8
2017-08-25 10:28:23 -07:00
Bill McCloskey 587e22d043 Bug 1333962 - Add nsILabelableRunnable to label runnables like vsync (r=kanru)
MozReview-Commit-ID: FdvqV0LfFsz
2017-08-25 10:28:23 -07:00
Michael Layzell eab07b465e Bug 1393581 - Name all IdleTaskRunner runnables, r=smaug 2017-08-25 11:24:27 -04:00
Mike Hommey 615061e5be Bug 1392868 - Completely remove AutoCollectVsyncTelemetry on late beta. r=froydnj
The class, in practice, was already doing nothing in that case, but with
it being half #ifdef'ed on EARLY_BETA_OR_EARLIER, that led to build
failures for unused code on late beta. Just remove the class completely
on late beta.

--HG--
extra : rebase_source : 801b0b9bb9faf41270f72f616e720d5725e8b25c
2017-08-23 11:52:12 +09:00
Sebastian Hengst 99e5cb9c14 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: GSKVB94r7Kk
2017-08-23 16:29:51 +02:00
Andrew McCreight 2e0a92099c Bug 1392483 - ifdef out mNextIdleDeadline in a few more places. r=froydnj
MozReview-Commit-ID: D9bW4jEHlhl

--HG--
extra : rebase_source : a5a67943b389e5f54b80ee60ab2c60aa4d3f8205
2017-08-22 15:00:45 -07:00
Stone Shih 2c638fc04f Bug 1389314 Part2: Support enabling and disabling the input priority events in runtime. r=smaug.
MozReview-Commit-ID: 3a2TNVqguVb
2017-07-28 15:14:54 +08:00
Stone Shih 60d437ddc2 Bug 1389314 Part1: Rename event prioritization to input event queue. r=smaug.
MozReview-Commit-ID: 7wPWYwIjIet
2017-07-27 16:20:01 +08:00
Tom Ritter 2dbc80baea Bug 1392617 Fix comparison between signed and unsigned integer expressions r=aklotz
The return of these functions is actually (DWORD) –1

MozReview-Commit-ID: 112d6BTBt8O

--HG--
extra : rebase_source : f36ec05d9a1e85d4d2dd844d8024189971aaeb46
2017-08-22 06:35:12 -05:00
Bevis Tseng 88a5ee396a Bug 1392201 - Label nsThreadShutdownAckEvent. r=froydnj 2017-08-21 17:30:22 +08:00
Bill McCloskey e7ca33ec9e Bug 1391657 - Fix missing member initialization for input prioritization (r=mccr8)
MozReview-Commit-ID: AaleTbntJ7U
2017-08-18 14:18:07 -07:00
Carsten "Tomcat" Book 99aa3f8e70 Merge mozilla-central to mozilla-inbound 2017-08-17 13:13:10 +02:00
Bill McCloskey 12e61085ce Bug 1382922 - Fix build bustage on a CLOSED TREE
MozReview-Commit-ID: 2Ls9zhiXXgS
2017-08-16 21:11:59 -07:00
Bill McCloskey 9edd615af7 Bug 1382922 - Refactor event queue to allow multiple implementations (r=erahm)
This patch refactors the nsThread event queue to clean it up and to make it easier to restructure. The fundamental concepts are as follows:

Each nsThread will have a pointer to a refcounted SynchronizedEventQueue. A SynchronizedEQ takes care of doing the locking and condition variable work when posting and popping events. For the actual storage of events, it delegates to an AbstractEventQueue data structure. It keeps a UniquePtr to the AbstractEventQueue that it uses for storage.

Both SynchronizedEQ and AbstractEventQueue are abstract classes. There is only one concrete implementation of SynchronizedEQ in this patch, which is called ThreadEventQueue. ThreadEventQueue uses locks and condition variables to post and pop events the same way nsThread does. It also encapsulates the functionality that DOM workers need to implement their special event loops (PushEventQueue and PopEventQueue). In later Quantum DOM work, I plan to have another SynchronizedEQ implementation for the main thread, called SchedulerEventQueue. It will have special code for the cooperatively scheduling threads in Quantum DOM.

There are two concrete implementations of AbstractEventQueue in this patch: EventQueue and PrioritizedEventQueue. EventQueue replaces the old nsEventQueue. The other AbstractEventQueue implementation is PrioritizedEventQueue, which uses multiple queues for different event priorities.

The final major piece here is ThreadEventTarget, which splits some of the code for posting events out of nsThread. Eventually, my plan is for multiple cooperatively scheduled nsThreads to be able to share a ThreadEventTarget. In this patch, though, each nsThread has its own ThreadEventTarget. The class's purpose is just to collect some related code together.

One final note: I tried to avoid virtual dispatch overhead as much as possible. Calls to SynchronizedEQ methods do use virtual dispatch, since I plan to use different implementations for different threads with Quantum DOM. But all the calls to EventQueue methods should be non-virtual. Although the methods are declared virtual, all the classes used are final and the concrete classes involved should all be known through templatization.

MozReview-Commit-ID: 9Evtr9oIJvx
2017-08-16 20:55:43 -07:00
Chris Pearce f2902bdf82 Bug 1390406 - Remove unnecessary includes in dom/media/mediasource. r=jya
MozReview-Commit-ID: 1aTncGfBicu

--HG--
extra : rebase_source : 8ad085eb81d195732c385718c283b4752e5e3c80
2017-08-15 16:13:00 +12:00
Wes Kocher 22fd8d166d Backed out changeset 00e918528ce0 (bug 1388608) for build bustage a=backout CLOSED TREE
MozReview-Commit-ID: H6g0kvzH6tT
2017-08-16 16:22:30 -07:00
Kris Maglione ff1cab15a3 Bug 1388608: Add profiler labels for dispatching named runnables. r=mstange
MozReview-Commit-ID: 2vmVY38Kdll

--HG--
extra : rebase_source : 59415696d2d59becb541a950d4077ddebeeef3ca
extra : amend_source : 81c9b683e83abe370088e80716ea63d74c783700
2017-08-08 20:19:10 -07:00
Michael Layzell 65ece3dba5 Bug 1380081 - Part 11: Simplify the HangAnnotations abstraction, r=froydnj
HangAnnotations was very complex, required a separate allocation, and used this
unfortunate virtual interface implementation which made it harder to do
interesting things with it (such as serialize it over IPC).

This new implementation is much simpler and more concrete, making
HangAnnotations simply be a nsTArray<Annotation>. This also simplifies some of
the IPC code which was added in part 7.

MozReview-Commit-ID: EzaaxdHpW1t
2017-08-15 16:35:46 -04:00
Michael Layzell 916fbaa397 Bug 1380081 - Part 5: Add some helper methods to HangAnnotations, r=froydnj
These will be used to implement IPC serialization and deserialization of the
HangDetails object to send over IPC. This is a temporary measure as
HangAnnotations is rewritten in part 11.

MozReview-Commit-ID: 1WHNvhDrMF5
2017-08-15 16:35:06 -04:00
Michael Layzell b7564c8ece Bug 1380081 - Part 4: Move BHR into its own component, r=froydnj
MozReview-Commit-ID: 7TOGofAYM6W


--HG--
rename : xpcom/threads/BackgroundHangMonitor.cpp => toolkit/components/backgroundhangmonitor/BackgroundHangMonitor.cpp
rename : xpcom/threads/BackgroundHangMonitor.h => toolkit/components/backgroundhangmonitor/BackgroundHangMonitor.h
rename : toolkit/components/telemetry/ThreadHangStats.h => toolkit/components/backgroundhangmonitor/ThreadHangStats.h
rename : xpcom/threads/ThreadStackHelper.cpp => toolkit/components/backgroundhangmonitor/ThreadStackHelper.cpp
rename : xpcom/threads/ThreadStackHelper.h => toolkit/components/backgroundhangmonitor/ThreadStackHelper.h
rename : xpcom/threads/nsIHangDetails.idl => toolkit/components/backgroundhangmonitor/nsIHangDetails.idl
2017-08-15 16:35:00 -04:00
Michael Layzell cd973809f7 Bug 1380081 - Part 3: Remove the ThreadHangStats object and related code, r=froydnj
MozReview-Commit-ID: EtrktVmc3vP
2017-08-15 16:34:21 -04:00
Bill McCloskey 268004b056 Bug 1382172 - Compute names for all JS-implemented XPCOM objects (r=mrbkap)
MozReview-Commit-ID: 4kPbqOpGYnq
2017-08-14 22:42:42 -07:00
Phil Ringnalda 6bfeb0577d Backed out changeset c0c52209c8f2 (bug 1382172) for static build bustage
CLOSED TREE

MozReview-Commit-ID: 9GzjXjoIrp5
2017-08-14 22:23:57 -07:00
Bill McCloskey 96944ff355 Bug 1382172 - Compute names for all JS-implemented XPCOM objects (r=mrbkap)
MozReview-Commit-ID: 4kPbqOpGYnq
2017-08-14 21:10:14 -07:00
Michael Layzell ba3aeb0481 Bug 1365309 - Part 2: re-enable BHR on linux, r=froydnj
MozReview-Commit-ID: BtRZecG4IYA
2017-08-14 10:05:24 -04:00
Stone Shih 4e8f0045a9 Bug 1351148 Part10: nsChainedEventQueue::PutEvent should always put high priority event in mHighQueue. r=smaug.
MozReview-Commit-ID: H6TV9bdm6QM
2017-07-26 10:52:06 +08:00
Stone Shih 393c62eba7 Bug 1351148 Part3: Synthesize native input events with priority. f=kats,smaug. r=smaug.
The test helper_touch_action_regions.html uses nsDOMWindowUtils to synthesize native input events and creates some runnables to trigger the test. It expects the runnables which synthesize native input events are processed first, then the runnables to continue the test, and finally the input events are forwarded from chrome process to content process. Enabling event prioritization may change the execution order.
Wraps those runnables to synthesize native input events as priority=input and dispatches those runnables to continue the test with priority=input to make sure the execution order is as expected.

MozReview-Commit-ID: 8hkaB1FRW9T
2017-05-19 15:41:24 +08:00
Stone Shih de7f705042 Bug 1351148 Part2: Add a priority queue for input events. r=smaug.
MozReview-Commit-ID: 5ud1Ex9UNVo
2017-03-21 15:44:12 +08:00
Stone Shih 1467938d67 Bug 1351148 Part1: Add include header to TimerThread.h to fix compile errors. r=smaug.
MozReview-Commit-ID: 65UfFMwmSrm
2017-05-29 17:19:17 +08:00
Michael Layzell 8d41010aea Bug 1389252 - Disable BHR in beta, r=froydnj
MozReview-Commit-ID: K98DceJ2uHz
2017-08-11 17:50:13 -04:00
Wes Kocher cff9e9b197 Merge m-c to autoland, a=merge
MozReview-Commit-ID: 2YvHbITn9w3
2017-08-10 18:25:34 -07:00
Sylvestre Ledru 8c03b39a29 Bug 1387002 - Replace .size() by .empty() when applicable in xpcom/ r=froydnj
MozReview-Commit-ID: LWzpVGVV7Py

--HG--
extra : rebase_source : 1e3aa342a096afcdd194b1272ac693b225081599
2017-08-03 12:08:32 +02:00
Nathan Froyd 438b1b37eb Bug 1380619 - avoid unnecessary content process leaks in SchedulerGroup dispatch during shutdown; r=mystor
SchedulerGroup dispatch needs to replicate all the quirks of dispatching
directly to threads, which means we need to handle cases where dispatch
might have failed and we have resources that we don't want to leak.
2017-08-09 14:12:44 -04:00
Henry Chang 55356f4f83 Bug 1355746 - Part 2. Polish IdleTaskRunner and reuse it for background parsing. r=smaug
This patch is mainly to make IdleTaskRunner reusable by nsHtml5TreeOpExecutor.
The only necessary work to that purpose is to remove the dependency of
sShuttingDown, which was a static variable in nsJSEnvironment.cpp.
The idea is to have a "MayStopProcessing" as a callback for the consumer to
return sShuttingDown.

In addition to sShuttingDown, we use std::function<bool()> as the runner
main callback type.

MozReview-Commit-ID: FT2X1unSvPS

--HG--
extra : rebase_source : 3fe2d4f597f53e9a90f3dc8d5009df04240534ba
extra : intermediate-source : 41f6715c344ce26f7820cecb2544db8c50dca796
extra : source : 042f10937305e34245bdaf75dcb816db7738254e
2017-07-12 09:23:15 +08:00
Henry Chang fab3d4644c Bug 1355746 - Part 1. Rename CollectRunner to IdleTaskRunner and move to xpcom/threads/IdleTaskRunner.h/cpp r=smaug
Nothing is changed in this patch except for renaming and code move around.
The strategy is to have the final file setup in this patch without any
detail change. The actual code change will be in the next patch so that
we can focus on reviewing the diff in the next patch regarding IdleTaskRunner.

MozReview-Commit-ID: 4Bul9mZ7z1n

--HG--
extra : rebase_source : b978da3a3c68da58f9fd93502bcc4295acd699ce
extra : source : 833d4b69accbf7d1d60f9f11d807ee37d608b6fe
2017-08-07 13:50:47 +08:00
Bill McCloskey 75f4342e31 Bug 1364821 - Fix bustage
MozReview-Commit-ID: 3Z5A1FmvBm3
2017-08-03 15:17:11 -07:00
Bill McCloskey 5466ff7e51 Bug 1386893 - Update AbstractThread thread safety assertions to work with cooperative threading (r=jwwang)
MozReview-Commit-ID: 72xKyWOUXL5
2017-08-03 14:19:04 -07:00
Bill McCloskey 2273c53b75 Bug 1364821 - Introduce AbstractThread::AutoEnter and remove main thread's AbstractThread::GetCurrent() (r=jwwang)
MozReview-Commit-ID: FSLVn7xe3sq
2017-08-03 14:19:02 -07:00
Nicholas Nethercote 08e54b7c13 Bug 1384819 (part 1) - Split MozStackWalk(). r=glandium.
MozStackWalk() is different on Windows to the other platforms. It has two extra
arguments, which can be used to walk the stack of a different thread.

This patch makes those differences clearer. Instead of having a single function
and forbidding those two arguments on non-Windows, it removes those arguments
from MozStackWalk, and splits off MozStackWalkThread() which retains them. This
also allows those arguments to have more appropriate types (HANDLE instead of
uintptr_t; CONTEXT* instead of than void*) and names (aContext instead of
aPlatformData).

The patch also removes unnecessary reinterpret_casts for the aClosure argument
at a couple of MozStackWalk() callsites.

--HG--
extra : rebase_source : 111ab7d6426d7be921facc2264f6db86c501d127
2017-07-27 12:46:47 +10:00
Eric Rahm 5aeb1f0c4b Bug 1369002 - Stop warning if the mainThread is null in GetCurrentThread. r=froydnj 2017-06-20 09:51:29 -07:00
Nicholas Nethercote 72c884bf74 Bug 1384835 (part 3, attempt 2) - Remove the Preferences::Get*CString() variants that return nsAdoptingCString. r=froydnj.
--HG--
extra : rebase_source : d317b25be2ec21d1a60d25da3689e46cdce0b649
2017-07-31 14:28:48 +10:00
Bill McCloskey 55f153be76 Bug 1383328 - Use TabGroup as event target for browser-status-filter (r=smaug)
MozReview-Commit-ID: HOSmqr5Vpwh
2017-07-28 13:11:59 -07:00
Bill McCloskey c6c1f4bbc9 Bug 1385413 - Remove thread parameter from onDispatchedEvent (r=erahm)
This parameter isn't used by any implementation of onDispatchedEvent,
and keeping the parameter makes later refactorings in this bug more difficult.

MozReview-Commit-ID: 90VY2vYtwCW
2017-07-28 13:09:06 -07:00
Sebastian Hengst 744a0a216b Backed out changeset ef5feef07bed (bug 1384835) 2017-07-28 10:29:24 +02:00
Carsten "Tomcat" Book 28bdd40776 Merge mozilla-central to mozilla-inbound 2017-07-28 09:48:24 +02:00
Carsten "Tomcat" Book c24a288e9a Backed out changeset 420d9e53c959 (bug 1351148) for causing regressions / on request from stone 2017-07-28 09:20:54 +02:00
Carsten "Tomcat" Book de369deb98 Backed out changeset 284af26c1b53 (bug 1351148) 2017-07-28 09:20:27 +02:00
Carsten "Tomcat" Book 6ddad46b40 Backed out changeset 1662b38e3107 (bug 1351148) 2017-07-28 09:20:23 +02:00