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

21 Коммитов

Автор SHA1 Сообщение Дата
Randell Jesup 6835880244 Bug 1597728: Make EventQueue support templatization for queue page size r=froydnj
Most event queues don't ever get many events queued at one time, but the
MainThread Input and Normal queues may.

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

--HG--
extra : moz-landing-system : lando
2019-11-21 03:47:19 +00:00
Randell Jesup 64e6884811 Bug 1595707: don't record event submission times when the profiler isn't running r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D53910

--HG--
extra : moz-landing-system : lando
2019-11-21 03:46:59 +00:00
Randell Jesup 6cc1163786 Bug 1572337: Monitor running event delays and start times r=froydnj
This lets us determine the time that an event has been running, and the time
that the event spent queued - which can be used to figure out 'jank' at the
time the event was queued. For PrioritizedEventQueues, only if such queuing
would delay an input event then the queuing delay is reported.

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

--HG--
extra : moz-landing-system : lando
2019-11-08 21:07:36 +00:00
Razvan Maries cb87085ec4 Backed out 3 changesets (bug 1572337) ford perma fails. CLOSED TREE
Backed out changeset 00da7156d3fa (bug 1572337)
Backed out changeset 4eda65e054d8 (bug 1572337)
Backed out changeset ea6d5b4b038b (bug 1572337)
2019-11-07 17:29:46 +02:00
Randell Jesup 10353eba91 Bug 1572337: Monitor running event delays and start times r=froydnj
This lets us determine the time that an event has been running, and the time
that the event spent queued - which can be used to figure out 'jank' at the
time the event was queued. For PrioritizedEventQueues, only if such queuing
would delay an input event then the queuing delay is reported.

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

--HG--
extra : moz-landing-system : lando
2019-11-07 12:53:28 +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
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 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
Randell Jesup 5193189385 Bug 1522150: Rename EventPriority to EventQueuePriority to avoid name conflict with MacOS r=froyd 2019-01-26 12:18:05 -05:00
Olli Pettay 7a31419242 Bug 1518038 - Add nsIThread.hasPendingHighPriorityEvents, r=froydnj
--HG--
extra : rebase_source : 47de7758f551bfe873426c8f92e27ac84ad4d260
2019-01-10 19:07:34 +02:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Kris Maglione 9b66e8f0f3 Bug 1477512: Part 1 - Add memory reporter functions to thread event queues. r=erahm
MozReview-Commit-ID: J4EdwUWfyPK

--HG--
extra : rebase_source : 4731cec2d04531d6b519fc076cb53f962b4f9f6f
2018-07-21 14:16:50 -07: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
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
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
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
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
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
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