| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/trace_event_impl.h" | 5 #include "base/debug/trace_event_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 1683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1694 const char* name, | 1694 const char* name, |
| 1695 unsigned long long id, | 1695 unsigned long long id, |
| 1696 int thread_id, | 1696 int thread_id, |
| 1697 const TimeTicks& timestamp, | 1697 const TimeTicks& timestamp, |
| 1698 int num_args, | 1698 int num_args, |
| 1699 const char** arg_names, | 1699 const char** arg_names, |
| 1700 const unsigned char* arg_types, | 1700 const unsigned char* arg_types, |
| 1701 const unsigned long long* arg_values, | 1701 const unsigned long long* arg_values, |
| 1702 const scoped_refptr<ConvertableToTraceFormat>* convertable_values, | 1702 const scoped_refptr<ConvertableToTraceFormat>* convertable_values, |
| 1703 unsigned char flags) { | 1703 unsigned char flags) { |
| 1704 #if defined (OS_WIN) |
| 1705 TraceEventETWProvider::TraceWithArgs( |
| 1706 GetCategoryGroupName(category_group_enabled), name, phase, |
| 1707 id, num_args, arg_names, arg_types, arg_values, convertable_values); |
| 1708 #endif |
| 1709 |
| 1704 TraceEventHandle handle = { 0, 0, 0 }; | 1710 TraceEventHandle handle = { 0, 0, 0 }; |
| 1705 if (!*category_group_enabled) | 1711 if (!*category_group_enabled) |
| 1706 return handle; | 1712 return handle; |
| 1707 | 1713 |
| 1708 // Avoid re-entrance of AddTraceEvent. This may happen in GPU process when | 1714 // Avoid re-entrance of AddTraceEvent. This may happen in GPU process when |
| 1709 // ECHO_TO_CONSOLE is enabled: AddTraceEvent -> LOG(ERROR) -> | 1715 // ECHO_TO_CONSOLE is enabled: AddTraceEvent -> LOG(ERROR) -> |
| 1710 // GpuProcessLogMessageHandler -> PostPendingTask -> TRACE_EVENT ... | 1716 // GpuProcessLogMessageHandler -> PostPendingTask -> TRACE_EVENT ... |
| 1711 if (thread_is_in_trace_event_.Get()) | 1717 if (thread_is_in_trace_event_.Get()) |
| 1712 return handle; | 1718 return handle; |
| 1713 | 1719 |
| (...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2322 } | 2328 } |
| 2323 | 2329 |
| 2324 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() { | 2330 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() { |
| 2325 if (*category_group_enabled_) { | 2331 if (*category_group_enabled_) { |
| 2326 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_, | 2332 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_, |
| 2327 name_, event_handle_); | 2333 name_, event_handle_); |
| 2328 } | 2334 } |
| 2329 } | 2335 } |
| 2330 | 2336 |
| 2331 } // namespace trace_event_internal | 2337 } // namespace trace_event_internal |
| OLD | NEW |