ANDROID: android: Add symbols to debug_symbols driver

Add __show_mem/totalcma_pages to android_debug_symbols
for memory debug use.

Bug: 345658537

Change-Id: Ia66945ccc4e75d75546b65fc545f744b96225285
Signed-off-by: Penghao Wei <weipenghao@xiaomi.com>
This commit is contained in:
Penghao Wei 2024-06-07 16:15:59 +08:00 committed by Treehugger Robot
parent 42eb612b25
commit 15fc1b760f
2 changed files with 5 additions and 0 deletions

View File

@ -17,6 +17,7 @@
#include <linux/fs.h>
#include <linux/swap.h>
#include <linux/compaction.h>
#include <linux/cma.h>
struct ads_entry {
char *name;
@ -47,6 +48,8 @@ static const struct ads_entry ads_entries[ADS_END] = {
ADS_ENTRY(ADS_DROP_SLAB, drop_slab),
ADS_ENTRY(ADS_FREE_PAGES, try_to_free_pages),
ADS_ENTRY(ADS_COMPACT_PAGES, try_to_compact_pages),
ADS_ENTRY(ADS_SHOW_MEM, __show_mem),
ADS_ENTRY(ADS_TOTAL_CMA, &totalcma_pages),
};
/*

View File

@ -18,6 +18,8 @@ enum android_debug_symbol {
ADS_DROP_SLAB,
ADS_FREE_PAGES,
ADS_COMPACT_PAGES,
ADS_SHOW_MEM, /* for debugging memory usage */
ADS_TOTAL_CMA, /* for debugging total cma pages */
ADS_END
};