| 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> |
| 10 |
| 9 #include <map> | 11 #include <map> |
| 10 | 12 |
| 11 #include "base/base_export.h" | 13 #include "base/base_export.h" |
| 14 #include "base/macros.h" |
| 12 #include "base/strings/string_piece.h" | 15 #include "base/strings/string_piece.h" |
| 13 #include "base/trace_event/trace_event_impl.h" | 16 #include "base/trace_event/trace_event_impl.h" |
| 14 | 17 |
| 15 namespace base { | 18 namespace base { |
| 16 | 19 |
| 17 template <typename Type> | 20 template <typename Type> |
| 18 struct StaticMemorySingletonTraits; | 21 struct StaticMemorySingletonTraits; |
| 19 | 22 |
| 20 namespace trace_event { | 23 namespace trace_event { |
| 21 | 24 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 // keyword. | 76 // keyword. |
| 74 static void UpdateETWKeyword(); | 77 static void UpdateETWKeyword(); |
| 75 | 78 |
| 76 // True if ETW is enabled. Allows hiding the exporting behind a flag. | 79 // True if ETW is enabled. Allows hiding the exporting behind a flag. |
| 77 bool etw_export_enabled_; | 80 bool etw_export_enabled_; |
| 78 | 81 |
| 79 // Maps category names to their status (enabled/disabled). | 82 // Maps category names to their status (enabled/disabled). |
| 80 std::map<StringPiece, bool> categories_status_; | 83 std::map<StringPiece, bool> categories_status_; |
| 81 | 84 |
| 82 // Local copy of the ETW keyword. | 85 // Local copy of the ETW keyword. |
| 83 uint64 etw_match_any_keyword_; | 86 uint64_t etw_match_any_keyword_; |
| 84 | 87 |
| 85 // Background thread that monitors changes to the ETW keyword and updates | 88 // Background thread that monitors changes to the ETW keyword and updates |
| 86 // the enabled categories when a change occurs. | 89 // the enabled categories when a change occurs. |
| 87 scoped_ptr<ETWKeywordUpdateThread> keyword_update_thread_; | 90 scoped_ptr<ETWKeywordUpdateThread> keyword_update_thread_; |
| 88 PlatformThreadHandle keyword_update_thread_handle_; | 91 PlatformThreadHandle keyword_update_thread_handle_; |
| 89 | 92 |
| 90 DISALLOW_COPY_AND_ASSIGN(TraceEventETWExport); | 93 DISALLOW_COPY_AND_ASSIGN(TraceEventETWExport); |
| 91 }; | 94 }; |
| 92 | 95 |
| 93 } // namespace trace_event | 96 } // namespace trace_event |
| 94 } // namespace base | 97 } // namespace base |
| 95 | 98 |
| 96 #endif // BASE_TRACE_EVENT_TRACE_EVENT_ETW_EXPORT_WIN_H_ | 99 #endif // BASE_TRACE_EVENT_TRACE_EVENT_ETW_EXPORT_WIN_H_ |
| OLD | NEW |