| 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 #include "base/trace_event/trace_log.h" | 5 #include "base/trace_event/trace_log.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1020 | 1020 |
| 1021 previous_logged_events.swap(logged_events_); | 1021 previous_logged_events.swap(logged_events_); |
| 1022 UseNextTraceBuffer(); | 1022 UseNextTraceBuffer(); |
| 1023 thread_message_loops_.clear(); | 1023 thread_message_loops_.clear(); |
| 1024 | 1024 |
| 1025 flush_task_runner_ = NULL; | 1025 flush_task_runner_ = NULL; |
| 1026 flush_output_callback = flush_output_callback_; | 1026 flush_output_callback = flush_output_callback_; |
| 1027 flush_output_callback_.Reset(); | 1027 flush_output_callback_.Reset(); |
| 1028 | 1028 |
| 1029 if (trace_options() & kInternalEnableArgumentFilter) { | 1029 if (trace_options() & kInternalEnableArgumentFilter) { |
| 1030 const base::CommandLine& command_line = |
| 1031 *base::CommandLine::ForCurrentProcess(); |
| 1032 std::string process_type = command_line.GetSwitchValueASCII("type"); |
| 1033 LOG(WARNING) << "============================= " << process_type |
| 1034 << " ==== " << !argument_filter_predicate_.is_null(); |
| 1035 |
| 1030 CHECK(!argument_filter_predicate_.is_null()); | 1036 CHECK(!argument_filter_predicate_.is_null()); |
| 1031 argument_filter_predicate = argument_filter_predicate_; | 1037 argument_filter_predicate = argument_filter_predicate_; |
| 1032 } | 1038 } |
| 1033 } | 1039 } |
| 1034 | 1040 |
| 1035 if (discard_events) { | 1041 if (discard_events) { |
| 1036 if (!flush_output_callback.is_null()) { | 1042 if (!flush_output_callback.is_null()) { |
| 1037 scoped_refptr<RefCountedString> empty_result = new RefCountedString; | 1043 scoped_refptr<RefCountedString> empty_result = new RefCountedString; |
| 1038 flush_output_callback.Run(empty_result, false); | 1044 flush_output_callback.Run(empty_result, false); |
| 1039 } | 1045 } |
| (...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1797 } | 1803 } |
| 1798 | 1804 |
| 1799 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() { | 1805 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() { |
| 1800 if (*category_group_enabled_) { | 1806 if (*category_group_enabled_) { |
| 1801 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_, name_, | 1807 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_, name_, |
| 1802 event_handle_); | 1808 event_handle_); |
| 1803 } | 1809 } |
| 1804 } | 1810 } |
| 1805 | 1811 |
| 1806 } // namespace trace_event_internal | 1812 } // namespace trace_event_internal |
| OLD | NEW |