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

Unified Diff: tracing/tracing/ui/extras/about_tracing/inspector_tracing_controller_client.html

Issue 2948023002: Fix periodic dumping for memory-infra on Android. (Closed)
Patch Set: fix tests. Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tracing/tracing/ui/extras/about_tracing/inspector_tracing_controller_client_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/ui/extras/about_tracing/inspector_tracing_controller_client.html
diff --git a/tracing/tracing/ui/extras/about_tracing/inspector_tracing_controller_client.html b/tracing/tracing/ui/extras/about_tracing/inspector_tracing_controller_client.html
index 0971bb93c1395a7f0d40c2a79229bfe811119706..5056eeb0aca4f264b49cd67c924ec879fb7d521b 100644
--- a/tracing/tracing/ui/extras/about_tracing/inspector_tracing_controller_client.html
+++ b/tracing/tracing/ui/extras/about_tracing/inspector_tracing_controller_client.html
@@ -91,14 +91,40 @@ tr.exportTo('tr.ui.e.about_tracing', function() {
throw new Error('Already recording');
}
this.recording_ = 'starting';
+ const memoryConfig = { triggers: [] };
+ if (recordingOptions.included_categories.indexOf(
+ 'disabled-by-default-memory-infra') !== -1) {
+ memoryConfig.triggers.push(
+ {'mode': 'detailed', 'periodic_interval_ms': 10000});
+ }
+
+ // The devtools and tracing endpoints have slightly different parameter
+ // configurations. Noteably, recordMode has different spelling
+ // requirements.
+ function RewriteRecordMode(recordMode) {
+ if (recordMode === 'record-until-full') {
+ return 'recordUntilFull';
+ }
+ if (recordMode === 'record-continuously') {
+ return 'recordContinuously';
+ }
+ if (recordMode === 'record-as-much-as-possible') {
+ return 'recordAsMuchAsPossible';
+ }
+ return 'unsupported record mode';
+ }
+
+ const traceConfigStr = {
+ includedCategories: recordingOptions.included_categories,
+ excludedCategories: recordingOptions.excluded_categories,
+ memoryDumpConfig: memoryConfig,
+ recordMode: RewriteRecordMode(recordingOptions.record_mode),
+ enableSystrace: recordingOptions.enable_systrace
+ };
let res = this.conn_.req(
'Tracing.start',
{
- categories: recordingOptions.categoryFilter,
- options:
- [recordingOptions.tracingRecordMode,
- (recordingOptions.useSampling ? 'enable-sampling' : '')
- ].join(','),
+ traceConfig: traceConfigStr,
bufferUsageReportingInterval: 1000
});
res = res.then(
« no previous file with comments | « no previous file | tracing/tracing/ui/extras/about_tracing/inspector_tracing_controller_client_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698