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

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

Issue 750183008: DevTools: Parallelize trace messages serialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tests were fixed Created 6 years 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 | base/debug/trace_event_impl.cc » ('j') | base/debug/trace_event_impl.cc » ('J')
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 5
6 #ifndef BASE_DEBUG_TRACE_EVENT_IMPL_H_ 6 #ifndef BASE_DEBUG_TRACE_EVENT_IMPL_H_
7 #define BASE_DEBUG_TRACE_EVENT_IMPL_H_ 7 #define BASE_DEBUG_TRACE_EVENT_IMPL_H_
8 8
9 #include <stack> 9 #include <stack>
10 #include <string> 10 #include <string>
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 bool check_buffer_is_full); 703 bool check_buffer_is_full);
704 void CheckIfBufferIsFullWhileLocked(); 704 void CheckIfBufferIsFullWhileLocked();
705 void SetDisabledWhileLocked(); 705 void SetDisabledWhileLocked();
706 706
707 TraceEvent* GetEventByHandleInternal(TraceEventHandle handle, 707 TraceEvent* GetEventByHandleInternal(TraceEventHandle handle,
708 OptionalAutoLock* lock); 708 OptionalAutoLock* lock);
709 709
710 // |generation| is used in the following callbacks to check if the callback 710 // |generation| is used in the following callbacks to check if the callback
711 // is called for the flush of the current |logged_events_|. 711 // is called for the flush of the current |logged_events_|.
712 void FlushCurrentThread(int generation); 712 void FlushCurrentThread(int generation);
713 void ConvertTraceEventsToTraceFormat(scoped_ptr<TraceBuffer> logged_events, 713 // Usually it runs on a different thread.
714 static void ConvertTraceEventsToTraceFormat(
715 scoped_ptr<TraceBuffer> logged_events,
714 const TraceLog::OutputCallback& flush_output_callback); 716 const TraceLog::OutputCallback& flush_output_callback);
715 void FinishFlush(int generation); 717 void FinishFlush(int generation);
716 void OnFlushTimeout(int generation); 718 void OnFlushTimeout(int generation);
717 719
718 int generation() const { 720 int generation() const {
719 return static_cast<int>(subtle::NoBarrier_Load(&generation_)); 721 return static_cast<int>(subtle::NoBarrier_Load(&generation_));
720 } 722 }
721 bool CheckGeneration(int generation) const { 723 bool CheckGeneration(int generation) const {
722 return generation == this->generation(); 724 return generation == this->generation();
723 } 725 }
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 scoped_refptr<MessageLoopProxy> flush_message_loop_proxy_; 807 scoped_refptr<MessageLoopProxy> flush_message_loop_proxy_;
806 subtle::AtomicWord generation_; 808 subtle::AtomicWord generation_;
807 809
808 DISALLOW_COPY_AND_ASSIGN(TraceLog); 810 DISALLOW_COPY_AND_ASSIGN(TraceLog);
809 }; 811 };
810 812
811 } // namespace debug 813 } // namespace debug
812 } // namespace base 814 } // namespace base
813 815
814 #endif // BASE_DEBUG_TRACE_EVENT_IMPL_H_ 816 #endif // BASE_DEBUG_TRACE_EVENT_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | base/debug/trace_event_impl.cc » ('j') | base/debug/trace_event_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698