Skip to content

--trace-skia not getting sent to the engine for iOS simulator #52676

Closed

Description

@gaaclarke

Flutter version: bbc5b9d

If I run flutter with: flutter run --trace-skia

On an engine that has the following patch:

--- a/shell/common/switches.cc
+++ b/shell/common/switches.cc
@@ -271,9 +271,11 @@ Settings SettingsFromCommandLine(const fml::CommandLine& command_line) {
 
   settings.trace_skia =
       command_line.HasOption(FlagForSwitch(Switch::TraceSkia));
+  FML_LOG(ERROR) << "trace skia:" << settings.trace_skia;
 
   command_line.GetOptionValue(FlagForSwitch(Switch::TraceWhitelist),
                               &settings.trace_whitelist);

It prints out: [VERBOSE-2:switches.cc(274)] trace skia:0

I supplied the flag --observatory-port 123 and that does get passed through.

Seen on: iOS

Activity

  1. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    on Mar 16, 2020
  2. jonahwilliams commented on Mar 16, 2020

    @jonahwilliams
    Contributor

    It looks like for simulators we pass very few of the args through. Not sure if this is intentional, but at least with the current design it seems like an easy mistake to make. Especially since the android device/emulator are implemented with the same class, while only iOS is split between the physical device and simulator

    https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/ios/simulators.dart#L397

  3. changed the title [-]--trace-skia not getting sent to the engine[/-] [+]--trace-skia not getting sent to the engine for iOS simulator[/+] on Mar 17, 2020
  4. jmagman commented on Oct 27, 2022

    @jmagman
    Member

    Simulator:

    final List<String> args = <String>[
    '--enable-dart-profiling',
    if (debuggingOptions.debuggingEnabled) ...<String>[
    if (debuggingOptions.buildInfo.isDebug) ...<String>[
    '--enable-checked-mode',
    '--verify-entry-points',
    ],
    if (debuggingOptions.enableSoftwareRendering) '--enable-software-rendering',
    if (debuggingOptions.startPaused) '--start-paused',
    if (debuggingOptions.disableServiceAuthCodes) '--disable-service-auth-codes',
    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',
    if (debuggingOptions.enableImpeller) '--enable-impeller',
    '--observatory-port=${debuggingOptions.hostVmServicePort ?? 0}',
    if (route != null) '--route=$route',
    ],
    ];

    Physical device:

    final List<String> launchArguments = <String>[
    '--enable-dart-profiling',
    '--disable-service-auth-codes',
    if (debuggingOptions.disablePortPublication) '--disable-observatory-publication',
    if (debuggingOptions.startPaused) '--start-paused',
    if (dartVmFlags.isNotEmpty) '--dart-flags="$dartVmFlags"',
    if (debuggingOptions.useTestFonts) '--use-test-fonts',
    if (debuggingOptions.debuggingEnabled) ...<String>[
    '--enable-checked-mode',
    '--verify-entry-points',
    ],
    if (debuggingOptions.enableSoftwareRendering) '--enable-software-rendering',
    if (debuggingOptions.traceSystrace) '--trace-systrace',
    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',
    if (debuggingOptions.cacheSkSL) '--cache-sksl',
    if (debuggingOptions.purgePersistentCache) '--purge-persistent-cache',
    if (route != null) '--route=$route',
    if (platformArgs['trace-startup'] as bool? ?? false) '--trace-startup',
    if (debuggingOptions.enableImpeller) '--enable-impeller',
    ];

    Simulator tests:

    expect(simControl.requests.single.launchArgs, unorderedEquals(<String>[
    '--enable-dart-profiling',
    '--enable-checked-mode',
    '--verify-entry-points',
    '--enable-software-rendering',
    '--start-paused',
    '--disable-service-auth-codes',
    '--skia-deterministic-rendering',
    '--use-test-fonts',
    '--trace-allowlist="foo,bar"',
    '--trace-skia-allowlist="skia.a,skia.b"',
    '--dart-flags=--baz',
    '--enable-impeller',
    '--observatory-port=0',
    ]));

    Physical device tests:

    <String>[
    '--enable-dart-profiling',
    '--disable-service-auth-codes',
    '--disable-observatory-publication',
    '--start-paused',
    '--dart-flags="--foo,--null_assertions"',
    '--enable-checked-mode',
    '--verify-entry-points',
    '--enable-software-rendering',
    '--trace-systrace',
    '--skia-deterministic-rendering',
    '--trace-skia',
    '--endless-trace-buffer',
    '--dump-skp-on-shader-compilation',
    '--verbose-logging',
    '--cache-sksl',
    '--purge-persistent-cache',
    '--enable-impeller',
    ].join(' '),

    Simulator does not need --disable-observatory-publication since it's not doing mDNS broadcasting.

    In the simulator these options are not being passed:

      '--trace-systrace',
      '--trace-skia',
      '--endless-trace-buffer',
      '--dump-skp-on-shader-compilation',
      '--verbose-logging',
      '--cache-sksl',
      '--purge-persistent-cache',
    
  5. added
    P1High-priority issues at the top of the work list
    on Oct 27, 2022
  6. github-actions commented on Nov 23, 2022

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  7. locked as resolved and limited conversation to collaborators on Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listc: contributor-productivityTeam-specific productivity, code health, technical debt.platform-iosiOS applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions