OLD | NEW |
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 "base/debug/task_annotator.h" | 5 #include "base/debug/task_annotator.h" |
6 | 6 |
7 #include "base/debug/alias.h" | 7 #include "base/debug/alias.h" |
8 #include "base/debug/trace_event.h" | |
9 #include "base/pending_task.h" | 8 #include "base/pending_task.h" |
| 9 #include "base/trace_event/trace_event.h" |
10 #include "base/tracked_objects.h" | 10 #include "base/tracked_objects.h" |
11 | 11 |
12 namespace base { | 12 namespace base { |
13 namespace debug { | 13 namespace debug { |
14 | 14 |
15 TaskAnnotator::TaskAnnotator() { | 15 TaskAnnotator::TaskAnnotator() { |
16 } | 16 } |
17 | 17 |
18 TaskAnnotator::~TaskAnnotator() { | 18 TaskAnnotator::~TaskAnnotator() { |
19 } | 19 } |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 pending_task, stopwatch); | 67 pending_task, stopwatch); |
68 } | 68 } |
69 | 69 |
70 uint64 TaskAnnotator::GetTaskTraceID(const PendingTask& task) const { | 70 uint64 TaskAnnotator::GetTaskTraceID(const PendingTask& task) const { |
71 return (static_cast<uint64>(task.sequence_num) << 32) | | 71 return (static_cast<uint64>(task.sequence_num) << 32) | |
72 ((static_cast<uint64>(reinterpret_cast<intptr_t>(this)) << 32) >> 32); | 72 ((static_cast<uint64>(reinterpret_cast<intptr_t>(this)) << 32) >> 32); |
73 } | 73 } |
74 | 74 |
75 } // namespace debug | 75 } // namespace debug |
76 } // namespace base | 76 } // namespace base |
OLD | NEW |