Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(679)

Unified Diff: content/renderer/scheduler/renderer_task_queue_selector.h

Issue 681793003: scheduler: Add support for tracing scheduler state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/scheduler/renderer_task_queue_selector.h
diff --git a/content/renderer/scheduler/renderer_task_queue_selector.h b/content/renderer/scheduler/renderer_task_queue_selector.h
index 085a628fd545de468e2f9593cd7240168c9dece1..b2f69ffeb7abcc482378508c284f8a29252bfcc7 100644
--- a/content/renderer/scheduler/renderer_task_queue_selector.h
+++ b/content/renderer/scheduler/renderer_task_queue_selector.h
@@ -55,6 +55,7 @@ class CONTENT_EXPORT RendererTaskQueueSelector
void RegisterWorkQueues(
const std::vector<const base::TaskQueue*>& work_queues) override;
bool SelectWorkQueueToService(size_t* out_queue_index) override;
+ void AsValueInto(base::debug::TracedValue* state) const override;
private:
// Returns true if queueA contains an older task than queueB.
@@ -64,6 +65,8 @@ class CONTENT_EXPORT RendererTaskQueueSelector
// Returns the priority which is next after |priority|.
static QueuePriority NextPriority(QueuePriority priority);
+ static const char* PriorityToString(QueuePriority priority);
+
// Return true if |out_queue_index| indicates the index of the queue with
// the oldest pending task from the set of queues of |priority|, or
// false if all queues of that priority are empty.
@@ -74,6 +77,10 @@ class CONTENT_EXPORT RendererTaskQueueSelector
bool QueueEnabledWithPriority(size_t queue_index,
QueuePriority priority) const;
+ // Called whenever the selector chooses a task queue for execution with the
+ // priority |priority|.
+ void DidSelectQueueWithPriority(QueuePriority priority);
+
// Number of high priority tasks which can be run before a normal priority
// task should be selected to prevent starvation.
// TODO(rmcilroy): Check if this is a good value.
« no previous file with comments | « content/renderer/scheduler/renderer_scheduler_impl.cc ('k') | content/renderer/scheduler/renderer_task_queue_selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698