| 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> |
| 9 #include <stdint.h> |
| 10 |
| 8 #include <string> | 11 #include <string> |
| 9 #include <vector> | 12 #include <vector> |
| 10 | 13 |
| 11 #include "base/atomicops.h" | 14 #include "base/atomicops.h" |
| 12 #include "base/containers/hash_tables.h" | 15 #include "base/containers/hash_tables.h" |
| 13 #include "base/gtest_prod_util.h" | 16 #include "base/gtest_prod_util.h" |
| 17 #include "base/macros.h" |
| 14 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/memory/scoped_vector.h" | 19 #include "base/memory/scoped_vector.h" |
| 16 #include "base/trace_event/memory_dump_provider.h" | 20 #include "base/trace_event/memory_dump_provider.h" |
| 17 #include "base/trace_event/trace_config.h" | 21 #include "base/trace_event/trace_config.h" |
| 18 #include "base/trace_event/trace_event_impl.h" | 22 #include "base/trace_event/trace_event_impl.h" |
| 23 #include "build/build_config.h" |
| 19 | 24 |
| 20 namespace base { | 25 namespace base { |
| 21 | 26 |
| 22 template <typename Type> | 27 template <typename Type> |
| 23 struct DefaultSingletonTraits; | 28 struct DefaultSingletonTraits; |
| 24 class RefCountedString; | 29 class RefCountedString; |
| 25 | 30 |
| 26 namespace trace_event { | 31 namespace trace_event { |
| 27 | 32 |
| 28 class TraceBuffer; | 33 class TraceBuffer; |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 typedef base::Callback<void()> WatchEventCallback; | 265 typedef base::Callback<void()> WatchEventCallback; |
| 261 void SetWatchEvent(const std::string& category_name, | 266 void SetWatchEvent(const std::string& category_name, |
| 262 const std::string& event_name, | 267 const std::string& event_name, |
| 263 const WatchEventCallback& callback); | 268 const WatchEventCallback& callback); |
| 264 // Cancel the watch event. If tracing is enabled, this may race with the | 269 // Cancel the watch event. If tracing is enabled, this may race with the |
| 265 // watch event notification firing. | 270 // watch event notification firing. |
| 266 void CancelWatchEvent(); | 271 void CancelWatchEvent(); |
| 267 | 272 |
| 268 int process_id() const { return process_id_; } | 273 int process_id() const { return process_id_; } |
| 269 | 274 |
| 270 uint64 MangleEventId(uint64 id); | 275 uint64_t MangleEventId(uint64_t id); |
| 271 | 276 |
| 272 // Exposed for unittesting: | 277 // Exposed for unittesting: |
| 273 | 278 |
| 274 void WaitSamplingEventForTesting(); | 279 void WaitSamplingEventForTesting(); |
| 275 | 280 |
| 276 // Allows deleting our singleton instance. | 281 // Allows deleting our singleton instance. |
| 277 static void DeleteForTesting(); | 282 static void DeleteForTesting(); |
| 278 | 283 |
| 279 // Allow tests to inspect TraceEvents. | 284 // Allow tests to inspect TraceEvents. |
| 280 TraceEvent* GetEventByHandle(TraceEventHandle handle); | 285 TraceEvent* GetEventByHandle(TraceEventHandle handle); |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 subtle::AtomicWord generation_; | 494 subtle::AtomicWord generation_; |
| 490 bool use_worker_thread_; | 495 bool use_worker_thread_; |
| 491 | 496 |
| 492 DISALLOW_COPY_AND_ASSIGN(TraceLog); | 497 DISALLOW_COPY_AND_ASSIGN(TraceLog); |
| 493 }; | 498 }; |
| 494 | 499 |
| 495 } // namespace trace_event | 500 } // namespace trace_event |
| 496 } // namespace base | 501 } // namespace base |
| 497 | 502 |
| 498 #endif // BASE_TRACE_EVENT_TRACE_LOG_H_ | 503 #endif // BASE_TRACE_EVENT_TRACE_LOG_H_ |
| OLD | NEW |