Linux Audio

Check our new training course

Loading...
v3.1
 
 1#undef TRACE_SYSTEM
 2#define TRACE_SYSTEM napi
 3
 4#if !defined(_TRACE_NAPI_H) || defined(TRACE_HEADER_MULTI_READ)
 5#define _TRACE_NAPI_H_
 6
 7#include <linux/netdevice.h>
 8#include <linux/tracepoint.h>
 9#include <linux/ftrace.h>
10
11#define NO_DEV "(no_device)"
12
13TRACE_EVENT(napi_poll,
14
15	TP_PROTO(struct napi_struct *napi),
16
17	TP_ARGS(napi),
18
19	TP_STRUCT__entry(
20		__field(	struct napi_struct *,	napi)
21		__string(	dev_name, napi->dev ? napi->dev->name : NO_DEV)
 
 
22	),
23
24	TP_fast_assign(
25		__entry->napi = napi;
26		__assign_str(dev_name, napi->dev ? napi->dev->name : NO_DEV);
 
 
27	),
28
29	TP_printk("napi poll on napi struct %p for device %s",
30		__entry->napi, __get_str(dev_name))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31);
32
33#undef NO_DEV
34
35#endif /* _TRACE_NAPI_H_ */
36
37/* This part must be outside protection */
38#include <trace/define_trace.h>
v6.9.4
 1/* SPDX-License-Identifier: GPL-2.0 */
 2#undef TRACE_SYSTEM
 3#define TRACE_SYSTEM napi
 4
 5#if !defined(_TRACE_NAPI_H) || defined(TRACE_HEADER_MULTI_READ)
 6#define _TRACE_NAPI_H
 7
 8#include <linux/netdevice.h>
 9#include <linux/tracepoint.h>
10#include <linux/ftrace.h>
11
12#define NO_DEV "(no_device)"
13
14TRACE_EVENT(napi_poll,
15
16	TP_PROTO(struct napi_struct *napi, int work, int budget),
17
18	TP_ARGS(napi, work, budget),
19
20	TP_STRUCT__entry(
21		__field(	struct napi_struct *,	napi)
22		__string(	dev_name, napi->dev ? napi->dev->name : NO_DEV)
23		__field(	int,			work)
24		__field(	int,			budget)
25	),
26
27	TP_fast_assign(
28		__entry->napi = napi;
29		__assign_str(dev_name, napi->dev ? napi->dev->name : NO_DEV);
30		__entry->work = work;
31		__entry->budget = budget;
32	),
33
34	TP_printk("napi poll on napi struct %p for device %s work %d budget %d",
35		  __entry->napi, __get_str(dev_name),
36		  __entry->work, __entry->budget)
37);
38
39TRACE_EVENT(dql_stall_detected,
40
41	TP_PROTO(unsigned short thrs, unsigned int len,
42		 unsigned long last_reap, unsigned long hist_head,
43		 unsigned long now, unsigned long *hist),
44
45	TP_ARGS(thrs, len, last_reap, hist_head, now, hist),
46
47	TP_STRUCT__entry(
48		__field(	unsigned short,		thrs)
49		__field(	unsigned int,		len)
50		__field(	unsigned long,		last_reap)
51		__field(	unsigned long,		hist_head)
52		__field(	unsigned long,		now)
53		__array(	unsigned long,		hist, 4)
54	),
55
56	TP_fast_assign(
57		__entry->thrs = thrs;
58		__entry->len = len;
59		__entry->last_reap = last_reap;
60		__entry->hist_head = hist_head * BITS_PER_LONG;
61		__entry->now = now;
62		memcpy(__entry->hist, hist, sizeof(entry->hist));
63	),
64
65	TP_printk("thrs %u  len %u  last_reap %lu  hist_head %lu  now %lu  hist %016lx %016lx %016lx %016lx",
66		  __entry->thrs, __entry->len,
67		  __entry->last_reap, __entry->hist_head, __entry->now,
68		  __entry->hist[0], __entry->hist[1],
69		  __entry->hist[2], __entry->hist[3])
70);
71
72#undef NO_DEV
73
74#endif /* _TRACE_NAPI_H */
75
76/* This part must be outside protection */
77#include <trace/define_trace.h>