ANDROID: vendor_hooks: Add hooks to dup_task_struct

Add hook to dup_task_struct for vendor data fields initialisation.

Bug: 188004638

Change-Id: I4b58604ee822fb8d1e0cc37bec72e820e7318427
Signed-off-by: Liangliang Li <liliangliang@vivo.com>
This commit is contained in:
Liangliang Li
2021-05-13 15:01:26 +08:00
committed by Todd Kjos
parent 727ab0f839
commit f66d96b14a
3 changed files with 6 additions and 0 deletions

View File

@@ -262,6 +262,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_cpuset_fork);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_set_cpus_allowed_comm);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_sched_setaffinity_early);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_free_task);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_dup_task_struct);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_after_enqueue_task);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_after_dequeue_task);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_enqueue_entity);

View File

@@ -358,6 +358,10 @@ DECLARE_HOOK(android_vh_finish_update_load_avg_se,
TP_PROTO(struct sched_entity *se, int flags),
TP_ARGS(se, flags));
DECLARE_HOOK(android_vh_dup_task_struct,
TP_PROTO(struct task_struct *tsk, struct task_struct *orig),
TP_ARGS(tsk, orig));
/* macro versions of hooks are no longer required */
#endif /* _TRACE_HOOK_SCHED_H */

View File

@@ -975,6 +975,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig, int node)
#ifdef CONFIG_MEMCG
tsk->active_memcg = NULL;
#endif
trace_android_vh_dup_task_struct(tsk, orig);
return tsk;
free_stack: