ANDROID: vendor_hooks: add restricted vendor hook for meminfo

To report vendor-specific memory statistics, add restricted
vendor hook since normal vendor hook work with only atomic
context.

Bug: 333482947
Change-Id: I5c32961b30f082a8a4aa78906d2fce1cdf4b0d2b
Signed-off-by: Minchan Kim <minchan@google.com>
(cherry picked from commit 7ea01ee68e6867798309cf0d3044a695b7d56947)
Signed-off-by: Dmitry Skiba <dskiba@google.com>
This commit is contained in:
Minchan Kim
2024-04-10 05:35:06 +00:00
committed by Dmitry Skiba
parent 5f7004a8d0
commit fc348be916
3 changed files with 5 additions and 0 deletions
+1
View File
@@ -226,6 +226,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_aes_encrypt);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_aes_decrypt);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_should_fault_around);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_meminfo_proc_show);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_meminfo_proc_show);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_exit_mm);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_show_mem);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_print_slabinfo_header);
+1
View File
@@ -161,6 +161,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
global_zone_page_state(NR_FREE_CMA_PAGES));
#endif
trace_android_vh_meminfo_proc_show(m);
trace_android_rvh_meminfo_proc_show(m);
#ifdef CONFIG_UNACCEPTED_MEMORY
show_val_kb(m, "Unaccepted: ",
+3
View File
@@ -158,6 +158,9 @@ DECLARE_HOOK(android_vh_look_around,
DECLARE_HOOK(android_vh_meminfo_proc_show,
TP_PROTO(struct seq_file *m),
TP_ARGS(m));
DECLARE_RESTRICTED_HOOK(android_rvh_meminfo_proc_show,
TP_PROTO(struct seq_file *m),
TP_ARGS(m), 1);
DECLARE_HOOK(android_vh_exit_mm,
TP_PROTO(struct mm_struct *mm),
TP_ARGS(mm));