ANDROID: vendor_hooks: Add hook for trace_android_vh_copy_process
Add hook for trace_android_vh_copy_process, which gives the vendor a chance to monitor the total thread count of the system and the thread count under a particular process Bug: 325765508 Bug: 327977501 Change-Id: Ibeb8aa571d44997ac10623321cd00d1686bde033 Signed-off-by: chenweitao <chenweitao@oppo.com>
This commit is contained in:
parent
0cfa80d3c3
commit
239dbc2518
@ -276,6 +276,11 @@ DECLARE_HOOK(android_vh_free_task,
|
||||
TP_PROTO(struct task_struct *p),
|
||||
TP_ARGS(p));
|
||||
|
||||
DECLARE_HOOK(android_vh_copy_process,
|
||||
TP_PROTO(struct task_struct *p, int nr_threads, int current_signal_nr_threads),
|
||||
TP_ARGS(p, nr_threads, current_signal_nr_threads));
|
||||
|
||||
|
||||
DECLARE_HOOK(android_vh_irqtime_account_process_tick,
|
||||
TP_PROTO(struct task_struct *p, struct rq *rq, int user_tick, int ticks),
|
||||
TP_ARGS(p, rq, user_tick, ticks));
|
||||
|
@ -2590,6 +2590,7 @@ static __latent_entropy struct task_struct *copy_process(
|
||||
attach_pid(p, PIDTYPE_PID);
|
||||
nr_threads++;
|
||||
}
|
||||
trace_android_vh_copy_process(current, nr_threads, current->signal->nr_threads);
|
||||
total_forks++;
|
||||
hlist_del_init(&delayed.node);
|
||||
spin_unlock(¤t->sighand->siglock);
|
||||
|
@ -46,6 +46,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_pick_next_entity);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_check_preempt_wakeup);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_set_cpus_allowed_by_task);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_free_task);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_copy_process);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_uclamp_eff_get);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_after_enqueue_task);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_after_dequeue_task);
|
||||
|
Loading…
Reference in New Issue
Block a user