ANDROID: vendor_hooks: add hooks for slab memory leak debugging

Add hooks and additional fields in vm_struct and track structs
to store and report additional information for slab memory leak
debugging.

Bug: 184928480
Bug: 395197442
Change-Id: I6897a6a98d4eaaea492673cefd4111a7ba741940
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Signed-off-by: wengle <wengle@oppo.com>
This commit is contained in:
Liujie Xie
2021-05-11 19:05:32 +08:00
committed by Carlos Llamas
parent 3404298ae0
commit 293d51412c
4 changed files with 12 additions and 0 deletions
+6
View File
@@ -326,6 +326,12 @@ DECLARE_HOOK(android_vh_alloc_pages_failure_bypass,
TP_PROTO(gfp_t gfp_mask, int order, int alloc_flags,
int migratetype, struct page **page),
TP_ARGS(gfp_mask, order, alloc_flags, migratetype, page));
DECLARE_HOOK(android_vh_save_vmalloc_stack,
TP_PROTO(unsigned long flags, struct vm_struct *vm),
TP_ARGS(flags, vm));
DECLARE_HOOK(android_vh_show_stack_hash,
TP_PROTO(struct seq_file *m, struct vm_struct *v),
TP_ARGS(m, v));
DECLARE_HOOK(android_vh_save_track_hash,
TP_PROTO(bool alloc, struct track *p),
TP_ARGS(alloc, p));