Linux カーネルは、トレース、BPF、プロファイリングを含む問題を診断するための多くのメカニズムを備えています。これらの手法のほとんどは、汎用カーネル イメージ(GKI)バイナリ カーネルで使用できます。製品を開発する場合、開発プロセスまたは統合プロセスに統合されているツールは他にも多数ありますが、その中には GKI に含まれないカーネル機能を必要とするものがあります。ほとんどの GKI 機能と同様に、アップストリームの管理者と連携して、これらの機能を Linux に追加することをおすすめします。
[null,null,["最終更新日 2025-03-26 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)."]]