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:
committed by
Suren Baghdasaryan
parent
8d9c81d3ca
commit
2a5729e149
@@ -476,6 +476,9 @@ DECLARE_RESTRICTED_HOOK(android_rvh_dequeue_entity_delayed,
|
||||
DECLARE_HOOK(android_vh_tick_nohz_idle_stop_tick,
|
||||
TP_PROTO(void *unused),
|
||||
TP_ARGS(unused));
|
||||
DECLARE_HOOK(android_vh_mmput,
|
||||
TP_PROTO(struct mm_struct *mm),
|
||||
TP_ARGS(mm));
|
||||
/* macro versions of hooks are no longer required */
|
||||
|
||||
#endif /* _TRACE_HOOK_SCHED_H */
|
||||
|
||||
+3
-1
@@ -1366,8 +1366,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(mm);
|
||||
__mmput(mm);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mmput);
|
||||
|
||||
|
||||
@@ -124,3 +124,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cpu_cgroup_css_alloc_early);
|
||||
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_rvh_dequeue_entity_delayed);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mmput);
|
||||
|
||||
Reference in New Issue
Block a user