support endless recorder for timeline (#47419)

This commit is contained in:
Gityuan
2020-02-07 04:33:01 +08:00
committed by GitHub
parent b16fd13f89
commit b8dd6bdd19
4 changed files with 14 additions and 0 deletions

View File

@@ -582,6 +582,8 @@ class AndroidDevice extends Device {
...<String>['--ez', 'trace-skia', 'true'],
if (debuggingOptions.traceSystrace)
...<String>['--ez', 'trace-systrace', 'true'],
if (debuggingOptions.endlessTraceBuffer)
...<String>['--ez', 'endless-trace-buffer', 'true'],
if (debuggingOptions.dumpSkpOnShaderCompilation)
...<String>['--ez', 'dump-skp-on-shader-compilation', 'true'],
if (debuggingOptions.cacheSkSL)

View File

@@ -102,6 +102,13 @@ class RunCommand extends RunCommandBase {
help: 'Enable tracing of Skia code. This is useful when debugging '
'the GPU thread. By default, Flutter will not log skia code.',
)
..addFlag('endless-trace-buffer',
negatable: false,
help: 'Enable tracing to the endless tracer. This is useful when '
'recording huge amounts of traces. If we need to use endless buffer to '
'record startup traces, we can combine the ("--trace-startup"). '
'For exemple, flutter run --trace-startup --endless-trace-buffer. ',
)
..addFlag('trace-systrace',
negatable: false,
help: 'Enable tracing to the system tracer. This is only useful on '
@@ -350,6 +357,7 @@ class RunCommand extends RunCommandBase {
skiaDeterministicRendering: boolArg('skia-deterministic-rendering'),
traceSkia: boolArg('trace-skia'),
traceSystrace: boolArg('trace-systrace'),
endlessTraceBuffer: boolArg('endless-trace-buffer'),
dumpSkpOnShaderCompilation: dumpSkpOnShaderCompilation,
cacheSkSL: cacheSkSL,
deviceVmServicePort: deviceVmservicePort,

View File

@@ -525,6 +525,7 @@ class DebuggingOptions {
this.skiaDeterministicRendering = false,
this.traceSkia = false,
this.traceSystrace = false,
this.endlessTraceBuffer = false,
this.dumpSkpOnShaderCompilation = false,
this.cacheSkSL = false,
this.useTestFonts = false,
@@ -554,6 +555,7 @@ class DebuggingOptions {
skiaDeterministicRendering = false,
traceSkia = false,
traceSystrace = false,
endlessTraceBuffer = false,
dumpSkpOnShaderCompilation = false,
verboseSystemLogs = false,
hostVmServicePort = null,
@@ -571,6 +573,7 @@ class DebuggingOptions {
final bool skiaDeterministicRendering;
final bool traceSkia;
final bool traceSystrace;
final bool endlessTraceBuffer;
final bool dumpSkpOnShaderCompilation;
final bool cacheSkSL;
final bool useTestFonts;

View File

@@ -327,6 +327,7 @@ class IOSDevice extends Device {
if (debuggingOptions.enableSoftwareRendering) '--enable-software-rendering',
if (debuggingOptions.skiaDeterministicRendering) '--skia-deterministic-rendering',
if (debuggingOptions.traceSkia) '--trace-skia',
if (debuggingOptions.endlessTraceBuffer) '--endless-trace-buffer',
if (debuggingOptions.dumpSkpOnShaderCompilation) '--dump-skp-on-shader-compilation',
if (debuggingOptions.verboseSystemLogs) '--verbose-logging',
if (debuggingOptions.cacheSkSL) '--cache-sksl',