| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 // This file contains the Windows-specific exporting to ETW. | 5 // This file contains the Windows-specific exporting to ETW. |
| 6 #ifndef BASE_TRACE_EVENT_TRACE_EVENT_ETW_EXPORT_WIN_H_ | 6 #ifndef BASE_TRACE_EVENT_TRACE_EVENT_ETW_EXPORT_WIN_H_ |
| 7 #define BASE_TRACE_EVENT_TRACE_EVENT_ETW_EXPORT_WIN_H_ | 7 #define BASE_TRACE_EVENT_TRACE_EVENT_ETW_EXPORT_WIN_H_ |
| 8 | 8 |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 // TraceLog::AddTraceEventWithThreadIdAndTimestamp to export internal events. | 43 // TraceLog::AddTraceEventWithThreadIdAndTimestamp to export internal events. |
| 44 static void AddEvent( | 44 static void AddEvent( |
| 45 char phase, | 45 char phase, |
| 46 const unsigned char* category_group_enabled, | 46 const unsigned char* category_group_enabled, |
| 47 const char* name, | 47 const char* name, |
| 48 unsigned long long id, | 48 unsigned long long id, |
| 49 int num_args, | 49 int num_args, |
| 50 const char** arg_names, | 50 const char** arg_names, |
| 51 const unsigned char* arg_types, | 51 const unsigned char* arg_types, |
| 52 const unsigned long long* arg_values, | 52 const unsigned long long* arg_values, |
| 53 const scoped_ptr<ConvertableToTraceFormat>* convertable_values); | 53 const std::unique_ptr<ConvertableToTraceFormat>* convertable_values); |
| 54 | 54 |
| 55 // Exports an ETW event that marks the end of a complete event. | 55 // Exports an ETW event that marks the end of a complete event. |
| 56 static void AddCompleteEndEvent(const char* name); | 56 static void AddCompleteEndEvent(const char* name); |
| 57 | 57 |
| 58 // Returns true if any category in the group is enabled. | 58 // Returns true if any category in the group is enabled. |
| 59 static bool IsCategoryGroupEnabled(const char* category_group_name); | 59 static bool IsCategoryGroupEnabled(const char* category_group_name); |
| 60 | 60 |
| 61 private: | 61 private: |
| 62 // Ensure only the provider can construct us. | 62 // Ensure only the provider can construct us. |
| 63 friend struct StaticMemorySingletonTraits<TraceEventETWExport>; | 63 friend struct StaticMemorySingletonTraits<TraceEventETWExport>; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 80 bool etw_export_enabled_; | 80 bool etw_export_enabled_; |
| 81 | 81 |
| 82 // Maps category names to their status (enabled/disabled). | 82 // Maps category names to their status (enabled/disabled). |
| 83 std::map<StringPiece, bool> categories_status_; | 83 std::map<StringPiece, bool> categories_status_; |
| 84 | 84 |
| 85 // Local copy of the ETW keyword. | 85 // Local copy of the ETW keyword. |
| 86 uint64_t etw_match_any_keyword_; | 86 uint64_t etw_match_any_keyword_; |
| 87 | 87 |
| 88 // Background thread that monitors changes to the ETW keyword and updates | 88 // Background thread that monitors changes to the ETW keyword and updates |
| 89 // the enabled categories when a change occurs. | 89 // the enabled categories when a change occurs. |
| 90 scoped_ptr<ETWKeywordUpdateThread> keyword_update_thread_; | 90 std::unique_ptr<ETWKeywordUpdateThread> keyword_update_thread_; |
| 91 PlatformThreadHandle keyword_update_thread_handle_; | 91 PlatformThreadHandle keyword_update_thread_handle_; |
| 92 | 92 |
| 93 DISALLOW_COPY_AND_ASSIGN(TraceEventETWExport); | 93 DISALLOW_COPY_AND_ASSIGN(TraceEventETWExport); |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 } // namespace trace_event | 96 } // namespace trace_event |
| 97 } // namespace base | 97 } // namespace base |
| 98 | 98 |
| 99 #endif // BASE_TRACE_EVENT_TRACE_EVENT_ETW_EXPORT_WIN_H_ | 99 #endif // BASE_TRACE_EVENT_TRACE_EVENT_ETW_EXPORT_WIN_H_ |
| OLD | NEW |