Mulai 27 Maret 2025, sebaiknya gunakan android-latest-release, bukan aosp-main, untuk mem-build dan berkontribusi pada AOSP. Untuk mengetahui informasi selengkapnya, lihat Perubahan pada AOSP.
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Kernel Linux menyediakan banyak mekanisme untuk mendiagnosis masalah, termasuk
pelacakan,
BPF, dan
profiling. Sebagian besar teknik ini tersedia di kernel biner Generic Kernel Image (GKI). Saat mengembangkan produk, ada banyak alat lain yang terintegrasi
ke dalam proses pengembangan atau integrasi, beberapa di antaranya memerlukan fitur
kernel yang bukan bagian dari GKI. Seperti sebagian besar fitur GKI, sebaiknya Anda
bekerja sama dengan pengelola upstream untuk menambahkan fitur ini ke Linux.
Fitur debug downstream di modul vendor
Cakupan fitur proses debug mirip dengan jenis fitur lainnya dan harus
mengikuti proses yang sama seperti yang dijelaskan dalam
patch khusus Android.
Fitur debug downstream yang mengganggu
Beberapa fitur debug yang berguna memerlukan opsi konfigurasi khusus yang
dinonaktifkan di GKI dan karenanya memerlukan build kernel khusus. Fitur
ini mungkin dinonaktifkan karena penalti performa atau ketidaksesuaian untuk
penggunaan produksi, tetapi sangat diperlukan untuk men-debug jenis
masalah tertentu. Contoh alat tersebut mencakup pembersih (KASAN, UBSAN),
debugfs, dan fitur serta alat khusus partner lainnya.
Anda dapat menentukan cara mengelola kernel khusus yang mengaktifkan debug
yang memengaruhi Antarmuka Modul Kernel (KMI). Praktik yang umum adalah memiliki
build debug internal dan mengirimkan artefak yang dihasilkan kepada pelanggan internal
atau partner pengembangan downstream. Sebaiknya terus isolasi fitur
tersebut ke dalam modul karena fitur debug khusus partner tidak dapat diterima ke dalam
kernel GKI di luar pedoman yang dijelaskan dalam
patch khusus Android.
Konten dan contoh kode di halaman ini tunduk kepada lisensi yang dijelaskan dalam Lisensi Konten. Java dan OpenJDK adalah merek dagang atau merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-27 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 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)."]]