Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Adam Duskett <adam.duskett@amarulasolutions.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v3 07/11] package/flutter-engine: Add profile runtime mode selection
Date: Thu, 11 Jan 2024 19:43:48 +0100	[thread overview]
Message-ID: <ZaA25BaogT4VFbwI@landeda> (raw)
In-Reply-To: <20240102235957.3072102-8-adam.duskett@amarulasolutions.com>

Adam, All,

On 2024-01-02 16:59 -0700, Adam Duskett spake thusly:
> Buildroot only offers two possible runtime modes for Flutter that are
> automatically selected based on what the user has selected:
>   - debug if BR2_ENABLE_RUNTIME_DEBUG is enabled.
>   - release if BR2_ENABLE_RUNTIME_DEBUG is not enabled.
> 
> However, Flutter also offers the profile runtime mode option.
> 
> From https://docs.flutter.dev/testing/build-modes:
> 
> ```
> "Use profile mode when you want to analyze performance."
> 
> What is profile mode?
> Some debugging ability is maintained in profile mode, which is enough to
> profile your app's performance. Profile mode is turned off on the emulator
> and simulator because their behavior does not represent actual performance.
> ```
> 
> As Flutter projects can be heavy and consume many resources, it is necessary
> to allow users developing a Flutter application to profile their application
> during development.
> 
> This patch introduces a new choice: FLUTTER_ENGINE_RUNTIME_MODE_PROFILE.
> If unselected, the global option BR2_ENABLE_RUNTIME_DEBUG continues to
> determine whether to build Flutter in release or debug mode. This new option
> may confuse some users who wonder where the release and debug options are, so
> the help menu section under the FLUTTER_ENGINE_RUNTIME_MODE_PROFILE option
> explains that the global BR2_ENABLE_RUNTIME_DEBUG option controls the debug
> and release modes.

Thanks, this is a pretty good commit log! It has all the nedded
information: the current state, the issue that causes, how you fixed it,
and some important note about lifting an ambiguity for the user. Thanks!

> Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  package/flutter-engine/Config.in         | 25 ++++++++++++++++++++++++
>  package/flutter-engine/flutter-engine.mk |  4 +++-
>  2 files changed, 28 insertions(+), 1 deletion(-)
> 
> diff --git a/package/flutter-engine/Config.in b/package/flutter-engine/Config.in
> index 2ec5b90ffd..3c92e40f74 100644
> --- a/package/flutter-engine/Config.in
> +++ b/package/flutter-engine/Config.in
> @@ -39,6 +39,31 @@ config BR2_PACKAGE_FLUTTER_ENGINE
>  
>  	  https://github.com/flutter/engine
>  
> +if BR2_PACKAGE_FLUTTER_ENGINE
> +
> +config FLUTTER_ENGINE_RUNTIME_MODE_PROFILE
> +	bool "enable profiling"
> +	help
> +	  Some debugging ability is maintained—enough to profile your
> +	  apps performance. Profile mode is disabled on the emulator
> +	  and simulator, because their behavior is not representative
> +	  of real performance. Profile mode is similar to release mode,
> +	  with the following differences:
> +
> +	  - Some service extensions, such as the one that enables the
> +	    performance overlay, are enabled.
> +
> +	  - Tracing is enabled, and tools supporting source-level
> +	    debugging (such as DevTools) can connect to the process.
> +
> +	  If this option is left unselected, the global option
> +	  BR2_ENABLE_RUNTIME_DEBUG determines whether to build Flutter
> +	  in release or debug mode.
> +
> +	  https://docs.flutter.dev/testing/build-modes#profile
> +
> +endif
> +
>  comment "flutter-engine needs an OpenGL or OpenGLES backend"
>  	depends on BR2_PACKAGE_FLUTTER_ENGINE_ARCH_SUPPORTS
>  	depends on !BR2_PACKAGE_HAS_LIBGL && !BR2_PACKAGE_HAS_LIBGLES
> diff --git a/package/flutter-engine/flutter-engine.mk b/package/flutter-engine/flutter-engine.mk
> index c3ac144f2a..e972612097 100644
> --- a/package/flutter-engine/flutter-engine.mk
> +++ b/package/flutter-engine/flutter-engine.mk
> @@ -52,7 +52,9 @@ FLUTTER_ENGINE_TARGET_ARCH = x64
>  FLUTTER_ENGINE_TARGET_TRIPPLE = x86_64-unknown-linux-gnu
>  endif
>  
> -ifeq ($(BR2_ENABLE_RUNTIME_DEBUG),y)
> +ifeq ($(FLUTTER_ENGINE_RUNTIME_MODE_PROFILE),y)
> +FLUTTER_ENGINE_RUNTIME_MODE=profile
> +else ifeq ($(BR2_ENABLE_RUNTIME_DEBUG),y)
>  FLUTTER_ENGINE_RUNTIME_MODE=debug
>  else
>  FLUTTER_ENGINE_RUNTIME_MODE=release
> -- 
> 2.43.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2024-01-11 18:43 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-02 23:59 [Buildroot] [PATCH v3 00/11] flutter package improvements Adam Duskett
2024-01-02 23:59 ` [Buildroot] [PATCH v3 01/11] package/Config.in: move flutter-pi Adam Duskett
2024-01-10 22:45   ` Yann E. MORIN
2024-01-13 20:18   ` Peter Korsgaard
2024-01-02 23:59 ` [Buildroot] [PATCH v3 02/11] package/Config.in: move flutter-gallery menu entry Adam Duskett
2024-01-10 22:46   ` Yann E. MORIN
2024-01-13 20:18   ` Peter Korsgaard
2024-01-02 23:59 ` [Buildroot] [PATCH v3 03/11] package/flutter-sdk-bin: bump version to 3.16.5 Adam Duskett
2024-01-10 23:21   ` Yann E. MORIN
2024-01-02 23:59 ` [Buildroot] [PATCH v3 04/11] package/flutter-engine: " Adam Duskett
2024-01-10 23:22   ` Yann E. MORIN
2024-01-02 23:59 ` [Buildroot] [PATCH v3 05/11] package/flutter-pi: bump version to f34d7bdbda713ba607b9625541ddfa314d9999a0 Adam Duskett
2024-01-11 18:35   ` Yann E. MORIN
2024-01-02 23:59 ` [Buildroot] [PATCH v3 06/11] package/flutter-pi: add the charset converter plugin as a menuconfig option Adam Duskett
2024-01-11 18:38   ` Yann E. MORIN
2024-01-02 23:59 ` [Buildroot] [PATCH v3 07/11] package/flutter-engine: Add profile runtime mode selection Adam Duskett
2024-01-11 18:43   ` Yann E. MORIN [this message]
2024-01-02 23:59 ` [Buildroot] [PATCH v3 08/11] package/flutter-sdk-bin: add dart arguments for different runtime modes Adam Duskett
2024-01-11 18:48   ` Yann E. MORIN
2024-01-11 19:40     ` Adam Duskett
2024-01-11 20:22       ` Yann E. MORIN
2024-01-11 20:28   ` Yann E. MORIN
2024-01-02 23:59 ` [Buildroot] [PATCH v3 09/11] package/flutter-gallery: add a configure step Adam Duskett
2024-01-02 23:59 ` [Buildroot] [PATCH v3 10/11] package/flutter-gallery: clean up install_target_cmds Adam Duskett
2024-01-02 23:59 ` [Buildroot] [PATCH v3 11/11] package/flutter-sdk-bin/Config.in.host: add pub-cache location option Adam Duskett
2024-01-13 17:32   ` Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZaA25BaogT4VFbwI@landeda \
    --to=yann.morin.1998@free.fr \
    --cc=adam.duskett@amarulasolutions.com \
    --cc=buildroot@buildroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox