시스템 프로파일링 개요
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Android GPU 검사기 (AGI)를 사용하면 Android 앱의 다양한 추적 옵션과 GPU 성능 측정을 포함하는 시스템 프로파일링을 실행할 수 있습니다. Android 스튜디오 프로파일링 도구와 달리 AGI는 이러한 여러 기능을 하나의 도구로 결합한 후 더 심층적인 GPU 적용 범위 및 분석을 제공합니다. 사용 가능한 시스템 프로파일링 데이터에는 다음이 포함됩니다.
- ATrace 마커를 포함한 앱 trace 데이터
- CPU 및 프로세스 예약 데이터
- 카운터, 활동, 수명 주기 데이터와 같은 GPU 성능 정보
- Vulkan API 호출의 트레이스 데이터
- 메모리 사용량 통계
- 배터리 사용량 통계
시스템 프로파일러는 여러 앱 프레임에 걸친 시스템 프로파일링을 위한 UI 및 계측을 관리하는 AGI 구성요소입니다. 이 시스템은 Perfetto 추적 시스템을 기반으로 빌드됩니다. 개별 앱 프레임을 프로파일링하기 위한 AGI 구성요소에 관한 자세한 내용은 프레임 프로파일러 개요를 참고하세요.
시작하기
AGI 빠른 시작에서는 AGI를 설정하고 시스템 프로필을 캡처한 다음 결과 트레이스 파일을 여는 방법을 설명합니다. 다음 섹션에서는 구성 옵션을 자세히 설명합니다.
프로파일링 옵션
이 섹션에서는 앱을 프로파일링할 때 사용할 수 있는 기본 옵션을 설명합니다.
애플리케이션 설정
Application 설정은 시스템 프로파일링 중에 실행하고 추적할 Android 앱을 식별합니다. 시스템 프로파일링 중에 추적할 Android 앱을 선택하는 것은 선택사항이지만 이 앱이 없으면 결과 추적 파일에 애플리케이션의 ATrace 마커와 GPU 활동이 포함되지 않으므로 권장됩니다.
trace 옵션
Trace Options는 수집할 프로파일링 데이터를 지정합니다. 구성 버튼에는 사용 가능한 데이터 소스가 표시됩니다.
시스템을 프로파일링할 때 Android 기기에 미치는 성능 영향을 최소화하려면 트레이스 기간을 1분 이상으로 설정하는 경우 데이터 소스를 더 적게 선택하는 것이 좋습니다. 하지만 1분 미만의 trace의 경우 영향을 최소화하면서 모든 데이터 소스를 선택할 수 있습니다.
CPU 옵션
CPU 옵션을 사용하면 ftrace를 통해 CPU 및 프로세스 스케줄링 데이터를 수집할 수 있습니다. 이를 통해 각 CPU 코어에서 실행 중인 프로세스와 스레드를 확인할 수 있습니다. 다음 옵션을 사용 설정할 수도 있습니다.
- 주파수 및 유휴 상태: CPU 코어 주파수 및 유휴 상태 변경 이벤트를 수집하여 부하에 따라 CPU가 수직 확장 또는 축소되는 방식을 검사할 수 있습니다.
- 체인 예약 / 지연 시간: 스레드 예약 지연 및 선점에 관한 추가 스레드 상태 데이터를 수집합니다.
- Thread slices: 프로세스 뷰에서 ATrace 마커를 수집합니다.
GPU 옵션
GPU 옵션을 사용하면 GPU 주파수 및 메모리 사용량 데이터 수집과 같은 앱의 GPU 사용량 프로파일링이 가능합니다. 이 데이터를 수집하려면 Application 설정에서 추적할 애플리케이션을 지정해야 합니다. 옵션에는 다음이 포함됩니다.
카운터: GPU 카운터 샘플을 수집합니다. 이 데이터는 GPU의 사용률을 확인하고 병목 현상을 찾는 데 사용되므로 이러한 설정을 구성하는 것이 좋습니다.
카운터는 하드웨어별로 다릅니다. 예를 들어 샘플 수집의 최소 빈도 (설문조사 비율)는 카운터 유형에 따라 다를 수 있습니다. 지원되는 카운터에 대한 자세한 내용은 GPU 성능 카운터를 참조하세요.
프레임 수명 주기: 프레임 버퍼가 애플리케이션, 컴포지터, 창 관리자를 통해 이동하는 방식을 결정하는 데 도움이 되는 SufaceFlinger 이벤트를 추적합니다. 이러한 이벤트를 사용하면 누락된 앱 프레임을 찾고 렌더링 파이프라인에서 지연 시간의 원인을 식별할 수 있습니다.
Renderstage 슬라이스: 애플리케이션에서 GPU를 사용하는 방법을 결정하는 데 도움이 되는 데이터를 수집합니다.
Vulkan 옵션
Vulkan 옵션을 사용하면 Vulkan API 호출을 추적할 수 있으며 함수 유형별로 사용 설정할 수 있습니다. 이 데이터를 사용하여 Vulkan API 호출의 CPU 오버헤드를 확인할 수 있습니다. 트레이스는 각 함수 호출의 지속 시간을 기록하며, Vulkan 이벤트 트랙에서 데이터를 분석할 때 앱의 스레드 슬라이스 내에 표시됩니다.
기타 옵션
추가적인 시스템 프로파일링 옵션에는 다음이 포함됩니다.
메모리: 전역 및 각 프로세스의 필수 메모리 사용량 통계를 수집합니다.
배터리: 배터리 통계를 수집합니다. 이를 통해 애플리케이션의 전력 사용량을 대략적으로 추정할 수 있습니다.
기기의 파일로 강제 추적: 트레이스 데이터는 일반적으로 트레이스를 캡처하는 동안 USB를 통해 스트리밍됩니다. 이렇게 하면 오버헤드가 가장 적고 긴 트레이스가 가능합니다. 하지만 USB 지연 시간으로 인해 문제가 발생하거나 프로파일링 데이터가 삭제된 경우 이 옵션을 선택하여 기기에 트레이스 파일을 저장할 수 있습니다. 그러면 추적이 완료된 후 AGI가 이를 다운로드합니다. 이렇게 하려면 기기의 내부 저장소에 트레이스 파일을 저장하기에 충분한 공간이 필요합니다.
상급자 모드
고급 모드로 전환 링크는 프로파일링 옵션을 저장하는 Pefetto 트레이스 구성을 수동으로 수정할 수 있는 고급 구성 모드를 시작합니다.
결과 보기 및 분석
시스템 프로파일링 데이터가 포함된 트레이스 파일을 열면 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,["# System profiling overview\n\nWith Android GPU Inspector (AGI), you can perform system profiling that includes\na wide range of tracing options and GPU performance measurements for your\nAndroid app. In comparison to the\n[Android Studio profiling tools](/topic/performance/tracing),\nAGI combines many of those capabilities into one tool, and then provides more\nin-depth GPU coverage and analysis. The available system profiling data\nincludes the following:\n\n- App trace data including [ATrace](https://perfetto.dev/docs/data-sources/atrace) markers\n- CPU and process scheduling data\n- GPU performance info such as counter, activity, and lifecycle data\n- Trace data for Vulkan API calls\n- Memory usage statistics\n- Battery usage statistics\n\nSystem Profiler is the AGI component that manages the UI and\ninstrumentation for system profiling over multiple app frames. It is built on\ntop of the [Perfetto](https://perfetto.dev) tracing system. For\ninformation about the AGI component for profiling individual app frames, see the\n[Frame profiler](/agi/frame-trace/frame-profiler) overview.\n\nGet started\n-----------\n\nThe AGI [quickstart](/agi/start) describes how to set up AGI, capture a system\nprofile, and then open the resulting trace file. The next section describes the\nconfiguration options in more detail.\n\nProfiling options\n-----------------\n\nThis sections describes the main options that are available when you\n[profile an app](/agi/start#system-profile).\n\n### Application settings\n\nThe **Application** settings identify the Android app to run and trace during\nsystem profiling. Selecting an Android app to trace during system profiling is\noptional but recommended because without it, the resulting trace file won't\ninclude [ATrace](https://perfetto.dev/docs/data-sources/atrace)\nmarkers and GPU activity for an application.\n\n### Trace options\n\nThe **Trace Options** specify the profiling data to collect. The\n**Configure** button displays the available data sources.\n\nTo minimize the performance impact on your Android device when you profile the\nsystem, we recommend that you select fewer data sources if you set the trace\n**Duration** to over a minute. However, for traces under a minute, you can\nselect all data sources with minimal impact.\n\n#### CPU options\n\nThe **CPU** option enables the collection of CPU and\nprocess scheduling data through\n[ftrace](https://en.wikipedia.org/wiki/Ftrace). This\nallows you to see what process and thread is running on each CPU\ncore. You can also enable these options:\n\n- **Frequency and idle states**: Collects CPU core frequency and idle state change events, which allows you to inspect how the CPU is scaled up or down based on load.\n- **Scheduling chains / latency**: Collects additional thread state data about thread scheduling delays and preemption.\n- **Thread slices**: Collects ATrace markers in the process views.\n\n#### GPU options\n\nThe **GPU** options enable profiling of your app's GPU usage, such as the\ncollection of GPU frequency and memory usage data. To collect this data, you\nmust specify an application to trace in the **Application** settings. The\noptions include the following:\n\n- **Counters**: Collects GPU counter samples. This data is used to determine\n how busy the GPU is and locate bottlenecks, so we recommend that you configure\n these settings.\n\n The counters are hardware-specific. For example, the minimum frequency for\n sample collection (**Poll Rate** ) may differ based on the counter type. For\n information about supported counters, see\n [GPU performance counters](/agi/sys-trace/counters-arm).\n- **Frame Lifecycle** : Traces\n [SufaceFlinger](https://source.android.com/devices/graphics/surfaceflinger-windowmanager)\n events, which help determine how frame buffers move through your application,\n the compositor, and window manager. These events allow you to locate missed\n app frames and identify sources of latency in your rendering pipeline.\n\n- **Renderstage slices** Collects data that helps determine how your application\n is using the GPU.\n\n#### Vulkan options\n\nThe **Vulkan** options enable tracing of Vulkan API calls, which can then be\nenabled by function type. You can use this\ndata to determine the CPU overhead of Vulkan API calls. The trace records the\nduration of each function call, which is displayed within your app's thread\nslices when you analyze the data in the\n[Vulkan event track](/agi/sys-trace/system-profiler-gui#vulkan_event_track).\n\n#### Other options\n\nThe additional system profiling options include:\n\n- **Memory**: Collect essential memory usage statistics, both globally and for\n each process.\n\n- **Battery**: Collects battery statistics. This can give you a rough estimate\n of the power usage of your application.\n\n- **Force Tracing into a File on the Device**: Trace data is typically streamed\n over USB while the trace is being captured, which has the least amount of\n overhead and allows for long traces. However, if you encounter problems\n or dropped profiling data due to USB latency, you can select this option to\n save the trace file on the device, which AGI then downloads after tracing\n concludes. This requires sufficient space on your device's internal storage\n to store the trace file.\n\n#### Advanced mode\n\nThe **Switch to advanced mode** link launches advanced configuration mode, which\nallows you to manually edit the\n[Pefetto trace configuration](https://perfetto.dev/docs/concepts/config)\nthat stores your profiling options.\n\nView and analyze the results\n----------------------------\n\nWhen you open a trace file that contains system profiling data, AGI displays the\ndata in the System Profiler UI for analysis. For information\nabout viewing the data, see [View a system profile](/agi/sys-trace/system-profiler-gui).\n\nThese topics describe how to analyze system profiling data with AGI:\n\n- [Analyze frame processing times](/agi/sys-trace/long)\n- [Analyze memory efficiency](/agi/sys-trace/memory-efficiency)\n- [Analyze texture memory bandwidth usage](/agi/sys-trace/texture-memory-bw)\n- [Analyze vertex memory bandwidth usage](/agi/sys-trace/vertex-memory-bw)\n- [Analyze thread scheduling](/agi/sys-trace/threads-scheduling)"]]