OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_event_impl.h" | 5 #include "base/trace_event/trace_event_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "base/base_switches.h" | 10 #include "base/base_switches.h" |
(...skipping 2334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2345 if (process_labels_.size() > 0) { | 2345 if (process_labels_.size() > 0) { |
2346 std::vector<std::string> labels; | 2346 std::vector<std::string> labels; |
2347 for(base::hash_map<int, std::string>::iterator it = process_labels_.begin(); | 2347 for(base::hash_map<int, std::string>::iterator it = process_labels_.begin(); |
2348 it != process_labels_.end(); | 2348 it != process_labels_.end(); |
2349 it++) { | 2349 it++) { |
2350 labels.push_back(it->second); | 2350 labels.push_back(it->second); |
2351 } | 2351 } |
2352 InitializeMetadataEvent(AddEventToThreadSharedChunkWhileLocked(NULL, false), | 2352 InitializeMetadataEvent(AddEventToThreadSharedChunkWhileLocked(NULL, false), |
2353 current_thread_id, | 2353 current_thread_id, |
2354 "process_labels", "labels", | 2354 "process_labels", "labels", |
2355 JoinString(labels, ',')); | 2355 base::JoinString(labels, ",")); |
2356 } | 2356 } |
2357 | 2357 |
2358 // Thread sort indices. | 2358 // Thread sort indices. |
2359 for(hash_map<int, int>::iterator it = thread_sort_indices_.begin(); | 2359 for(hash_map<int, int>::iterator it = thread_sort_indices_.begin(); |
2360 it != thread_sort_indices_.end(); | 2360 it != thread_sort_indices_.end(); |
2361 it++) { | 2361 it++) { |
2362 if (it->second == 0) | 2362 if (it->second == 0) |
2363 continue; | 2363 continue; |
2364 InitializeMetadataEvent(AddEventToThreadSharedChunkWhileLocked(NULL, false), | 2364 InitializeMetadataEvent(AddEventToThreadSharedChunkWhileLocked(NULL, false), |
2365 it->first, | 2365 it->first, |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2520 } | 2520 } |
2521 | 2521 |
2522 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() { | 2522 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() { |
2523 if (*category_group_enabled_) { | 2523 if (*category_group_enabled_) { |
2524 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_, | 2524 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_, |
2525 name_, event_handle_); | 2525 name_, event_handle_); |
2526 } | 2526 } |
2527 } | 2527 } |
2528 | 2528 |
2529 } // namespace trace_event_internal | 2529 } // namespace trace_event_internal |
OLD | NEW |