نظرة عامة على إنشاء مواصفات الإطارات
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
باستخدام أداة Android GPU Inspector (AGI)، يمكنك إنشاء إحصاءات عن إطار معيّن في تطبيق Android
واستخدامه لإجراء تحليل تفصيلي لاستخدام وحدة معالجة الرسومات في التطبيق. ومن خلال بيانات إنشاء الملفات التعريفية هذه، يمكنك الحصول على فهم أعمق لاستخدام وحدة معالجة الرسومات في تطبيقك مقارنةً باستخدام تحليل النظام وحده.
يبدأ تحديد الإطار باستخدام AGI بجمع بيانات آثار الأنشطة وبيانات الأداء الأخرى،
ثم قياسها وعرضها لتحليلها.
تشمل بيانات تحديد ملامح الإطارات المتاحة ما يلي:
طلبات بيانات من واجهة برمجة تطبيقات Vulkan
محتوى Framebuffer
طلبات عرض الشبكة المتداخلة
قيم ذاكرة الوصول العشوائي ووحدة معالجة الرسومات للأوامر
بيانات أداء وحدة معالجة الرسومات لأحداث العرض
بيانات مسار التعلّم
بيانات حالة العرض
موارد الهيئة والتظليل
البدء
يصف مؤشر البدء السريع لـ AGI كيفية إعداد AGI، والتقاط بيانات الملف الشخصي للإطار، ثم فتح ملف التتبُّع الناتج. يصف القسم التالي خيارات التهيئة بمزيد من التفصيل.
خيارات إنشاء الملفات التعريفية
يصف هذا القسم الخيارات الرئيسية المتوفرة عند
التقاط ملف شخصي للإطار.
خيارات Graphics API
تشير خيارات Graphics API إلى واجهة برمجة التطبيقات الخاصة بالرسومات التي يستخدمها تطبيقك. وتتوفّر الخيارات في قائمة Type (النوع) ضمن مربّع الحوار Capture System Profile (التقاط ملف تعريف النظام).
في ما يلي الخيارات المتاحة:
- Vulkan: للتطبيقات التي تستخدم واجهة برمجة التطبيقات Vulkan مباشرةً
- OpenGL على ANGLE: للتطبيقات التي تستخدم OpenGL ES.
تتتبّع أداة AGI أوامر Vulkan مباشرةً. ومع ذلك، إذا كان تطبيقك يستخدم OpenGL ES، تستخدم تقنية AGI
إصدارًا مخصّصًا من ANGLE لترجمة الأوامر إلى أوامر Vulkan قبل تتبُّع التطبيق.
وسيطات إضافية
حقل الوسيطات الإضافية مخصص لتمرير علامات إضافية إلى الأمر am start-activity
من Adb الذي يتم إرساله إلى جهازك لبدء تشغيل التطبيق أثناء عملية التحليل. لمزيد من المعلومات، راجِع أوامر adb.
خيارات البدء والمدة
في قسم Start and Duration (البدء والمدة)، يمكنك تحديد كيفية التقاط AGI للإطار من الملف الشخصي. تتوفر الخيارات التالية:
البدء: يلتقط AGI جميع الأوامر بدءًا من بدء تشغيل التطبيق حتى نهاية
الإطار الأول المعروض.
يدوي: اضغط على زر في مربع حوار التتبُّع لتصوير الإطار يدويًا.
الوقت: يلتقط AGI إطارًا تلقائيًا بعد مرور عدد معيّن من الثواني.
الإطار: يلتقط AGI الإطار المحدّد تلقائيًا.
خيارات التتبُّع
يحتوي قسم خيارات التتبُّع على إعدادات تضبط علامات التتبُّع.
وفي ما يلي الإعدادات المتاحة:
إيقاف التخزين المؤقت: يمكنك إيقاف التخزين المؤقت للذاكرة على الجهاز عند التقاط البيانات. يفيد هذا الخيار في تصحيح أخطاء تعطُّل التطبيق لأنه يضمن
أن يتم إنشاء سلسلة من بيانات التتبُّع حتى التعطُّل. ومع ذلك، فإنها تزيد قليلاً
من إجمالي AGI أثناء تحديد المواصفات
تضمين الإضافات غير المتوافقة: أدرِج الإضافات غير المتوافقة مع AGI على الجهاز. وإذا كان تطبيقك يستخدم إضافة لا تتوافق مع أداة AGI،
قد تواجه سلوكًا غير مرغوب فيه، بما في ذلك حدوث أعطال أو أخطاء طفيفة، عند إعادة تشغيل التتبُّع. تصفَّح
قائمة بالإضافات المتوافقة.
محو بيانات الحزمة: استخدِم الأمر pm clear
adb لطلب محو الجهاز لبيانات مستخدم التطبيق قبل تشغيله.
إعدادات الإخراج
يتضمّن قسم الإخراج إعدادات لتخزين ملفات التتبُّع، مثل:
عرض النتائج
عند فتح ملف تتبُّع يحتوي على بيانات تحديد ملامح الإطارات، تعرض AGI البيانات في واجهة مستخدم محلّل الإطارات لتحليلها.
محلّل الإطارات هو مكوّن AGI الذي يدير واجهة المستخدم والأدوات اللازمة لتحديد إعدادات إطار فردي.
يعرض "محلل الإطارات" البيانات في عناصر
واجهة المستخدم التالية:
تحليل النتائج
توضّح هذه المواضيع كيفية تحليل بيانات تحديد ملامح الإطارات باستخدام أداة AGI:
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ Java وOpenJDK هما علامتان تجاريتان مسجَّلتان لشركة Oracle و/أو الشركات التابعة لها.
تاريخ التعديل الأخير: 2025-07-27 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],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)"]]