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

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

Issue 12741012: base: Support setting thread priorities generically. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove static initializers. Created 7 years, 7 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 | « base/base.gypi ('k') | base/synchronization/lock_unittest.cc » ('j') | 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 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 << "Cannot manipulate TraceLog::Enabled state from an observer."; 970 << "Cannot manipulate TraceLog::Enabled state from an observer.";
971 return; 971 return;
972 } 972 }
973 973
974 if (sampling_thread_.get()) { 974 if (sampling_thread_.get()) {
975 // Stop the sampling thread. 975 // Stop the sampling thread.
976 sampling_thread_->Stop(); 976 sampling_thread_->Stop();
977 lock_.Release(); 977 lock_.Release();
978 PlatformThread::Join(sampling_thread_handle_); 978 PlatformThread::Join(sampling_thread_handle_);
979 lock_.Acquire(); 979 lock_.Acquire();
980 sampling_thread_handle_ = 0; 980 sampling_thread_handle_ = PlatformThreadHandle();
981 sampling_thread_.reset(); 981 sampling_thread_.reset();
982 } 982 }
983 983
984 dispatching_to_observer_list_ = true; 984 dispatching_to_observer_list_ = true;
985 FOR_EACH_OBSERVER(EnabledStateChangedObserver, 985 FOR_EACH_OBSERVER(EnabledStateChangedObserver,
986 enabled_state_observer_list_, 986 enabled_state_observer_list_,
987 OnTraceLogWillDisable()); 987 OnTraceLogWillDisable());
988 dispatching_to_observer_list_ = false; 988 dispatching_to_observer_list_ = false;
989 989
990 category_filter_.Clear(); 990 category_filter_.Clear();
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
1502 NULL, // arg_names 1502 NULL, // arg_names
1503 NULL, // arg_types 1503 NULL, // arg_types
1504 NULL, // arg_values 1504 NULL, // arg_values
1505 NULL, // convertable values 1505 NULL, // convertable values
1506 TRACE_EVENT_FLAG_NONE); // flags 1506 TRACE_EVENT_FLAG_NONE); // flags
1507 } 1507 }
1508 } 1508 }
1509 1509
1510 } // namespace trace_event_internal 1510 } // namespace trace_event_internal
1511 1511
OLDNEW
« no previous file with comments | « base/base.gypi ('k') | base/synchronization/lock_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698