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 #ifndef CONTENT_PUBLIC_BROWSER_TRACE_CONTROLLER_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_TRACE_CONTROLLER_H_ |
6 #define CONTENT_PUBLIC_BROWSER_TRACE_CONTROLLER_H_ | 6 #define CONTENT_PUBLIC_BROWSER_TRACE_CONTROLLER_H_ |
7 | 7 |
8 #include "content/common/content_export.h" | 8 #include "content/common/content_export.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
(...skipping 17 matching lines...) Expand all Loading... |
28 // If BeginTracing was already called previously, | 28 // If BeginTracing was already called previously, |
29 // or if an EndTracingAsync is pending, | 29 // or if an EndTracingAsync is pending, |
30 // or if another subscriber is tracing, | 30 // or if another subscriber is tracing, |
31 // BeginTracing will return false meaning it failed. | 31 // BeginTracing will return false meaning it failed. |
32 // | 32 // |
33 // |categories| is a comma-delimited list of category wildcards. | 33 // |categories| is a comma-delimited list of category wildcards. |
34 // A category can have an optional '-' prefix to make it an excluded category. | 34 // A category can have an optional '-' prefix to make it an excluded category. |
35 // All the same rules apply above, so for example, having both included and | 35 // All the same rules apply above, so for example, having both included and |
36 // excluded categories in the same list would not be supported. | 36 // excluded categories in the same list would not be supported. |
37 // | 37 // |
| 38 // |continuous_tracing| should be set to true to loop to the beginning of |
| 39 // the trace buffer and continue tracing when the buffer is full. |
| 40 // |
38 // Example: BeginTracing("test_MyTest*"); | 41 // Example: BeginTracing("test_MyTest*"); |
39 // Example: BeginTracing("test_MyTest*,test_OtherStuff"); | 42 // Example: BeginTracing("test_MyTest*,test_OtherStuff"); |
40 // Example: BeginTracing("-excluded_category1,-excluded_category2"); | 43 // Example: BeginTracing("-excluded_category1,-excluded_category2"); |
41 virtual bool BeginTracing(TraceSubscriber* subscriber, | 44 virtual bool BeginTracing(TraceSubscriber* subscriber, |
42 const std::string& categories) = 0; | 45 const std::string& categories) = 0; |
43 | 46 |
| 47 virtual bool BeginTracing(TraceSubscriber* subscriber, |
| 48 const std::string& categories, |
| 49 bool continuous_tracing) = 0; |
| 50 |
44 // Called by browser process to stop tracing events on all processes. | 51 // Called by browser process to stop tracing events on all processes. |
45 // | 52 // |
46 // Child processes typically are caching trace data and only rarely flush | 53 // Child processes typically are caching trace data and only rarely flush |
47 // and send trace data back to the browser process. That is because it may be | 54 // and send trace data back to the browser process. That is because it may be |
48 // an expensive operation to send the trace data over IPC, and we would like | 55 // an expensive operation to send the trace data over IPC, and we would like |
49 // to avoid much runtime overhead of tracing. So, to end tracing, we must | 56 // to avoid much runtime overhead of tracing. So, to end tracing, we must |
50 // asynchronously ask all child processes to flush any pending trace data. | 57 // asynchronously ask all child processes to flush any pending trace data. |
51 // | 58 // |
52 // Once all child processes have acked the EndTracing request, | 59 // Once all child processes have acked the EndTracing request, |
53 // TraceSubscriber will be called with OnEndTracingComplete. | 60 // TraceSubscriber will be called with OnEndTracingComplete. |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 virtual void CancelSubscriber(TraceSubscriber* subscriber) = 0; | 92 virtual void CancelSubscriber(TraceSubscriber* subscriber) = 0; |
86 | 93 |
87 protected: | 94 protected: |
88 virtual ~TraceController() {} | 95 virtual ~TraceController() {} |
89 }; | 96 }; |
90 | 97 |
91 } // namespace content | 98 } // namespace content |
92 | 99 |
93 #endif // CONTENT_PUBLIC_BROWSER_TRACE_CONTROLLER_H_ | 100 #endif // CONTENT_PUBLIC_BROWSER_TRACE_CONTROLLER_H_ |
94 | 101 |
OLD | NEW |