Commit a0dacdac authored by Kenneth Russell's avatar Kenneth Russell Committed by Commit Bot

Revert "[scheduler] Add task type and queue type to tracing."

This reverts commit 775612b8.

Reason for revert: caused all Windows debug bots to fail almost all tests. Only one example:
https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Win7%20Tests%20%28dbg%29%281%29/70380

Original change's description:
> [scheduler] Add task type and queue type to tracing.
> 
> R=​skyostil@chromium.org
> 
> Change-Id: Id0aea377558e876c8178e82eb3a170f678c415cc
> Reviewed-on: https://chromium-review.googlesource.com/1140717
> Commit-Queue: Alexander Timin <altimin@chromium.org>
> Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#576201}

TBR=skyostil@chromium.org,altimin@chromium.org

Change-Id: I56291cf103d5626c963c2661c4cdca7c29d74476
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/1142173Reviewed-by: default avatarKenneth Russell <kbr@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576279}
parent 77922074
...@@ -293,22 +293,6 @@ void SequenceManagerImpl::SetNextDelayedDoWork(LazyNow* lazy_now, ...@@ -293,22 +293,6 @@ void SequenceManagerImpl::SetNextDelayedDoWork(LazyNow* lazy_now,
} }
Optional<PendingTask> SequenceManagerImpl::TakeTask() { Optional<PendingTask> SequenceManagerImpl::TakeTask() {
Optional<PendingTask> task = TakeTaskImpl();
ExecutingTask& executing_task =
*main_thread_only().task_execution_stack.rbegin();
// It's important that there are no active trace events here which will
// terminate before we finish executing the task.
TRACE_EVENT_BEGIN2(TRACE_DISABLED_BY_DEFAULT("sequence_manager"),
"SequenceManager::RunTask", "queue_type",
executing_task.task_queue->GetName(), "task_type",
executing_task.task_type);
return task;
}
Optional<PendingTask> SequenceManagerImpl::TakeTaskImpl() {
CHECK(Validate()); CHECK(Validate());
DCHECK_CALLED_ON_VALID_THREAD(main_thread_checker_); DCHECK_CALLED_ON_VALID_THREAD(main_thread_checker_);
...@@ -373,7 +357,6 @@ Optional<PendingTask> SequenceManagerImpl::TakeTaskImpl() { ...@@ -373,7 +357,6 @@ Optional<PendingTask> SequenceManagerImpl::TakeTaskImpl() {
ExecutingTask& executing_task = ExecutingTask& executing_task =
*main_thread_only().task_execution_stack.rbegin(); *main_thread_only().task_execution_stack.rbegin();
NotifyWillProcessTask(&executing_task, &lazy_now); NotifyWillProcessTask(&executing_task, &lazy_now);
return std::move(executing_task.pending_task); return std::move(executing_task.pending_task);
} }
} }
...@@ -382,10 +365,6 @@ void SequenceManagerImpl::DidRunTask() { ...@@ -382,10 +365,6 @@ void SequenceManagerImpl::DidRunTask() {
LazyNow lazy_now(controller_->GetClock()); LazyNow lazy_now(controller_->GetClock());
ExecutingTask& executing_task = ExecutingTask& executing_task =
*main_thread_only().task_execution_stack.rbegin(); *main_thread_only().task_execution_stack.rbegin();
TRACE_EVENT_END0(TRACE_DISABLED_BY_DEFAULT("sequence_manager"),
"SequenceManagerImpl::RunTask");
NotifyDidProcessTask(&executing_task, &lazy_now); NotifyDidProcessTask(&executing_task, &lazy_now);
main_thread_only().task_execution_stack.pop_back(); main_thread_only().task_execution_stack.pop_back();
......
...@@ -171,20 +171,16 @@ class BASE_EXPORT SequenceManagerImpl ...@@ -171,20 +171,16 @@ class BASE_EXPORT SequenceManagerImpl
// selector interface is unaware of those. This struct keeps track off all // selector interface is unaware of those. This struct keeps track off all
// task related state needed to make pairs of TakeTask() / DidRunTask() work. // task related state needed to make pairs of TakeTask() / DidRunTask() work.
struct ExecutingTask { struct ExecutingTask {
ExecutingTask(internal::TaskQueueImpl::Task&& task, ExecutingTask(internal::TaskQueueImpl::Task&& pending_task,
internal::TaskQueueImpl* task_queue, internal::TaskQueueImpl* task_queue,
TaskQueue::TaskTiming task_timing) TaskQueue::TaskTiming task_timing)
: pending_task(std::move(task)), : pending_task(std::move(pending_task)),
task_queue(task_queue), task_queue(task_queue),
task_timing(task_timing), task_timing(task_timing) {}
task_type(pending_task.task_type()) {}
internal::TaskQueueImpl::Task pending_task; internal::TaskQueueImpl::Task pending_task;
internal::TaskQueueImpl* task_queue = nullptr; internal::TaskQueueImpl* task_queue = nullptr;
TaskQueue::TaskTiming task_timing; TaskQueue::TaskTiming task_timing;
// Save task metadata to use in after running a task as |pending_task|
// won't be available then.
int task_type;
}; };
struct MainThreadOnly { struct MainThreadOnly {
...@@ -290,10 +286,6 @@ class BASE_EXPORT SequenceManagerImpl ...@@ -290,10 +286,6 @@ class BASE_EXPORT SequenceManagerImpl
bool ShouldRecordCPUTimeForTask(); bool ShouldRecordCPUTimeForTask();
// Helper to terminate all scoped trace events to allow starting new ones
// in TakeTask().
Optional<PendingTask> TakeTaskImpl();
// Determines if wall time or thread time should be recorded for the next // Determines if wall time or thread time should be recorded for the next
// task. // task.
TaskQueue::TaskTiming InitializeTaskTiming( TaskQueue::TaskTiming InitializeTaskTiming(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment