Add a trace-skia-allowlist flag for filtering Skia trace events (#83507)
This commit is contained in:
@@ -632,7 +632,9 @@ class AndroidDevice extends Device {
|
||||
if (debuggingOptions.traceSkia)
|
||||
...<String>['--ez', 'trace-skia', 'true'],
|
||||
if (debuggingOptions.traceAllowlist != null)
|
||||
...<String>['--ez', 'trace-allowlist', debuggingOptions.traceAllowlist],
|
||||
...<String>['--es', 'trace-allowlist', debuggingOptions.traceAllowlist],
|
||||
if (debuggingOptions.traceSkiaAllowlist != null)
|
||||
...<String>['--es', 'trace-skia-allowlist', debuggingOptions.traceSkiaAllowlist],
|
||||
if (debuggingOptions.traceSystrace)
|
||||
...<String>['--ez', 'trace-systrace', 'true'],
|
||||
if (debuggingOptions.endlessTraceBuffer)
|
||||
|
||||
@@ -127,6 +127,12 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment
|
||||
'this comma separated list of allowed prefixes.',
|
||||
valueHelp: 'foo,bar',
|
||||
)
|
||||
..addOption('trace-skia-allowlist',
|
||||
hide: !verboseHelp,
|
||||
help: 'Filters out all Skia trace events except those that are specified in '
|
||||
'this comma separated list of allowed prefixes.',
|
||||
valueHelp: 'skia.gpu,skia.shaders',
|
||||
)
|
||||
..addMultiOption('dart-entrypoint-args',
|
||||
abbr: 'a',
|
||||
help: 'Pass a list of arguments to the Dart entrypoint at application '
|
||||
@@ -199,6 +205,7 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment
|
||||
skiaDeterministicRendering: argParser.options.containsKey('skia-deterministic-rendering') && boolArg('skia-deterministic-rendering'),
|
||||
traceSkia: boolArg('trace-skia'),
|
||||
traceAllowlist: traceAllowlist,
|
||||
traceSkiaAllowlist: stringArg('trace-skia-allowlist'),
|
||||
traceSystrace: boolArg('trace-systrace'),
|
||||
endlessTraceBuffer: boolArg('endless-trace-buffer'),
|
||||
dumpSkpOnShaderCompilation: dumpSkpOnShaderCompilation,
|
||||
|
||||
@@ -251,6 +251,9 @@ abstract class DesktopDevice extends Device {
|
||||
if (debuggingOptions.traceAllowlist != null) {
|
||||
addFlag('trace-allowlist=${debuggingOptions.traceAllowlist}');
|
||||
}
|
||||
if (debuggingOptions.traceSkiaAllowlist != null) {
|
||||
addFlag('trace-skia-allowlist=${debuggingOptions.traceSkiaAllowlist}');
|
||||
}
|
||||
if (debuggingOptions.traceSystrace) {
|
||||
addFlag('trace-systrace=true');
|
||||
}
|
||||
|
||||
@@ -724,6 +724,7 @@ class DebuggingOptions {
|
||||
this.skiaDeterministicRendering = false,
|
||||
this.traceSkia = false,
|
||||
this.traceAllowlist,
|
||||
this.traceSkiaAllowlist,
|
||||
this.traceSystrace = false,
|
||||
this.endlessTraceBuffer = false,
|
||||
this.dumpSkpOnShaderCompilation = false,
|
||||
@@ -772,6 +773,7 @@ class DebuggingOptions {
|
||||
enableSoftwareRendering = false,
|
||||
skiaDeterministicRendering = false,
|
||||
traceSkia = false,
|
||||
traceSkiaAllowlist = null,
|
||||
traceSystrace = false,
|
||||
endlessTraceBuffer = false,
|
||||
dumpSkpOnShaderCompilation = false,
|
||||
@@ -800,6 +802,7 @@ class DebuggingOptions {
|
||||
final bool skiaDeterministicRendering;
|
||||
final bool traceSkia;
|
||||
final String traceAllowlist;
|
||||
final String traceSkiaAllowlist;
|
||||
final bool traceSystrace;
|
||||
final bool endlessTraceBuffer;
|
||||
final bool dumpSkpOnShaderCompilation;
|
||||
|
||||
@@ -363,6 +363,7 @@ class IOSDevice extends Device {
|
||||
if (debuggingOptions.skiaDeterministicRendering) '--skia-deterministic-rendering',
|
||||
if (debuggingOptions.traceSkia) '--trace-skia',
|
||||
if (debuggingOptions.traceAllowlist != null) '--trace-allowlist="${debuggingOptions.traceAllowlist}"',
|
||||
if (debuggingOptions.traceSkiaAllowlist != null) '--trace-skia-allowlist="${debuggingOptions.traceSkiaAllowlist}"',
|
||||
if (debuggingOptions.endlessTraceBuffer) '--endless-trace-buffer',
|
||||
if (debuggingOptions.dumpSkpOnShaderCompilation) '--dump-skp-on-shader-compilation',
|
||||
if (debuggingOptions.verboseSystemLogs) '--verbose-logging',
|
||||
|
||||
@@ -460,6 +460,7 @@ class IOSSimulator extends Device {
|
||||
if (debuggingOptions.skiaDeterministicRendering) '--skia-deterministic-rendering',
|
||||
if (debuggingOptions.useTestFonts) '--use-test-fonts',
|
||||
if (debuggingOptions.traceAllowlist != null) '--trace-allowlist="${debuggingOptions.traceAllowlist}"',
|
||||
if (debuggingOptions.traceSkiaAllowlist != null) '--trace-skia-allowlist="${debuggingOptions.traceSkiaAllowlist}"',
|
||||
if (dartVmFlags.isNotEmpty) '--dart-flags=$dartVmFlags',
|
||||
'--observatory-port=${debuggingOptions.hostVmServicePort ?? 0}'
|
||||
],
|
||||
|
||||
@@ -355,6 +355,7 @@ class WindowsUWPDevice extends Device {
|
||||
if (debuggingOptions.skiaDeterministicRendering) '--skia-deterministic-rendering',
|
||||
if (debuggingOptions.traceSkia) '--trace-skia',
|
||||
if (debuggingOptions.traceAllowlist != null) '--trace-allowlist="${debuggingOptions.traceAllowlist}"',
|
||||
if (debuggingOptions.traceSkiaAllowlist != null) '--trace-skia-allowlist="${debuggingOptions.traceSkiaAllowlist}"',
|
||||
if (debuggingOptions.endlessTraceBuffer) '--endless-trace-buffer',
|
||||
if (debuggingOptions.dumpSkpOnShaderCompilation) '--dump-skp-on-shader-compilation',
|
||||
if (debuggingOptions.verboseSystemLogs) '--verbose-logging',
|
||||
|
||||
Reference in New Issue
Block a user