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 var memory_config = { triggers: [] }; | |
| 95 if (recordingOptions.includedCategories.indexOf('disabled-by-default-memor y-infra') !== -1) { | |
| 96 memory_config.triggers.push( | |
| 97 {'mode': 'detailed', 'periodic_interval_ms': 10000}); | |
| 98 } | |
| 99 var trace_config_str = { | |
| 100 includedCategories: recordingOptions.includedCategories, | |
| 101 excludedCategories: recordingOptions.excludedCategories, | |
| 102 memoryDumpConfig: memory_config, | |
| 103 recordMode: "record-until-full" | |
| 104 }; | |
| 105 alert(recordingOptions.tracingRecordMode); | |
| 94 let res = this.conn_.req( | 106 let res = this.conn_.req( |
| 95 'Tracing.start', | 107 'Tracing.start', |
| 96 { | 108 { |
| 97 categories: recordingOptions.categoryFilter, | 109 traceConfig: trace_config_str, |
|
fmeawad
2017/06/14 17:18:36
Should we be concerned about the string size? give
ssid
2017/06/21 18:38:16
I think it was the same earlier as well. We used t
| |
| 98 options: | |
| 99 [recordingOptions.tracingRecordMode, | |
| 100 (recordingOptions.useSampling ? 'enable-sampling' : '') | |
|
fmeawad
2017/06/14 17:18:36
This was for the old sampling code that was remove
ssid
2017/06/21 18:38:16
Sorry this should be fixed in Eirk's cl.
| |
| 101 ].join(','), | |
| 102 bufferUsageReportingInterval: 1000 | 110 bufferUsageReportingInterval: 1000 |
| 103 }); | 111 }); |
| 104 res = res.then( | 112 res = res.then( |
| 105 function ok() { | 113 function ok() { |
| 106 this.conn_.setNotificationListener( | 114 this.conn_.setNotificationListener( |
| 107 'Tracing.bufferUsage', | 115 'Tracing.bufferUsage', |
| 108 this.onBufferUsageUpdateFromInspector_.bind(this)); | 116 this.onBufferUsageUpdateFromInspector_.bind(this)); |
| 109 this.recording_ = true; | 117 this.recording_ = true; |
| 110 }.bind(this), | 118 }.bind(this), |
| 111 function error() { | 119 function error() { |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 180 return 'trace.json'; | 188 return 'trace.json'; |
| 181 } | 189 } |
| 182 }; | 190 }; |
| 183 | 191 |
| 184 return { | 192 return { |
| 185 InspectorTracingControllerClient, | 193 InspectorTracingControllerClient, |
| 186 appendTraceChunksTo, | 194 appendTraceChunksTo, |
| 187 }; | 195 }; |
| 188 }); | 196 }); |
| 189 </script> | 197 </script> |
| OLD | NEW |