Too Long; Didn't Read
The Android Profiler is designed specifically for profiling Android applications. However, it has a number of disadvantages, which you can find on StackOverFlow or Issue Tracker. In such cases, it is recommended to use Perfetto instead of Profiler- it sees the whole picture, not just the Android app. With Android 11 (R, API 30) it is enabled by default. It is only available with Android 9 (P, API 28) and it needs to be activated.