프레임 프로파일링 개요
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Android GPU 검사기 (AGI)를 사용하면 Android 앱의 특정 프레임을 프로파일링하고 이를 사용하여 앱의 GPU 사용에 관한 심층 분석을 실행할 수 있습니다. 이 프로파일링 데이터를 사용하면 시스템 프로파일링만 사용할 때보다 앱의 GPU 사용량을 더 자세히 파악할 수 있습니다.
AGI를 사용한 프레임 프로파일링은 트레이스 및 기타 성능 데이터를 수집한 다음 분석을 위해 이를 측정하고 표시하는 것으로 시작됩니다.
사용 가능한 프레임 프로파일링 데이터에는 다음이 포함됩니다.
Vulkan API 호출
Framebuffer 콘텐츠
렌더링된 메시 그리기 호출
명령어의 RAM 및 GPU 메모리 값
렌더링 이벤트의 GPU 성능 데이터
파이프라인 데이터
상태 데이터 렌더링
텍스처 및 셰이더 리소스
시작하기
AGI 빠른 시작에서는 AGI를 설정하고 프레임 프로필 데이터를 캡처한 다음 결과 트레이스 파일을 여는 방법을 설명합니다. 다음 섹션에서는 구성 옵션을 자세히 설명합니다.
프로파일링 옵션
이 섹션에서는 프레임 프로필을 캡처할 때 사용할 수 있는 기본 옵션을 설명합니다.
그래픽 API 옵션
Graphics API 옵션은 앱에서 사용하는 그래픽 API를 나타냅니다. 이 옵션은 Capture System Profile 대화상자의 Type 목록에서 확인할 수 있습니다.
사용 가능한 옵션은 다음과 같습니다.
- Vulkan: Vulkan API를 직접 사용하는 앱에 사용됩니다.
- ANGLE의 OpenGL: OpenGL ES를 사용하는 앱에 사용됩니다.
AGI는 Vulkan 명령어를 직접 추적합니다. 그러나 앱에서 OpenGL ES를 사용하는 경우 AGI는 앱을 추적하기 전에 맞춤 ANGLE 빌드를 사용하여 명령어를 Vulkan 명령어로 변환합니다.
추가 인수
추가 인수 필드는 프로파일링 중에 앱을 시작하기 위해 기기로 전송되는 추가 플래그를 adb am start-activity
명령어에 전달하는 데 사용됩니다. 자세한 내용은 adb 명령어를 참고하세요.
시작 및 기간 옵션
Start and Duration(시작 및 기간) 섹션에서는 AGI가 프로파일링할 프레임을 캡처하는 방법을 지정할 수 있습니다. 사용할 수 있는 옵션은 다음과 같습니다.
시작: AGI는 애플리케이션 시작부터 첫 번째 렌더링된 프레임의 끝까지 모든 명령어를 캡처합니다.
수동: 트레이싱 대화상자의 버튼을 눌러 프레임을 수동으로 캡처합니다.
시간: AGI는 지정된 시간(초)이 지나면 프레임을 자동으로 캡처합니다.
Frame: AGI가 지정된 프레임을 자동으로 캡처합니다.
trace 옵션
추적 옵션 섹션에는 추적 플래그를 구성하는 설정이 포함되어 있습니다.
사용 가능한 설정은 다음과 같습니다.
버퍼링 사용 중지: 데이터를 캡처할 때 기기에서 메모리 버퍼링을 사용 중지합니다. 이 옵션은 비정상 종료까지 모든 추적 데이터가 직렬화되도록 하므로 앱 비정상 종료를 디버깅하는 데 유용합니다. 프로파일링하는 동안 AGI의 오버헤드가 약간 증가합니다.
지원되지 않는 확장 프로그램 포함: 기기에서 AGI가 지원하지 않는 확장 프로그램을 포함합니다. 앱이 AGI에서 지원하지 않는 확장 프로그램을 사용하는 경우 트레이스를 다시 재생할 때 미묘한 오류나 비정상 종료와 같은 바람직하지 않은 동작이 발생할 수 있습니다. 지원되는 확장 프로그램 목록 둘러보기
패키지 데이터 삭제: pm clear
adb 명령어를 사용하여 기기가 실행 전에 앱의 사용자 데이터를 삭제하도록 요청합니다.
출력 설정
Output 섹션에는 다음과 같은 트레이스 파일 스토리지의 설정이 포함됩니다.
결과 보기
프레임 프로파일링 데이터가 포함된 트레이스 파일을 열면 AGI가 분석을 위해 프레임 프로파일러 UI에 데이터를 표시합니다.
프레임 프로파일러는 개별 프레임 프로파일링을 위한 UI 및 계측을 관리하는 AGI 구성요소입니다.
프레임 프로파일러는 다음 UI 요소에 데이터를 표시합니다.
결과를 분석합니다.
다음 주제에서는 AGI로 프레임 프로파일링 데이터를 분석하는 방법을 설명합니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 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)"]]