| 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 |
| 11 #include <memory> | 11 #include <memory> |
| 12 #include <string> | 12 #include <string> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/atomicops.h" | 15 #include "base/atomicops.h" |
| 16 #include "base/containers/hash_tables.h" | 16 #include "base/containers/hash_tables.h" |
| 17 #include "base/gtest_prod_util.h" | 17 #include "base/gtest_prod_util.h" |
| 18 #include "base/macros.h" | 18 #include "base/macros.h" |
| 19 #include "base/memory/scoped_vector.h" | 19 #include "base/memory/scoped_vector.h" |
| 20 #include "base/trace_event/memory_dump_provider.h" | 20 #include "base/trace_event/memory_dump_provider.h" |
| 21 #include "base/trace_event/trace_config.h" | 21 #include "base/trace_event/trace_config.h" |
| 22 #include "base/trace_event/trace_event_impl.h" | 22 #include "base/trace_event/trace_event_impl.h" |
| 23 #include "build/build_config.h" | 23 #include "build/build_config.h" |
| 24 #include "base/trace_event/v2/ring_buffer.h" |
| 24 | 25 |
| 25 namespace base { | 26 namespace base { |
| 26 | 27 |
| 27 template <typename Type> | 28 template <typename Type> |
| 28 struct DefaultSingletonTraits; | 29 struct DefaultSingletonTraits; |
| 29 class RefCountedString; | 30 class RefCountedString; |
| 30 | 31 |
| 31 namespace trace_event { | 32 namespace trace_event { |
| 32 | 33 |
| 33 class TraceBuffer; | 34 class TraceBuffer; |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 size_t thread_shared_chunk_index_; | 492 size_t thread_shared_chunk_index_; |
| 492 | 493 |
| 493 // Set when asynchronous Flush is in progress. | 494 // Set when asynchronous Flush is in progress. |
| 494 OutputCallback flush_output_callback_; | 495 OutputCallback flush_output_callback_; |
| 495 scoped_refptr<SingleThreadTaskRunner> flush_task_runner_; | 496 scoped_refptr<SingleThreadTaskRunner> flush_task_runner_; |
| 496 ArgumentFilterPredicate argument_filter_predicate_; | 497 ArgumentFilterPredicate argument_filter_predicate_; |
| 497 subtle::AtomicWord generation_; | 498 subtle::AtomicWord generation_; |
| 498 bool use_worker_thread_; | 499 bool use_worker_thread_; |
| 499 | 500 |
| 500 DISALLOW_COPY_AND_ASSIGN(TraceLog); | 501 DISALLOW_COPY_AND_ASSIGN(TraceLog); |
| 502 |
| 503 public: |
| 504 static bool use_v2; |
| 505 uint8_t v2_buf[1024 * 1024]; |
| 506 v2::RingBuffer v2_rb; |
| 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 |