ANDROID: Allow vendor modules perform more operations on memleak detect
Export arch_vma_name, _vm_normal_page, pmd_clear_bad, __pmd_trans_huge_lock functions. Allow vendor modules perform more operations on memleak detect and debug. It can detect multiple types of memleak,such as Native,ION,Slub and Vmalloc. Shows detail size of memleak, and shows the stack. Bug: 379962310 Bug: 365506692 Bug: 342305999 Change-Id: I118efa570e660d0696bf081d00b670760d01bec1 Signed-off-by: Dezhi Huang <huangdezhi@hihonor.com> (cherry picked from commit 21e76b82444db3635eacb360f0d0206a069de4a8) (cherry picked from commit ce0653fd2cb3b91553870938edd1b854c4975c72)
This commit is contained in:
parent
900cb56f4c
commit
e05e6574f7
@ -4574,6 +4574,7 @@ __weak const char *arch_vma_name(struct vm_area_struct *vma)
|
|||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(arch_vma_name);
|
||||||
|
|
||||||
static inline void siginfo_buildtime_checks(void)
|
static inline void siginfo_buildtime_checks(void)
|
||||||
{
|
{
|
||||||
|
@ -1906,6 +1906,7 @@ spinlock_t *__pmd_trans_huge_lock(pmd_t *pmd, struct vm_area_struct *vma)
|
|||||||
spin_unlock(ptl);
|
spin_unlock(ptl);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(__pmd_trans_huge_lock);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Returns true if a given pud maps a thp, false otherwise.
|
* Returns true if a given pud maps a thp, false otherwise.
|
||||||
|
@ -698,6 +698,7 @@ struct page *_vm_normal_page(struct vm_area_struct *vma, unsigned long addr,
|
|||||||
out:
|
out:
|
||||||
return pfn_to_page(pfn);
|
return pfn_to_page(pfn);
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(_vm_normal_page);
|
||||||
|
|
||||||
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
|
||||||
struct page *vm_normal_page_pmd(struct vm_area_struct *vma, unsigned long addr,
|
struct page *vm_normal_page_pmd(struct vm_area_struct *vma, unsigned long addr,
|
||||||
|
@ -50,6 +50,7 @@ void pmd_clear_bad(pmd_t *pmd)
|
|||||||
pmd_ERROR(*pmd);
|
pmd_ERROR(*pmd);
|
||||||
pmd_clear(pmd);
|
pmd_clear(pmd);
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(pmd_clear_bad);
|
||||||
|
|
||||||
#ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
|
#ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user