trace: Add trace points for tasklet entry/exit
Tasklets are supposed to finish their work quickly and should not block the current running process, but it is not guaranteed that. Currently softirq_entry/exit can be used to know total tasklets execution time, but not helpful to track individual tasklet's execution time. With that we can't find any culprit tasklet function, which is taking more time. Add tasklet_entry/exit trace point support to track individual tasklet execution. Change-Id: I3496d15f64d020916774e673ccb4a8116ea2f2c9 Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org> [satyap@codeaurora.org: remove hi trace points and update commit text] Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
This commit is contained in:
parent
0b0f7507d8
commit
09de85d415
@ -160,6 +160,37 @@ DEFINE_EVENT(softirq, softirq_raise,
|
||||
TP_ARGS(vec_nr)
|
||||
);
|
||||
|
||||
DECLARE_EVENT_CLASS(tasklet,
|
||||
|
||||
TP_PROTO(void *func),
|
||||
|
||||
TP_ARGS(func),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field( void *, func)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->func = func;
|
||||
),
|
||||
|
||||
TP_printk("function=%ps", __entry->func)
|
||||
);
|
||||
|
||||
DEFINE_EVENT(tasklet, tasklet_entry,
|
||||
|
||||
TP_PROTO(void *func),
|
||||
|
||||
TP_ARGS(func)
|
||||
);
|
||||
|
||||
DEFINE_EVENT(tasklet, tasklet_exit,
|
||||
|
||||
TP_PROTO(void *func),
|
||||
|
||||
TP_ARGS(func)
|
||||
);
|
||||
|
||||
#endif /* _TRACE_IRQ_H */
|
||||
|
||||
/* This part must be outside protection */
|
||||
|
@ -523,7 +523,9 @@ static void tasklet_action_common(struct softirq_action *a,
|
||||
if (!test_and_clear_bit(TASKLET_STATE_SCHED,
|
||||
&t->state))
|
||||
BUG();
|
||||
trace_tasklet_entry(t->func);
|
||||
t->func(t->data);
|
||||
trace_tasklet_exit(t->func);
|
||||
tasklet_unlock(t);
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user