mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-13 20:59:37 +02:00
ANDROID: vendor_hooks:vendor hook for mmput
add vendor hook in mmput while mm_users decreased to 0. Bug: 238821038 Change-Id: I42a717cbeeb3176bac14b4b2391fdb2366c972d3 Signed-off-by: xiaofeng <xiaofeng5@xiaomi.com>
This commit is contained in:
parent
a494753f45
commit
dedfeb0f68
|
@ -416,6 +416,10 @@ DECLARE_RESTRICTED_HOOK(android_rvh_context_switch,
|
|||
TP_PROTO(struct task_struct *pre, struct task_struct *next),
|
||||
TP_ARGS(pre, next), 1);
|
||||
|
||||
DECLARE_HOOK(android_vh_mmput,
|
||||
TP_PROTO(void *unused),
|
||||
TP_ARGS(unused));
|
||||
|
||||
/* macro versions of hooks are no longer required */
|
||||
|
||||
#endif /* _TRACE_HOOK_SCHED_H */
|
||||
|
|
|
@ -1398,8 +1398,10 @@ void mmput(struct mm_struct *mm)
|
|||
{
|
||||
might_sleep();
|
||||
|
||||
if (atomic_dec_and_test(&mm->mm_users))
|
||||
if (atomic_dec_and_test(&mm->mm_users)) {
|
||||
trace_android_vh_mmput(NULL);
|
||||
__mmput(mm);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mmput);
|
||||
|
||||
|
|
|
@ -107,3 +107,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cpu_cgroup_css_alloc);
|
|||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cpu_cgroup_css_free);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_reweight_entity);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_context_switch);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mmput);
|
||||
|
|
Loading…
Reference in New Issue
Block a user