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

Side by Side Diff: base/trace_event/tracing_agent.h

Issue 1644653002: [Tracing] Update sync_id to be string type for clock sync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | base/trace_event/tracing_agent.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 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 #ifndef BASE_TRACE_EVENT_TRACING_AGENT_H_ 5 #ifndef BASE_TRACE_EVENT_TRACING_AGENT_H_
6 #define BASE_TRACE_EVENT_TRACING_AGENT_H_ 6 #define BASE_TRACE_EVENT_TRACING_AGENT_H_
7 7
8 #include "base/base_export.h" 8 #include "base/base_export.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/memory/ref_counted_memory.h" 10 #include "base/memory/ref_counted_memory.h"
(...skipping 17 matching lines...) Expand all
28 public: 28 public:
29 using StartAgentTracingCallback = 29 using StartAgentTracingCallback =
30 base::Callback<void(const std::string& agent_name, bool success)>; 30 base::Callback<void(const std::string& agent_name, bool success)>;
31 // Passing a null or empty events_str_ptr indicates that no trace data is 31 // Passing a null or empty events_str_ptr indicates that no trace data is
32 // available for the specified agent. 32 // available for the specified agent.
33 using StopAgentTracingCallback = base::Callback<void( 33 using StopAgentTracingCallback = base::Callback<void(
34 const std::string& agent_name, 34 const std::string& agent_name,
35 const std::string& events_label, 35 const std::string& events_label,
36 const scoped_refptr<base::RefCountedString>& events_str_ptr)>; 36 const scoped_refptr<base::RefCountedString>& events_str_ptr)>;
37 using RecordClockSyncMarkerCallback = base::Callback<void( 37 using RecordClockSyncMarkerCallback = base::Callback<void(
38 int sync_id, 38 const std::string& sync_id,
39 const TimeTicks& issue_ts, 39 const TimeTicks& issue_ts,
40 const TimeTicks& issue_end_ts)>; 40 const TimeTicks& issue_end_ts)>;
41 41
42 virtual ~TracingAgent(); 42 virtual ~TracingAgent();
43 43
44 // Gets the name of the tracing agent. Each tracing agent's name should be 44 // Gets the name of the tracing agent. Each tracing agent's name should be
45 // unique. 45 // unique.
46 virtual std::string GetTracingAgentName() = 0; 46 virtual std::string GetTracingAgentName() = 0;
47 47
48 // Gets the trace event label of this tracing agent. The label will be used to 48 // Gets the trace event label of this tracing agent. The label will be used to
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // Having a reliable timing measurement for the 2nd task requires synchronous 80 // Having a reliable timing measurement for the 2nd task requires synchronous
81 // function call without any cross-thread or cross-process activity. However, 81 // function call without any cross-thread or cross-process activity. However,
82 // tracing agents in Chrome run in their own threads. Therefore, the issuer 82 // tracing agents in Chrome run in their own threads. Therefore, the issuer
83 // needs to dedicate the 2nd task to the receiver to take time measurements 83 // needs to dedicate the 2nd task to the receiver to take time measurements
84 // in the receiver thread, and the receiver thread needs to pass them back to 84 // in the receiver thread, and the receiver thread needs to pass them back to
85 // the issuer in the callback. 85 // the issuer in the callback.
86 // 86 //
87 // The assumption is that the receiver thread knows the issuer's clock, which 87 // The assumption is that the receiver thread knows the issuer's clock, which
88 // is true in Chrome because all agent threads' clocks are Chrome clock. 88 // is true in Chrome because all agent threads' clocks are Chrome clock.
89 virtual void RecordClockSyncMarker( 89 virtual void RecordClockSyncMarker(
90 int sync_id, 90 const std::string& sync_id,
91 const RecordClockSyncMarkerCallback& callback); 91 const RecordClockSyncMarkerCallback& callback);
92 }; 92 };
93 93
94 } // namespace trace_event 94 } // namespace trace_event
95 } // namespace base 95 } // namespace base
96 96
97 #endif // BASE_TRACE_EVENT_TRACING_AGENT_H_ 97 #endif // BASE_TRACE_EVENT_TRACING_AGENT_H_
OLDNEW
« no previous file with comments | « no previous file | base/trace_event/tracing_agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698