Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/sys/contrib/dev/broadcom/brcm80211/brcmsmac/brcms_trace_brcmsmac.h
178665 views
1
/*
2
* Copyright (c) 2011 Broadcom Corporation
3
*
4
* Permission to use, copy, modify, and/or distribute this software for any
5
* purpose with or without fee is hereby granted, provided that the above
6
* copyright notice and this permission notice appear in all copies.
7
*
8
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
13
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15
*/
16
17
#if !defined(__TRACE_BRCMSMAC_H) || defined(TRACE_HEADER_MULTI_READ)
18
#define __TRACE_BRCMSMAC_H
19
20
#include <linux/tracepoint.h>
21
22
#undef TRACE_SYSTEM
23
#define TRACE_SYSTEM brcmsmac
24
25
/*
26
* We define a tracepoint, its arguments, its printk format and its
27
* 'fast binary record' layout.
28
*/
29
TRACE_EVENT(brcms_timer,
30
/* TPPROTO is the prototype of the function called by this tracepoint */
31
TP_PROTO(struct brcms_timer *t),
32
/*
33
* TPARGS(firstarg, p) are the parameters names, same as found in the
34
* prototype.
35
*/
36
TP_ARGS(t),
37
/*
38
* Fast binary tracing: define the trace record via TP_STRUCT__entry().
39
* You can think about it like a regular C structure local variable
40
* definition.
41
*/
42
TP_STRUCT__entry(
43
__field(uint, ms)
44
__field(uint, set)
45
__field(uint, periodic)
46
),
47
TP_fast_assign(
48
__entry->ms = t->ms;
49
__entry->set = t->set;
50
__entry->periodic = t->periodic;
51
),
52
TP_printk(
53
"ms=%u set=%u periodic=%u",
54
__entry->ms, __entry->set, __entry->periodic
55
)
56
);
57
58
TRACE_EVENT(brcms_dpc,
59
TP_PROTO(unsigned long data),
60
TP_ARGS(data),
61
TP_STRUCT__entry(
62
__field(unsigned long, data)
63
),
64
TP_fast_assign(
65
__entry->data = data;
66
),
67
TP_printk(
68
"data=%p",
69
(void *)__entry->data
70
)
71
);
72
73
TRACE_EVENT(brcms_macintstatus,
74
TP_PROTO(const struct device *dev, int in_isr, u32 macintstatus,
75
u32 mask),
76
TP_ARGS(dev, in_isr, macintstatus, mask),
77
TP_STRUCT__entry(
78
__string(dev, dev_name(dev))
79
__field(int, in_isr)
80
__field(u32, macintstatus)
81
__field(u32, mask)
82
),
83
TP_fast_assign(
84
__assign_str(dev);
85
__entry->in_isr = in_isr;
86
__entry->macintstatus = macintstatus;
87
__entry->mask = mask;
88
),
89
TP_printk("[%s] in_isr=%d macintstatus=%#x mask=%#x", __get_str(dev),
90
__entry->in_isr, __entry->macintstatus, __entry->mask)
91
);
92
#endif /* __TRACE_BRCMSMAC_H */
93
94
#ifdef CONFIG_BRCM_TRACING
95
96
#undef TRACE_INCLUDE_PATH
97
#define TRACE_INCLUDE_PATH .
98
#undef TRACE_INCLUDE_FILE
99
#define TRACE_INCLUDE_FILE brcms_trace_brcmsmac
100
#include <trace/define_trace.h>
101
102
#endif /* CONFIG_BRCM_TRACING */
103
104