-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Description
The switch --enable-dart-profiling is used to configure the dart vm to record profiles in the vmservice. Currently this option is off by default, but is forced on via the launch intent for Android/iOS devices. The desktop shells lack a similar affordance, and besides passing a string value through the FlutterViewController, currently have no way to enable profiling.
For example, in the macOS window code:
let arguments = [
"--enable-dart-profiling"
]
let project = FlutterDartProject.init()
project.engineSwitches = arguments
return FlutterViewController.init(project: project)
We could enable profiling by default for debug and profile builds in the desktop shells in flutter/engine. This would require a way to detect the difference between "profile" AOT and "release" AOT. I'm not sure what happens if this flag is specified in a product build without a vmservice - maybe it is a no-op? I'm also not certain why it isn't enabled by default even for Android/iOS.
EDIT: This may need to also include --trace-systrace and --trace-skia