Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright (c) 2013 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
| 5 found in the LICENSE file. | 5 found in the LICENSE file. |
| 6 --> | 6 --> |
| 7 | 7 |
| 8 <link rel="import" href="/tracing/ui/extras/about_tracing/inspector_connection.h tml"> | 8 <link rel="import" href="/tracing/ui/extras/about_tracing/inspector_connection.h tml"> |
| 9 <link rel="import" | 9 <link rel="import" |
| 10 href="/tracing/ui/extras/about_tracing/tracing_controller_client.html"> | 10 href="/tracing/ui/extras/about_tracing/tracing_controller_client.html"> |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 84 }, function(err) { | 84 }, function(err) { |
| 85 return []; | 85 return []; |
| 86 }); | 86 }); |
| 87 }, | 87 }, |
| 88 | 88 |
| 89 beginRecording(recordingOptions) { | 89 beginRecording(recordingOptions) { |
| 90 if (this.recording_) { | 90 if (this.recording_) { |
| 91 throw new Error('Already recording'); | 91 throw new Error('Already recording'); |
| 92 } | 92 } |
| 93 this.recording_ = 'starting'; | 93 this.recording_ = 'starting'; |
| 94 const memoryConfig = { triggers: [] }; | |
| 95 if (recordingOptions.includedCategories.indexOf( | |
| 96 'disabled-by-default-memory-infra') !== -1) { | |
| 97 memoryConfig.triggers.push( | |
| 98 {'mode': 'detailed', 'periodic_interval_ms': 10000}); | |
| 99 } | |
| 100 | |
| 101 const traceConfigStr = { | |
| 102 includedCategories: recordingOptions.includedCategories, | |
| 103 excludedCategories: recordingOptions.excludedCategories, | |
| 104 memoryDumpConfig: memoryConfig, | |
| 105 recordMode: recordingOptions.tracingRecordMode, | |
| 106 enableSystrace: recordingOptions.useSystemTracing | |
| 107 }; | |
| 94 let res = this.conn_.req( | 108 let res = this.conn_.req( |
| 95 'Tracing.start', | 109 'Tracing.start', |
| 96 { | 110 { |
| 97 categories: recordingOptions.categoryFilter, | 111 traceConfig: traceConfigStr, |
| 98 options: | |
| 99 [recordingOptions.tracingRecordMode, | |
| 100 (recordingOptions.useSampling ? 'enable-sampling' : '') | |
|
ssid
2017/06/21 18:59:20
+Andrey can you verify this is not required? I can
erikchen
2017/06/21 22:56:50
This is dead code, which is why I removed it. The
fmeawad
2017/06/22 23:16:39
I can confirm that this is dead code, this is not
| |
| 101 ].join(','), | |
| 102 bufferUsageReportingInterval: 1000 | 112 bufferUsageReportingInterval: 1000 |
| 103 }); | 113 }); |
| 104 res = res.then( | 114 res = res.then( |
| 105 function ok() { | 115 function ok() { |
| 106 this.conn_.setNotificationListener( | 116 this.conn_.setNotificationListener( |
| 107 'Tracing.bufferUsage', | 117 'Tracing.bufferUsage', |
| 108 this.onBufferUsageUpdateFromInspector_.bind(this)); | 118 this.onBufferUsageUpdateFromInspector_.bind(this)); |
| 109 this.recording_ = true; | 119 this.recording_ = true; |
| 110 }.bind(this), | 120 }.bind(this), |
| 111 function error() { | 121 function error() { |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 180 return 'trace.json'; | 190 return 'trace.json'; |
| 181 } | 191 } |
| 182 }; | 192 }; |
| 183 | 193 |
| 184 return { | 194 return { |
| 185 InspectorTracingControllerClient, | 195 InspectorTracingControllerClient, |
| 186 appendTraceChunksTo, | 196 appendTraceChunksTo, |
| 187 }; | 197 }; |
| 188 }); | 198 }); |
| 189 </script> | 199 </script> |
| OLD | NEW |