اعتبارًا من 27 آذار (مارس) 2025، ننصحك باستخدام android-latest-release بدلاً من aosp-main لإنشاء AOSP والمساهمة فيه. لمزيد من المعلومات، يُرجى الاطّلاع على التغييرات في AOSP.
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
يوفّر نواة Linux العديد من الآليات لتشخيص المشاكل، بما في ذلك
التتبّع و
BPF و
التحليل. تتوفّر معظم
هذه الأساليب في ملف ثنائي لقلب
صورة Kernel Generic (GKI). عند تطوير المنتجات، هناك العديد من الأدوات التي يتم دمجها
في عمليات التطوير أو الدمج، ويتطلّب بعضها ميزات ملف التمهيد
التي لا تشكّل جزءًا من GKI. كما هو الحال مع معظم ميزات GKI، ننصحك بالانضمام إلى المطوّرين الرئيسيين لإضافة هذه الميزات إلى Linux.
ميزات تصحيح الأخطاء في مرحلة ما بعد النشر في وحدات المورّدين
تتشابه ميزات تصحيح الأخطاء في نطاقها مع الأنواع الأخرى من الميزات، ويجب أن تتمثّل في
اتّباع العمليات نفسها الموضّحة في
التصحيحات الخاصة بنظام التشغيل Android.
ميزات تصحيح الأخطاء المزعجة في مرحلة الإصدار
تتطلّب بعض ميزات تصحيح الأخطاء المفيدة خيارات ضبط خاصة يتم إيقافها في GKI، وبالتالي تتطلّب إصدارًا خاصًا من kernel. قد يتم إيقاف هذه
الميزات بسبب عقوبات الأداء أو عدم ملاءمتها
للاستخدام في مرحلة الإنتاج، ولكنّها لا غنى عنها لتصحيح أخطاء
أنواع معيّنة من المشاكل. وتشمل الأمثلة على هذه الأدوات معقمات اليدين (KASAN وUBSAN)
debugfs وغيرها من الميزات والأدوات الخاصة بالشركاء.
يعود الأمر إليك في تحديد كيفية إدارة نواة خاصة تتيح تصحيح الأخطاء
وتؤثّر في واجهة وحدة Kernel (KMI). من الممارسات الشائعة أن يكون لديك
إصدار تصحيح أخطاء داخلي وتسليم العناصر الناتجة إلى العملاء الداخليين
أو شركاء التطوير في مرحلة ما بعد البيع. ننصحك بمواصلة عزل هذه
الميزات في وحدات، لأنّه لا يمكن قبول ميزات تصحيح الأخطاء الخاصة بالشركاء في ملف GKI kernel خارج الإرشادات الموضّحة في
التصحيحات الخاصة بنظام التشغيل Android.
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ 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,["# Debug features\n\nThe Linux kernel provides many mechanisms to diagnose issues including\n[tracing](https://android.googlesource.com/kernel/common/+/refs/heads/android-mainline/Documentation/trace/),\n[BPF](https://lwn.net/Articles/818714/), and\n[profiling](https://perf.wiki.kernel.org/index.php/Tutorial). Most\nof these techniques are available in the Generic Kernel Image (GKI) binary\nkernel. When developing products, there are many more tools that are integrated\ninto the development or integration processes, some of which require kernel\nfeatures that aren't part of GKI. As with most GKI features, we encourage you to\nwork with upstream maintainers to add these features to Linux.\n| **Note:** Kernel debugging tools and techniques are beyond the scope of this document.\n\nDownstream debug features in vendor modules\n-------------------------------------------\n\nDebugging features are similar in scope to other kinds of features and must\nfollow the same processes as described in\n[Android-specific patches](/docs/core/architecture/kernel/kernel-code#android-specific-patches).\n\nIntrusive downstream debug features\n-----------------------------------\n\nSome useful debug features require special configuration options that are\ndisabled in GKI and therefore require a special build of the kernel. These\nfeatures might be disabled due to performance penalties or unsuitability for\nproduction use, but are indispensable for debugging certain\ntypes of issues. Examples of such tools include sanitizers (KASAN, UBSAN),\n`debugfs`, and other partner-specific features and tools.\n\nIt's up to you to determine how you manage special debug-enabled kernels\nthat impact the Kernel Module Interface (KMI). A common practice is to have an\ninternal debug build and deliver the resulting artifacts to internal customers\nor downstream development partners. We recommend continuing to isolate such\nfeatures into modules as partner-specific debug features can't be accepted into\nthe GKI kernel beyond the guidelines described in\n[Android-specific patches](/docs/core/architecture/kernel/kernel-code#android-specific-patches)."]]