Unverified Commit b8dd6bdd authored by Gityuan's avatar Gityuan Committed by GitHub

support endless recorder for timeline (#47419)

parent b16fd13f
...@@ -582,6 +582,8 @@ class AndroidDevice extends Device { ...@@ -582,6 +582,8 @@ class AndroidDevice extends Device {
...<String>['--ez', 'trace-skia', 'true'], ...<String>['--ez', 'trace-skia', 'true'],
if (debuggingOptions.traceSystrace) if (debuggingOptions.traceSystrace)
...<String>['--ez', 'trace-systrace', 'true'], ...<String>['--ez', 'trace-systrace', 'true'],
if (debuggingOptions.endlessTraceBuffer)
...<String>['--ez', 'endless-trace-buffer', 'true'],
if (debuggingOptions.dumpSkpOnShaderCompilation) if (debuggingOptions.dumpSkpOnShaderCompilation)
...<String>['--ez', 'dump-skp-on-shader-compilation', 'true'], ...<String>['--ez', 'dump-skp-on-shader-compilation', 'true'],
if (debuggingOptions.cacheSkSL) if (debuggingOptions.cacheSkSL)
......
...@@ -102,6 +102,13 @@ class RunCommand extends RunCommandBase { ...@@ -102,6 +102,13 @@ class RunCommand extends RunCommandBase {
help: 'Enable tracing of Skia code. This is useful when debugging ' help: 'Enable tracing of Skia code. This is useful when debugging '
'the GPU thread. By default, Flutter will not log skia code.', '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', ..addFlag('trace-systrace',
negatable: false, negatable: false,
help: 'Enable tracing to the system tracer. This is only useful on ' help: 'Enable tracing to the system tracer. This is only useful on '
...@@ -350,6 +357,7 @@ class RunCommand extends RunCommandBase { ...@@ -350,6 +357,7 @@ class RunCommand extends RunCommandBase {
skiaDeterministicRendering: boolArg('skia-deterministic-rendering'), skiaDeterministicRendering: boolArg('skia-deterministic-rendering'),
traceSkia: boolArg('trace-skia'), traceSkia: boolArg('trace-skia'),
traceSystrace: boolArg('trace-systrace'), traceSystrace: boolArg('trace-systrace'),
endlessTraceBuffer: boolArg('endless-trace-buffer'),
dumpSkpOnShaderCompilation: dumpSkpOnShaderCompilation, dumpSkpOnShaderCompilation: dumpSkpOnShaderCompilation,
cacheSkSL: cacheSkSL, cacheSkSL: cacheSkSL,
deviceVmServicePort: deviceVmservicePort, deviceVmServicePort: deviceVmservicePort,
......
...@@ -525,6 +525,7 @@ class DebuggingOptions { ...@@ -525,6 +525,7 @@ class DebuggingOptions {
this.skiaDeterministicRendering = false, this.skiaDeterministicRendering = false,
this.traceSkia = false, this.traceSkia = false,
this.traceSystrace = false, this.traceSystrace = false,
this.endlessTraceBuffer = false,
this.dumpSkpOnShaderCompilation = false, this.dumpSkpOnShaderCompilation = false,
this.cacheSkSL = false, this.cacheSkSL = false,
this.useTestFonts = false, this.useTestFonts = false,
...@@ -554,6 +555,7 @@ class DebuggingOptions { ...@@ -554,6 +555,7 @@ class DebuggingOptions {
skiaDeterministicRendering = false, skiaDeterministicRendering = false,
traceSkia = false, traceSkia = false,
traceSystrace = false, traceSystrace = false,
endlessTraceBuffer = false,
dumpSkpOnShaderCompilation = false, dumpSkpOnShaderCompilation = false,
verboseSystemLogs = false, verboseSystemLogs = false,
hostVmServicePort = null, hostVmServicePort = null,
...@@ -571,6 +573,7 @@ class DebuggingOptions { ...@@ -571,6 +573,7 @@ class DebuggingOptions {
final bool skiaDeterministicRendering; final bool skiaDeterministicRendering;
final bool traceSkia; final bool traceSkia;
final bool traceSystrace; final bool traceSystrace;
final bool endlessTraceBuffer;
final bool dumpSkpOnShaderCompilation; final bool dumpSkpOnShaderCompilation;
final bool cacheSkSL; final bool cacheSkSL;
final bool useTestFonts; final bool useTestFonts;
......
...@@ -327,6 +327,7 @@ class IOSDevice extends Device { ...@@ -327,6 +327,7 @@ class IOSDevice extends Device {
if (debuggingOptions.enableSoftwareRendering) '--enable-software-rendering', if (debuggingOptions.enableSoftwareRendering) '--enable-software-rendering',
if (debuggingOptions.skiaDeterministicRendering) '--skia-deterministic-rendering', if (debuggingOptions.skiaDeterministicRendering) '--skia-deterministic-rendering',
if (debuggingOptions.traceSkia) '--trace-skia', if (debuggingOptions.traceSkia) '--trace-skia',
if (debuggingOptions.endlessTraceBuffer) '--endless-trace-buffer',
if (debuggingOptions.dumpSkpOnShaderCompilation) '--dump-skp-on-shader-compilation', if (debuggingOptions.dumpSkpOnShaderCompilation) '--dump-skp-on-shader-compilation',
if (debuggingOptions.verboseSystemLogs) '--verbose-logging', if (debuggingOptions.verboseSystemLogs) '--verbose-logging',
if (debuggingOptions.cacheSkSL) '--cache-sksl', if (debuggingOptions.cacheSkSL) '--cache-sksl',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment