Revert half of "ANDROID: vendor_hooks: Add hooks for memory when debug"

This reverts parts of commit 24149445ad.

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 <xieliujie@oppo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I63621110c0c38b7e5d5e5e6f85c513bf00ecc00b
This commit is contained in:
Greg Kroah-Hartman 2021-10-22 15:30:40 +02:00
parent 3f305a9101
commit e09000ee19
4 changed files with 1 additions and 16 deletions

View File

@ -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);

View File

@ -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,

View File

@ -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 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
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;
}

View File

@ -950,7 +950,6 @@ static void print_slabinfo_header(struct seq_file *m)
seq_puts(m, " : globalstat <listallocs> <maxobjs> <grown> <reaped> <error> <maxfreeable> <nodeallocs> <remotefrees> <alienoverflow>");
seq_puts(m, " : cpustat <allochit> <allocmiss> <freehit> <freemiss>");
#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');
}