OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "config.h" |
| 6 #include "platform/scheduler/TracedTask.h" |
| 7 |
| 8 #include "platform/TraceEvent.h" |
| 9 |
| 10 namespace blink { |
| 11 |
| 12 void TracedTask::run() const |
| 13 { |
| 14 TRACE_EVENT_FLOW_END0("blink", m_name, TRACE_ID_MANGLE(m_FlowTraceID)); |
| 15 |
| 16 TRACE_EVENT2("blink", m_name, |
| 17 "src_file", m_location.fileName(), |
| 18 "src_func", m_location.functionName()); |
| 19 |
| 20 m_task(); |
| 21 } |
| 22 |
| 23 TracedTask::TracedTask(const Task& task, const TraceLocation& location, const ch
ar* name, int flowTraceID) |
| 24 : m_FlowTraceID(flowTraceID) |
| 25 , m_task(task) |
| 26 , m_location(location) |
| 27 , m_name(name) |
| 28 { |
| 29 TRACE_EVENT_FLOW_BEGIN2("blink", m_name, TRACE_ID_MANGLE(m_FlowTraceID), |
| 30 "src_file", m_location.fileName(), |
| 31 "src_func", m_location.functionName()); |
| 32 } |
| 33 |
| 34 |
| 35 } // namespace blink |
OLD | NEW |