Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(402)

Side by Side Diff: base/debug/trace_event_impl.cc

Issue 15892014: Allow chrome trace to be collected when atrace is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/debug/trace_event_impl.h" 5 #include "base/debug/trace_event_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/debug/leak_annotations.h" 10 #include "base/debug/leak_annotations.h"
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after
1109 flags); 1109 flags);
1110 #endif 1110 #endif
1111 1111
1112 TimeTicks now = timestamp - time_offset_; 1112 TimeTicks now = timestamp - time_offset_;
1113 EventCallback event_callback_copy; 1113 EventCallback event_callback_copy;
1114 1114
1115 NotificationHelper notifier(this); 1115 NotificationHelper notifier(this);
1116 1116
1117 do { 1117 do {
1118 AutoLock lock(lock_); 1118 AutoLock lock(lock_);
1119 if (*category_group_enabled != CATEGORY_ENABLED) 1119 if (!(*category_group_enabled & CATEGORY_ENABLED))
dsinclair 2013/05/29 13:49:20 Can we pull this out into a method? if (!isCatego
Xianzhu 2013/05/29 17:14:31 Done.
1120 return; 1120 return;
1121 1121
1122 event_callback_copy = event_callback_; 1122 event_callback_copy = event_callback_;
1123 if (logged_events_->IsFull()) 1123 if (logged_events_->IsFull())
1124 break; 1124 break;
1125 1125
1126 const char* new_name = ThreadIdNameManager::GetInstance()-> 1126 const char* new_name = ThreadIdNameManager::GetInstance()->
1127 GetName(thread_id); 1127 GetName(thread_id);
1128 // Check if the thread name has been set or changed since the previous 1128 // Check if the thread name has been set or changed since the previous
1129 // call (if any), but don't bother if the new name is empty. Note this will 1129 // call (if any), but don't bother if the new name is empty. Note this will
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
1505 NULL, // arg_names 1505 NULL, // arg_names
1506 NULL, // arg_types 1506 NULL, // arg_types
1507 NULL, // arg_values 1507 NULL, // arg_values
1508 NULL, // convertable values 1508 NULL, // convertable values
1509 TRACE_EVENT_FLAG_NONE); // flags 1509 TRACE_EVENT_FLAG_NONE); // flags
1510 } 1510 }
1511 } 1511 }
1512 1512
1513 } // namespace trace_event_internal 1513 } // namespace trace_event_internal
1514 1514
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698