קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
לליבת Linux יש מנגנונים רבים לאבחון בעיות, כולל מעקב, BPF ופרופיל. רוב השיטות האלה זמינות בליבה הבינארית של Generic Kernel Image (GKI). כשמפתחים מוצרים, יש הרבה כלים נוספים שמוטמעים בתהליכי הפיתוח או השילוב, וחלק מהם דורשים תכונות של הליבה שלא נכללות ב-GKI. כמו רוב התכונות של GKI, מומלץ לעבוד עם המטפלים ב-upstream כדי להוסיף את התכונות האלה ל-Linux.
תכונות ניפוי באגים במורד הזרם במודולים של ספקים
היקף התכונות לניפוי באגים דומה לזה של סוגים אחרים של תכונות, וצריך לפעול לפי אותם תהליכים שמתוארים בקטע תיקונים ספציפיים ל-Android.
תכונות ניפוי באגים פולשניות ב-downstream
לחלק מתכונות ניפוי הבאגים השימושיות נדרשות אפשרויות תצורה מיוחדות שמושבתה ב-GKI, ולכן נדרשת גרסה מיוחדת של הליבה. יכול להיות שהתכונות האלה יושבתו בגלל סנקציות על ביצועים או חוסר התאמה לשימוש בסביבת הייצור, אבל הן חיוניות לניפוי באגים מסוגים מסוימים של בעיות. דוגמאות לכלים כאלה הן כלי חיטוי (KASAN, UBSAN),debugfs ותכונות וכלים אחרים שספציפיים לשותפים.
אתם יכולים לקבוע איך לנהל ליבות מיוחדות עם תמיכה בניפוי באגים שמשפיעות על Kernel Module Interface (KMI). שיטה נפוצה היא ליצור גרסה פנימית לניפוי באגים ולשלוח את הארטיפקטים שנוצרים ללקוחות פנימיים או לשותפי פיתוח במורד הזרם. מומלץ להמשיך לבודד תכונות כאלה במודולים, כי אי אפשר לקבל לליבת GKI תכונות ניפוי באגים ספציפיות לשותפים מעבר להנחיות שמתוארות בתיקונים ספציפיים ל-Android.
דוגמאות התוכן והקוד שבדף הזה כפופות לרישיונות המפורטים בקטע רישיון לתוכן. Java ו-OpenJDK הם סימנים מסחריים או סימנים מסחריים רשומים של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-27 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-27 (שעון UTC)."],[],[],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)."]]