| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project 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 V8_LIBPLATFORM_V8_TRACING_H_ | 5 #ifndef V8_LIBPLATFORM_V8_TRACING_H_ |
| 6 #define V8_LIBPLATFORM_V8_TRACING_H_ | 6 #define V8_LIBPLATFORM_V8_TRACING_H_ |
| 7 | 7 |
| 8 #include <fstream> | 8 #include <fstream> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 RECORD_AS_MUCH_AS_POSSIBLE, | 159 RECORD_AS_MUCH_AS_POSSIBLE, |
| 160 | 160 |
| 161 // Echo to console. Events are discarded. | 161 // Echo to console. Events are discarded. |
| 162 ECHO_TO_CONSOLE, | 162 ECHO_TO_CONSOLE, |
| 163 }; | 163 }; |
| 164 | 164 |
| 165 class TraceConfig { | 165 class TraceConfig { |
| 166 public: | 166 public: |
| 167 typedef std::vector<std::string> StringList; | 167 typedef std::vector<std::string> StringList; |
| 168 | 168 |
| 169 static TraceConfig* CreateDefaultTraceConfig(); |
| 170 |
| 169 TraceConfig() | 171 TraceConfig() |
| 170 : enable_sampling_(false), | 172 : enable_sampling_(false), |
| 171 enable_systrace_(false), | 173 enable_systrace_(false), |
| 172 enable_argument_filter_(false) {} | 174 enable_argument_filter_(false) {} |
| 173 TraceRecordMode GetTraceRecordMode() const { return record_mode_; } | 175 TraceRecordMode GetTraceRecordMode() const { return record_mode_; } |
| 174 bool IsSamplingEnabled() const { return enable_sampling_; } | 176 bool IsSamplingEnabled() const { return enable_sampling_; } |
| 175 bool IsSystraceEnabled() const { return enable_systrace_; } | 177 bool IsSystraceEnabled() const { return enable_systrace_; } |
| 176 bool IsArgumentFilterEnabled() const { return enable_argument_filter_; } | 178 bool IsArgumentFilterEnabled() const { return enable_argument_filter_; } |
| 177 | 179 |
| 178 void SetTraceRecordMode(TraceRecordMode mode) { record_mode_ = mode; } | 180 void SetTraceRecordMode(TraceRecordMode mode) { record_mode_ = mode; } |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 // Disallow copy and assign | 244 // Disallow copy and assign |
| 243 TracingController(const TracingController&) = delete; | 245 TracingController(const TracingController&) = delete; |
| 244 void operator=(const TracingController&) = delete; | 246 void operator=(const TracingController&) = delete; |
| 245 }; | 247 }; |
| 246 | 248 |
| 247 } // namespace tracing | 249 } // namespace tracing |
| 248 } // namespace platform | 250 } // namespace platform |
| 249 } // namespace v8 | 251 } // namespace v8 |
| 250 | 252 |
| 251 #endif // V8_LIBPLATFORM_V8_TRACING_H_ | 253 #endif // V8_LIBPLATFORM_V8_TRACING_H_ |
| OLD | NEW |