| 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 <unordered_map> |
| 13 #include <vector> | 14 #include <vector> |
| 14 | 15 |
| 15 #include "base/atomicops.h" | 16 #include "base/atomicops.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 | 24 |
| 25 namespace base { | 25 namespace base { |
| 26 | 26 |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 uint8_t enabled_modes_; // See TraceLog::Mode. | 445 uint8_t enabled_modes_; // See TraceLog::Mode. |
| 446 int num_traces_recorded_; | 446 int num_traces_recorded_; |
| 447 std::unique_ptr<TraceBuffer> logged_events_; | 447 std::unique_ptr<TraceBuffer> logged_events_; |
| 448 std::vector<std::unique_ptr<TraceEvent>> metadata_events_; | 448 std::vector<std::unique_ptr<TraceEvent>> metadata_events_; |
| 449 bool dispatching_to_observer_list_; | 449 bool dispatching_to_observer_list_; |
| 450 std::vector<EnabledStateObserver*> enabled_state_observer_list_; | 450 std::vector<EnabledStateObserver*> enabled_state_observer_list_; |
| 451 std::map<AsyncEnabledStateObserver*, RegisteredAsyncObserver> | 451 std::map<AsyncEnabledStateObserver*, RegisteredAsyncObserver> |
| 452 async_observers_; | 452 async_observers_; |
| 453 | 453 |
| 454 std::string process_name_; | 454 std::string process_name_; |
| 455 base::hash_map<int, std::string> process_labels_; | 455 std::unordered_map<int, std::string> process_labels_; |
| 456 int process_sort_index_; | 456 int process_sort_index_; |
| 457 base::hash_map<int, int> thread_sort_indices_; | 457 std::unordered_map<int, int> thread_sort_indices_; |
| 458 base::hash_map<int, std::string> thread_names_; | 458 std::unordered_map<int, std::string> thread_names_; |
| 459 | 459 |
| 460 // The following two maps are used only when ECHO_TO_CONSOLE. | 460 // The following two maps are used only when ECHO_TO_CONSOLE. |
| 461 base::hash_map<int, std::stack<TimeTicks>> thread_event_start_times_; | 461 std::unordered_map<int, std::stack<TimeTicks>> thread_event_start_times_; |
| 462 base::hash_map<std::string, int> thread_colors_; | 462 std::unordered_map<std::string, int> thread_colors_; |
| 463 | 463 |
| 464 TimeTicks buffer_limit_reached_timestamp_; | 464 TimeTicks buffer_limit_reached_timestamp_; |
| 465 | 465 |
| 466 // XORed with TraceID to make it unlikely to collide with other processes. | 466 // XORed with TraceID to make it unlikely to collide with other processes. |
| 467 unsigned long long process_id_hash_; | 467 unsigned long long process_id_hash_; |
| 468 | 468 |
| 469 int process_id_; | 469 int process_id_; |
| 470 | 470 |
| 471 TimeDelta time_offset_; | 471 TimeDelta time_offset_; |
| 472 | 472 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 498 | 498 |
| 499 FilterFactoryForTesting filter_factory_for_testing_; | 499 FilterFactoryForTesting filter_factory_for_testing_; |
| 500 | 500 |
| 501 DISALLOW_COPY_AND_ASSIGN(TraceLog); | 501 DISALLOW_COPY_AND_ASSIGN(TraceLog); |
| 502 }; | 502 }; |
| 503 | 503 |
| 504 } // namespace trace_event | 504 } // namespace trace_event |
| 505 } // namespace base | 505 } // namespace base |
| 506 | 506 |
| 507 #endif // BASE_TRACE_EVENT_TRACE_LOG_H_ | 507 #endif // BASE_TRACE_EVENT_TRACE_LOG_H_ |
| OLD | NEW |