Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[Impeller] add explainer for Android CPU profiling. #48407

Merged
merged 3 commits into from
Nov 27, 2023

Conversation

jonahwilliams
Copy link
Member

So you don't have to talk to me to figure out how to do this.

Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM I would prefer that this follows the same markdown guidelines we use for the webpage with respect to the column width (80 characters). There are also linters for md in vscode but I didn't notice anything.


2. Configure Gradle to not remove strip sources

In the flutter project file android/app/build.gradle, add the following line under the android block:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In the flutter project file android/app/build.gradle, add the following line under the android block:
In the flutter project file `android/app/build.gradle`, add the following line under the `android` block:

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

}
```

3. `flutter run` the app with the local engine flags.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
3. `flutter run` the app with the local engine flags.
3. `flutter run` the app with the local engine flags (`--local-engine`, `--local-engine-host`, `--local-engine-src-path`)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

3. `flutter run` the app with the local engine flags.
4. Open Android Studio.

You can create a new blank project if you don't have one already. You do not need to open the application project nor do you need to run the App through Android Studio. In fact, its much easier if you do not do those things.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
You can create a new blank project if you don't have one already. You do not need to open the application project nor do you need to run the App through Android Studio. In fact, its much easier if you do not do those things.
You can create a new blank project if you don't have one already. You do not need to open the application project nor do you need to run the App through Android Studio. In fact, it's much easier if you do not do those things.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


# Android CPU Profiling

Android devices have different performance characteristics than iOS devices, and I've found that CPU traces frequently reveal surprising performance issues, such as https://github.com/flutter/engine/pull/48303 . This document describes the steps to capture an equivalent [flame graph](https://cacm.acm.org/magazines/2016/6/202665-the-flame-graph/abstract) on your local Android device.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scratch "I've found that", as it's reviewed/in our repo it doesn't need an "I found".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@jonahwilliams
Copy link
Member Author

I installed a markdown formatter and it actually removed all of the line breaks. I don't think we need to enforce 80 col for something that we're not reading the source for 🤷‍♂️

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 27, 2023
@auto-submit auto-submit bot merged commit deea2f4 into flutter:main Nov 27, 2023
@jonahwilliams jonahwilliams deleted the android_benchmarking branch November 27, 2023 20:46
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 27, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Nov 27, 2023
…139099)

flutter/engine@900ce09...0a098bd

2023-11-27 skia-flutter-autoroll@skia.org Manual roll Dart SDK from c9bdb5884670 to ef97fe2415fd (6 revisions) (flutter/engine#48414)
2023-11-27 jonahwilliams@google.com [Impeller] add explainer for Android CPU profiling. (flutter/engine#48407)
2023-11-27 jhy03261997@gmail.com [ios] Send " did gain focus" message from engine to framework  (flutter/engine#48252)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
caseycrogers pushed a commit to caseycrogers/flutter that referenced this pull request Dec 29, 2023
…lutter#139099)

flutter/engine@900ce09...0a098bd

2023-11-27 skia-flutter-autoroll@skia.org Manual roll Dart SDK from c9bdb5884670 to ef97fe2415fd (6 revisions) (flutter/engine#48414)
2023-11-27 jonahwilliams@google.com [Impeller] add explainer for Android CPU profiling. (flutter/engine#48407)
2023-11-27 jhy03261997@gmail.com [ios] Send " did gain focus" message from engine to framework  (flutter/engine#48252)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jacksongardner@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App e: impeller
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants