From f88eb0d245a3d74911020b6f1cce907e2b034dcb Mon Sep 17 00:00:00 2001 From: Chinwen Chang Date: Thu, 20 May 2021 10:31:03 +0800 Subject: [PATCH] ANDROID: android: Add nr_swap_pages to debug_symbols driver Add nr_swap_pages symbol which will be used by the memory profiling module to debug_symbols driver. Bug: 149040612 Change-Id: I444e53046cf83c91899360e82f817d38cd4fba40 Signed-off-by: Chinwen Chang --- drivers/android/debug_symbols.c | 4 ++++ include/linux/android_debug_symbols.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/drivers/android/debug_symbols.c b/drivers/android/debug_symbols.c index 2ce0bfc51421..61e55575ed5f 100644 --- a/drivers/android/debug_symbols.c +++ b/drivers/android/debug_symbols.c @@ -15,6 +15,7 @@ #include "../../mm/slab.h" #include #include +#include struct ads_entry { char *name; @@ -55,6 +56,9 @@ static const struct ads_entry ads_entries[ADS_END] = { #ifdef CONFIG_SLUB_DEBUG ADS_ENTRY(ADS_SLUB_DEBUG, &slub_debug), #endif +#ifdef CONFIG_SWAP + ADS_ENTRY(ADS_NR_SWAP_PAGES, &nr_swap_pages), +#endif }; /* diff --git a/include/linux/android_debug_symbols.h b/include/linux/android_debug_symbols.h index a68636bba186..3fc44fb36fb7 100644 --- a/include/linux/android_debug_symbols.h +++ b/include/linux/android_debug_symbols.h @@ -26,6 +26,9 @@ enum android_debug_symbol { #endif #ifdef CONFIG_SLUB_DEBUG ADS_SLUB_DEBUG, +#endif +#ifdef CONFIG_SWAP + ADS_NR_SWAP_PAGES, #endif ADS_END };