Skip to content

Commit 56eb059

Browse files
valschneiderPeter Zijlstra
authored andcommitted
trace: Add trace_ipi_send_cpumask()
trace_ipi_raise() is unsuitable for generically tracing IPI sources due to its "reason" argument being an uninformative string (on arm64 all you get is "Function call interrupts" for SMP calls). Add a variant of it that exports a target cpumask, a callsite and a callback. Signed-off-by: Valentin Schneider <vschneid@redhat.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org> Link: https://lore.kernel.org/r/20230307143558.294354-2-vschneid@redhat.com
1 parent 203e435 commit 56eb059

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

  • include/trace/events

include/trace/events/ipi.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,28 @@ TRACE_EVENT(ipi_raise,
3535
TP_printk("target_mask=%s (%s)", __get_bitmask(target_cpus), __entry->reason)
3636
);
3737

38+
TRACE_EVENT(ipi_send_cpumask,
39+
40+
TP_PROTO(const struct cpumask *cpumask, unsigned long callsite, void *callback),
41+
42+
TP_ARGS(cpumask, callsite, callback),
43+
44+
TP_STRUCT__entry(
45+
__cpumask(cpumask)
46+
__field(void *, callsite)
47+
__field(void *, callback)
48+
),
49+
50+
TP_fast_assign(
51+
__assign_cpumask(cpumask, cpumask_bits(cpumask));
52+
__entry->callsite = (void *)callsite;
53+
__entry->callback = callback;
54+
),
55+
56+
TP_printk("cpumask=%s callsite=%pS callback=%pS",
57+
__get_cpumask(cpumask), __entry->callsite, __entry->callback)
58+
);
59+
3860
DECLARE_EVENT_CLASS(ipi_handler,
3961

4062
TP_PROTO(const char *reason),

0 commit comments

Comments
 (0)