Chromium Code Reviews| 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 #ifndef BASE_TRACE_EVENT_TRACE_LOG_H_ | 5 #ifndef BASE_TRACE_EVENT_TRACE_LOG_H_ |
| 6 #define BASE_TRACE_EVENT_TRACE_LOG_H_ | 6 #define BASE_TRACE_EVENT_TRACE_LOG_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 // The pointer returned from GetCategoryGroupEnabledInternal() points to a | 53 // The pointer returned from GetCategoryGroupEnabledInternal() points to a |
| 54 // value with zero or more of the following bits. Used in this class only. | 54 // value with zero or more of the following bits. Used in this class only. |
| 55 // The TRACE_EVENT macros should only use the value as a bool. | 55 // The TRACE_EVENT macros should only use the value as a bool. |
| 56 // These values must be in sync with macro values in TraceEvent.h in Blink. | 56 // These values must be in sync with macro values in TraceEvent.h in Blink. |
| 57 enum CategoryGroupEnabledFlags { | 57 enum CategoryGroupEnabledFlags { |
| 58 // Category group enabled for the recording mode. | 58 // Category group enabled for the recording mode. |
| 59 ENABLED_FOR_RECORDING = 1 << 0, | 59 ENABLED_FOR_RECORDING = 1 << 0, |
| 60 // Category group enabled by SetEventCallbackEnabled(). | 60 // Category group enabled by SetEventCallbackEnabled(). |
| 61 ENABLED_FOR_EVENT_CALLBACK = 1 << 2, | 61 ENABLED_FOR_EVENT_CALLBACK = 1 << 2, |
| 62 // Category group enabled to export events to ETW. | 62 // Category group enabled to export events to ETW. |
| 63 ENABLED_FOR_ETW_EXPORT = 1 << 3 | 63 ENABLED_FOR_ETW_EXPORT = 1 << 3, |
| 64 // Category group enabled for heap profiling. | |
| 65 ENABLED_FOR_HEAP_PROFILING = 1 << 4, | |
|
fmeawad
2016/04/01 15:54:46
nit: maybe ENABLED_FOR_PROFILING, the name should
| |
| 66 // Enabled for any of the non-profiling modes. | |
| 67 ENABLED_FOR_NON_PROFILING_MODE = ENABLED_FOR_RECORDING | | |
|
fmeawad
2016/04/01 15:54:46
nit: maybe ENABLED_FOR_TRACING
| |
| 68 ENABLED_FOR_EVENT_CALLBACK | | |
| 69 ENABLED_FOR_ETW_EXPORT | |
| 64 }; | 70 }; |
| 65 | 71 |
| 66 static TraceLog* GetInstance(); | 72 static TraceLog* GetInstance(); |
| 67 | 73 |
| 68 // Get set of known category groups. This can change as new code paths are | 74 // Get set of known category groups. This can change as new code paths are |
| 69 // reached. The known category groups are inserted into |category_groups|. | 75 // reached. The known category groups are inserted into |category_groups|. |
| 70 void GetKnownCategoryGroups(std::vector<std::string>* category_groups); | 76 void GetKnownCategoryGroups(std::vector<std::string>* category_groups); |
| 71 | 77 |
| 72 // Retrieves a copy (for thread-safety) of the current TraceConfig. | 78 // Retrieves a copy (for thread-safety) of the current TraceConfig. |
| 73 TraceConfig GetCurrentTraceConfig() const; | 79 TraceConfig GetCurrentTraceConfig() const; |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 497 subtle::AtomicWord generation_; | 503 subtle::AtomicWord generation_; |
| 498 bool use_worker_thread_; | 504 bool use_worker_thread_; |
| 499 | 505 |
| 500 DISALLOW_COPY_AND_ASSIGN(TraceLog); | 506 DISALLOW_COPY_AND_ASSIGN(TraceLog); |
| 501 }; | 507 }; |
| 502 | 508 |
| 503 } // namespace trace_event | 509 } // namespace trace_event |
| 504 } // namespace base | 510 } // namespace base |
| 505 | 511 |
| 506 #endif // BASE_TRACE_EVENT_TRACE_LOG_H_ | 512 #endif // BASE_TRACE_EVENT_TRACE_LOG_H_ |
| OLD | NEW |