Linux Audio

Check our new training course

Loading...
v5.4
 1/* SPDX-License-Identifier: GPL-2.0 */
 2#undef TRACE_SYSTEM
 3#define TRACE_SYSTEM ipi
 4
 5#if !defined(_TRACE_IPI_H) || defined(TRACE_HEADER_MULTI_READ)
 6#define _TRACE_IPI_H
 7
 8#include <linux/tracepoint.h>
 9
10/**
11 * ipi_raise - called when a smp cross call is made
12 *
13 * @mask: mask of recipient CPUs for the IPI
14 * @reason: string identifying the IPI purpose
15 *
16 * It is necessary for @reason to be a static string declared with
17 * __tracepoint_string.
18 */
19TRACE_EVENT(ipi_raise,
20
21	TP_PROTO(const struct cpumask *mask, const char *reason),
22
23	TP_ARGS(mask, reason),
24
25	TP_STRUCT__entry(
26		__bitmask(target_cpus, nr_cpumask_bits)
27		__field(const char *, reason)
28	),
29
30	TP_fast_assign(
31		__assign_bitmask(target_cpus, cpumask_bits(mask), nr_cpumask_bits);
32		__entry->reason = reason;
33	),
34
35	TP_printk("target_mask=%s (%s)", __get_bitmask(target_cpus), __entry->reason)
36);
37
38DECLARE_EVENT_CLASS(ipi_handler,
39
40	TP_PROTO(const char *reason),
41
42	TP_ARGS(reason),
43
44	TP_STRUCT__entry(
45		__field(const char *, reason)
46	),
47
48	TP_fast_assign(
49		__entry->reason = reason;
50	),
51
52	TP_printk("(%s)", __entry->reason)
53);
54
55/**
56 * ipi_entry - called immediately before the IPI handler
57 *
58 * @reason: string identifying the IPI purpose
59 *
60 * It is necessary for @reason to be a static string declared with
61 * __tracepoint_string, ideally the same as used with trace_ipi_raise
62 * for that IPI.
63 */
64DEFINE_EVENT(ipi_handler, ipi_entry,
65
66	TP_PROTO(const char *reason),
67
68	TP_ARGS(reason)
69);
70
71/**
72 * ipi_exit - called immediately after the IPI handler returns
73 *
74 * @reason: string identifying the IPI purpose
75 *
76 * It is necessary for @reason to be a static string declared with
77 * __tracepoint_string, ideally the same as used with trace_ipi_raise for
78 * that IPI.
79 */
80DEFINE_EVENT(ipi_handler, ipi_exit,
81
82	TP_PROTO(const char *reason),
83
84	TP_ARGS(reason)
85);
86
87#endif /* _TRACE_IPI_H */
88
89/* This part must be outside protection */
90#include <trace/define_trace.h>
v4.6
 
 1#undef TRACE_SYSTEM
 2#define TRACE_SYSTEM ipi
 3
 4#if !defined(_TRACE_IPI_H) || defined(TRACE_HEADER_MULTI_READ)
 5#define _TRACE_IPI_H
 6
 7#include <linux/tracepoint.h>
 8
 9/**
10 * ipi_raise - called when a smp cross call is made
11 *
12 * @mask: mask of recipient CPUs for the IPI
13 * @reason: string identifying the IPI purpose
14 *
15 * It is necessary for @reason to be a static string declared with
16 * __tracepoint_string.
17 */
18TRACE_EVENT(ipi_raise,
19
20	TP_PROTO(const struct cpumask *mask, const char *reason),
21
22	TP_ARGS(mask, reason),
23
24	TP_STRUCT__entry(
25		__bitmask(target_cpus, nr_cpumask_bits)
26		__field(const char *, reason)
27	),
28
29	TP_fast_assign(
30		__assign_bitmask(target_cpus, cpumask_bits(mask), nr_cpumask_bits);
31		__entry->reason = reason;
32	),
33
34	TP_printk("target_mask=%s (%s)", __get_bitmask(target_cpus), __entry->reason)
35);
36
37DECLARE_EVENT_CLASS(ipi_handler,
38
39	TP_PROTO(const char *reason),
40
41	TP_ARGS(reason),
42
43	TP_STRUCT__entry(
44		__field(const char *, reason)
45	),
46
47	TP_fast_assign(
48		__entry->reason = reason;
49	),
50
51	TP_printk("(%s)", __entry->reason)
52);
53
54/**
55 * ipi_entry - called immediately before the IPI handler
56 *
57 * @reason: string identifying the IPI purpose
58 *
59 * It is necessary for @reason to be a static string declared with
60 * __tracepoint_string, ideally the same as used with trace_ipi_raise
61 * for that IPI.
62 */
63DEFINE_EVENT(ipi_handler, ipi_entry,
64
65	TP_PROTO(const char *reason),
66
67	TP_ARGS(reason)
68);
69
70/**
71 * ipi_exit - called immediately after the IPI handler returns
72 *
73 * @reason: string identifying the IPI purpose
74 *
75 * It is necessary for @reason to be a static string declared with
76 * __tracepoint_string, ideally the same as used with trace_ipi_raise for
77 * that IPI.
78 */
79DEFINE_EVENT(ipi_handler, ipi_exit,
80
81	TP_PROTO(const char *reason),
82
83	TP_ARGS(reason)
84);
85
86#endif /* _TRACE_IPI_H */
87
88/* This part must be outside protection */
89#include <trace/define_trace.h>