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

Side by Side Diff: third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc

Issue 2818533003: Make nesting/running states a RunLoop rather than a MessageLoop concept. (Closed)
Patch Set: still need to check MessageLoop::current() in Mojo's RunLoopNestingObserver::GetForThread() Created 3 years, 7 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/scheduler/renderer/renderer_scheduler_impl.h" 5 #include "platform/scheduler/renderer/renderer_scheduler_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/stack_trace.h" 8 #include "base/debug/stack_trace.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 1796 matching lines...) Expand 10 before | Expand all | Expand 10 after
1807 start_time_ticks, end_time_ticks); 1807 start_time_ticks, end_time_ticks);
1808 // TODO(altimin): Per-page metrics should also be considered. 1808 // TODO(altimin): Per-page metrics should also be considered.
1809 UMA_HISTOGRAM_CUSTOM_COUNTS( 1809 UMA_HISTOGRAM_CUSTOM_COUNTS(
1810 "RendererScheduler.TaskTime", 1810 "RendererScheduler.TaskTime",
1811 (end_time_ticks - start_time_ticks).InMicroseconds(), 1, 1000000, 50); 1811 (end_time_ticks - start_time_ticks).InMicroseconds(), 1, 1000000, 50);
1812 UMA_HISTOGRAM_ENUMERATION("RendererScheduler.NumberOfTasksPerQueueType", 1812 UMA_HISTOGRAM_ENUMERATION("RendererScheduler.NumberOfTasksPerQueueType",
1813 static_cast<int>(task_queue->GetQueueType()), 1813 static_cast<int>(task_queue->GetQueueType()),
1814 static_cast<int>(TaskQueue::QueueType::COUNT)); 1814 static_cast<int>(TaskQueue::QueueType::COUNT));
1815 } 1815 }
1816 1816
1817 void RendererSchedulerImpl::OnBeginNestedMessageLoop() { 1817 void RendererSchedulerImpl::OnBeginNestedRunLoop() {
1818 seqlock_queueing_time_estimator_.seqlock.WriteBegin(); 1818 seqlock_queueing_time_estimator_.seqlock.WriteBegin();
1819 seqlock_queueing_time_estimator_.data.OnBeginNestedMessageLoop(); 1819 seqlock_queueing_time_estimator_.data.OnBeginNestedRunLoop();
1820 seqlock_queueing_time_estimator_.seqlock.WriteEnd(); 1820 seqlock_queueing_time_estimator_.seqlock.WriteEnd();
1821 } 1821 }
1822 1822
1823 void RendererSchedulerImpl::AddTaskTimeObserver( 1823 void RendererSchedulerImpl::AddTaskTimeObserver(
1824 TaskTimeObserver* task_time_observer) { 1824 TaskTimeObserver* task_time_observer) {
1825 helper_.AddTaskTimeObserver(task_time_observer); 1825 helper_.AddTaskTimeObserver(task_time_observer);
1826 } 1826 }
1827 1827
1828 void RendererSchedulerImpl::RemoveTaskTimeObserver( 1828 void RendererSchedulerImpl::RemoveTaskTimeObserver(
1829 TaskTimeObserver* task_time_observer) { 1829 TaskTimeObserver* task_time_observer) {
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1957 case TimeDomainType::VIRTUAL: 1957 case TimeDomainType::VIRTUAL:
1958 return "virtual"; 1958 return "virtual";
1959 default: 1959 default:
1960 NOTREACHED(); 1960 NOTREACHED();
1961 return nullptr; 1961 return nullptr;
1962 } 1962 }
1963 } 1963 }
1964 1964
1965 } // namespace scheduler 1965 } // namespace scheduler
1966 } // namespace blink 1966 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698