From e09000ee1915ee62d218e02ffce3eb1a33c91590 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 22 Oct 2021 15:30:40 +0200 Subject: [PATCH] Revert half of "ANDROID: vendor_hooks: Add hooks for memory when debug" This reverts parts of commit 24149445adaceb3948d5ad5bbb63c62ff2914e83. The hooks android_vh_alloc_pages_slowpath, android_vh_print_slabinfo_header, and android_vh_cache_show are not used by any vendor, so remove them to help with merge issues with future LTS releases. If this is needed by any real user, it can easily be reverted to add it back and then the symbol should be added to the abi list at the same time to prevent it from being removed again later. Bug: 182443489 Cc: Liujie Xie Signed-off-by: Greg Kroah-Hartman Change-Id: I63621110c0c38b7e5d5e5e6f85c513bf00ecc00b --- drivers/android/vendor_hooks.c | 3 --- include/trace/hooks/mm.h | 9 --------- mm/page_alloc.c | 3 +-- mm/slab_common.c | 2 -- 4 files changed, 1 insertion(+), 16 deletions(-) diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 66912f1612d6..fe6962df9180 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -267,11 +267,8 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_exit_mm); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_get_from_fragment_pool); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_exclude_reserved_zone); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_include_reserved_zone); -EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alloc_pages_slowpath); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_show_mem); -EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_print_slabinfo_header); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_do_shrink_slab); -EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cache_show); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_typec_tcpci_override_toggling); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_typec_tcpci_chk_contaminant); EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_typec_tcpci_get_vbus); diff --git a/include/trace/hooks/mm.h b/include/trace/hooks/mm.h index 5821f6d74a07..1e7c0a0811de 100644 --- a/include/trace/hooks/mm.h +++ b/include/trace/hooks/mm.h @@ -68,16 +68,7 @@ DECLARE_HOOK(android_vh_include_reserved_zone, DECLARE_HOOK(android_vh_show_mem, TP_PROTO(unsigned int filter, nodemask_t *nodemask), TP_ARGS(filter, nodemask)); -DECLARE_HOOK(android_vh_alloc_pages_slowpath, - TP_PROTO(gfp_t gfp_mask, unsigned int order, unsigned long delta), - TP_ARGS(gfp_mask, order, delta)); -DECLARE_HOOK(android_vh_print_slabinfo_header, - TP_PROTO(struct seq_file *m), - TP_ARGS(m)); struct slabinfo; -DECLARE_HOOK(android_vh_cache_show, - TP_PROTO(struct seq_file *m, struct slabinfo *sinfo, struct kmem_cache *s), - TP_ARGS(m, sinfo, s)); struct dirty_throttle_control; DECLARE_HOOK(android_vh_mm_dirty_limits, TP_PROTO(struct dirty_throttle_control *const gdtc, bool strictlimit, diff --git a/mm/page_alloc.c b/mm/page_alloc.c index e18561a8c5cd..5b9b465582d6 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -4778,7 +4778,7 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order, int no_progress_loops; unsigned int cpuset_mems_cookie; int reserve_flags; - unsigned long alloc_start = jiffies; + /* * We also sanity check to catch abuse of atomic reserves being used by * callers that are not in atomic context. @@ -5020,7 +5020,6 @@ fail: warn_alloc(gfp_mask, ac->nodemask, "page allocation failure: order:%u", order); got_pg: - trace_android_vh_alloc_pages_slowpath(gfp_mask, order, alloc_start); return page; } diff --git a/mm/slab_common.c b/mm/slab_common.c index 6a04bfa91df5..c751b18f7e60 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -950,7 +950,6 @@ static void print_slabinfo_header(struct seq_file *m) seq_puts(m, " : globalstat "); seq_puts(m, " : cpustat "); #endif - trace_android_vh_print_slabinfo_header(m); seq_putc(m, '\n'); } @@ -986,7 +985,6 @@ static void cache_show(struct kmem_cache *s, struct seq_file *m) seq_printf(m, " : slabdata %6lu %6lu %6lu", sinfo.active_slabs, sinfo.num_slabs, sinfo.shared_avail); slabinfo_show_stats(m, s); - trace_android_vh_cache_show(m, &sinfo, s); seq_putc(m, '\n'); }