フレーム プロファイリングの概要
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Android GPU Inspector(AGI)を使用すると、Android アプリの特定のフレームをプロファイリングし、それを使用してアプリの GPU 使用状況を詳細に分析できます。このプロファイリング データにより、システム プロファイリングのみを使用する場合よりも、アプリの GPU 使用状況をより深く理解できます。
AGI を使用したフレーム プロファイリングは、まずトレースとその他のパフォーマンス データを収集し、分析のために測定して表示します。
使用可能なフレーム プロファイリング データは次のとおりです。
始める
AGI のクイックスタートでは、AGI を設定してフレーム プロファイル データをキャプチャし、生成されたトレース ファイルを開く方法について説明します。次のセクションでは、構成オプションについて詳しく説明します。
プロファイリング オプション
このセクションでは、フレーム プロファイルをキャプチャする際に利用できる主なオプションについて説明します。
Graphics API オプション
Graphics API オプションは、アプリで使用するグラフィック API を示します。オプションは、[Capture System Profile] ダイアログの [Type] リストにあります。以下のオプションがあります。
- Vulkan: Vulkan API を直接使用するアプリ向け。
- OpenGL on ANGLE: OpenGL ES を使用するアプリ向け。
AGI は Vulkan コマンドを直接トレースします。ただし、アプリが OpenGL ES を使用している場合、AGI はカスタムの ANGLE ビルドを使用して、アプリをトレースする前にコマンドを Vulkan コマンドに変換します。
その他の引数
[Additional Arguments] フィールドは、adb am start-activity
コマンドに追加のフラグを渡すために使用します。このコマンドは、プロファイリング中にアプリを起動するためにデバイスに送信されます。詳細については、adb コマンドをご覧ください。
開始と期間のオプション
[Start and Duration] セクションでは、AGI がフレームをプロファイリングしてプロファイリングする方法を指定できます。以下のオプションから選択できます:
開始: AGI は、アプリの起動から最初にレンダリングされたフレームの終わりまで、すべてのコマンドをキャプチャします。
手動: トレース ダイアログのボタンを押してフレームを手動でキャプチャします。
時間: AGI は、指定された秒数後にフレームを自動的にキャプチャします。
Frame: AGI は指定されたフレームを自動的にキャプチャします。
トレース オプション
[Trace Options] セクションには、トレースフラグを構成する設定が含まれています。以下の設定を使用できます。
バッファリングを無効にする: データをキャプチャするときにデバイスのメモリ バッファリングを無効にします。このオプションは、すべてのトレースデータがクラッシュまでシリアル化されるため、アプリのクラッシュのデバッグに役立ちます。ただし、プロファイリング時の AGI のオーバーヘッドは若干増加します。
Include Unsupported Extensions: デバイスの AGI によってサポートされていない拡張機能を含めます。AGI でサポートされていない拡張機能をアプリで使用している場合、トレースの再生時に、微妙なエラーやクラッシュなど、望ましくない動作が発生する可能性があります。サポートされている拡張機能のリストをご覧ください。
パッケージ データを消去する: pm clear
adb コマンドを使用して、デバイスを起動前にアプリのユーザーデータを消去するようリクエストします。
出力設定
出力セクションには、トレース ファイルのストレージに関する設定が含まれます。
結果を確認する
フレーム プロファイリング データを含むトレース ファイルを開くと、分析用のデータが Frame Profiler UI に表示されます。
Frame Profiler は、個々のフレームをプロファイリングするための UI とインストルメンテーションを管理する AGI コンポーネントです。Frame Profiler では、次の UI 要素にデータが表示されます。
結果を分析する
以下のトピックでは、AGI を使用してフレーム プロファイリング データを分析する方法について説明します。
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-07-27 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-27 UTC。"],[],[],null,["# Frame profiling overview\n\nWith Android GPU Inspector (AGI), you can profile a specific frame of your Android app\nand use it to perform an in-depth analysis of the app's GPU usage. This\nprofiling data can give you a deeper understand of your app's GPU usage than\nwith [system profiling](/agi/sys-trace/system-profiler) alone.\n\nFrame profiling with AGI starts by collecting traces and other performance data\nand then measuring and displaying it for analysis.\n\nThe available frame profiling data includes the following:\n\n- Vulkan API calls\n\n- Framebuffer content\n\n- Rendered mesh draw calls\n\n- RAM and GPU memory values for commands\n\n- GPU performance data for rendering events\n\n- Pipeline data\n\n- Render state data\n\n- Texture and shader resources\n\nGet started\n-----------\n\nThe AGI [quickstart](/agi/start) describes how to set up AGI, capture frame\nprofile data, and then open the resulting trace file. The next section describes\nthe configuration options in more detail.\n\nProfiling options\n-----------------\n\nThis sections describes the main options that are available when you\ncapture a frame profile.\n\n### Graphics API options\n\nThe Graphics API options indicate the graphics API used by your app. The options\nare available in the **Type** list of the **Capture System Profile** dialog.\nThese are the available options:\n\n- **Vulkan**: for apps that use the Vulkan API directly.\n- **OpenGL on ANGLE**: for apps that use OpenGL ES.\n\nAGI traces Vulkan commands directly. However, if your app uses OpenGL ES, AGI\nuses a custom [ANGLE](https://github.com/google/angle) build to\ntranslate the commands into Vulkan commands before tracing the app.\n\n### Additional arguments\n\nThe **Additional Arguments** field is for passing additional flags to the\nadb `am start-activity` command, which is sent to your device to start your app\nduring profiling. For more information, see\n[adb commands](/studio/command-line/adb).\n\n### Start and duration options\n\nIn the **Start and Duration** section, you can specify how AGI captures the\nframe to profile. The following options are available:\n\n- **Beginning**: AGI captures all commands from application startup to the end\n of the first rendered frame.\n\n- **Manual**: Press a button in the tracing dialog to manually capture the\n frame.\n\n- **Time**: AGI automatically captures a frame after the given number of seconds\n elapse.\n\n- **Frame**: AGI automatically captures the specified frame.\n\n### Trace options\n\nThe **Trace Options** section contains settings that configure tracing flags.\nThese are the available settings:\n\n- **Disable Buffering**: Disable memory buffering on the device when capturing\n data. This option is useful for debugging an app crash because it ensures\n that all tracing data is serialized up to the crash. However, it slightly\n increases the overhead of AGI during profiling.\n\n- **Include Unsupported Extensions** : Include extensions that are not supported\n by AGI on the device. If your app uses an extension that isn't supported by\n AGI, you might encounter undesirable behavior, including subtle errors or\n crashes, when replaying the trace. Browse\n [a list of supported extensions](/agi/vulkan-extensions).\n\n- **Clear Package Data** : Use the `pm clear`\n [adb command](/studio/command-line/adb) to request that the device clear your\n app's user data before launching.\n\n### Output settings\n\nThe **Output** section contains settings for trace file storage, such as:\n\n- Specify the directory to store the trace file.\n\n- Modify the automatically generated file name for the trace file.\n\nView the results\n----------------\n\nWhen you open a trace file that contains frame profiling data, AGI displays the\ndata in the Frame Profiler UI for analysis.\n\nFrame Profiler is the AGI component that manages the UI and\ninstrumentation for profiling an individual frame.\nFrame Profiler displays data in the following UI\nelements:\n\n- [**Commands** pane](/agi/frame-trace-gui/commands-pane):\n Vulkan API calls.\n\n- [**Framebuffer** pane](/agi/frame-trace-gui/framebuffer-pane):\n Framebuffer content.\n\n- [**Geometry** pane](/agi/frame-trace-gui/geometry-pane):\n Rendering of mesh draw calls.\n\n- [**Memory** pane](/agi/frame-trace-gui/memory-pane):\n RAM and GPU memory values for commands.\n\n- [**Performance** pane](/agi/frame-trace-gui/perftab-pane):\n GPU performance data for rendering events.\n\n- [**Pipeline** pane](/agi/frame-trace-gui/pipeline-pane):\n Pipeline content.\n\n- [**Shader** pane](/agi/frame-trace-gui/shader-pane):\n Shader content.\n\n- [**State** pane](/agi/frame-trace-gui/state-pane):\n The render state for submitted commands.\n\n- [**Textures** pane](/agi/frame-trace-gui/textures-pane):\n A list of texture resources that are associated with a command.\n\n- [**Texture** pane](/agi/frame-trace-gui/texture-pane):\n The content of a selected texture resource.\n\n- [**Report** pane](/agi/frame-trace-gui/report-pane):\n A list of profiling errors.\n\nAnalyze the results\n-------------------\n\nThese topics describe how to analyze frame profiling data with AGI:\n\n- [Analyze render passes](/agi/frame-trace/renderpasses)\n- [Analyze shader performance](/agi/frame-trace/shader-performance)\n- [Analyze vertex formats](/agi/frame-trace/vertex-formats)"]]