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 Change-Id: I6897a6a98d4eaaea492673cefd4111a7ba741940 Signed-off-by: Liujie Xie <xieliujie@oppo.com>
This commit is contained in:
@@ -46,6 +46,7 @@ struct kmem_cache {
|
||||
#include <linux/kmemleak.h>
|
||||
#include <linux/random.h>
|
||||
#include <linux/sched/mm.h>
|
||||
#include <linux/android_vendor.h>
|
||||
|
||||
/*
|
||||
* State of the slab allocator.
|
||||
@@ -104,6 +105,9 @@ struct track {
|
||||
int cpu; /* Was running on cpu */
|
||||
int pid; /* Pid context */
|
||||
unsigned long when; /* When did the operation occur */
|
||||
#ifdef CONFIG_STACKTRACE
|
||||
ANDROID_OEM_DATA(1);
|
||||
#endif
|
||||
};
|
||||
|
||||
enum track_item { TRACK_ALLOC, TRACK_FREE };
|
||||
|
Reference in New Issue
Block a user