Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright (c) 2011 Broadcom Corporation
0003  *
0004  * Permission to use, copy, modify, and/or distribute this software for any
0005  * purpose with or without fee is hereby granted, provided that the above
0006  * copyright notice and this permission notice appear in all copies.
0007  *
0008  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
0009  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
0010  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
0011  * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
0012  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
0013  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
0014  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
0015  */
0016 
0017 #if !defined(__TRACE_BRCMSMAC_H) || defined(TRACE_HEADER_MULTI_READ)
0018 #define __TRACE_BRCMSMAC_H
0019 
0020 #include <linux/tracepoint.h>
0021 
0022 #undef TRACE_SYSTEM
0023 #define TRACE_SYSTEM brcmsmac
0024 
0025 /*
0026  * We define a tracepoint, its arguments, its printk format and its
0027  * 'fast binary record' layout.
0028  */
0029 TRACE_EVENT(brcms_timer,
0030     /* TPPROTO is the prototype of the function called by this tracepoint */
0031     TP_PROTO(struct brcms_timer *t),
0032     /*
0033      * TPARGS(firstarg, p) are the parameters names, same as found in the
0034      * prototype.
0035      */
0036     TP_ARGS(t),
0037     /*
0038      * Fast binary tracing: define the trace record via TP_STRUCT__entry().
0039      * You can think about it like a regular C structure local variable
0040      * definition.
0041      */
0042     TP_STRUCT__entry(
0043         __field(uint, ms)
0044         __field(uint, set)
0045         __field(uint, periodic)
0046     ),
0047     TP_fast_assign(
0048         __entry->ms = t->ms;
0049         __entry->set = t->set;
0050         __entry->periodic = t->periodic;
0051     ),
0052     TP_printk(
0053         "ms=%u set=%u periodic=%u",
0054         __entry->ms, __entry->set, __entry->periodic
0055     )
0056 );
0057 
0058 TRACE_EVENT(brcms_dpc,
0059     TP_PROTO(unsigned long data),
0060     TP_ARGS(data),
0061     TP_STRUCT__entry(
0062         __field(unsigned long, data)
0063     ),
0064     TP_fast_assign(
0065         __entry->data = data;
0066     ),
0067     TP_printk(
0068         "data=%p",
0069         (void *)__entry->data
0070     )
0071 );
0072 
0073 TRACE_EVENT(brcms_macintstatus,
0074     TP_PROTO(const struct device *dev, int in_isr, u32 macintstatus,
0075          u32 mask),
0076     TP_ARGS(dev, in_isr, macintstatus, mask),
0077     TP_STRUCT__entry(
0078         __string(dev, dev_name(dev))
0079         __field(int, in_isr)
0080         __field(u32, macintstatus)
0081         __field(u32, mask)
0082     ),
0083     TP_fast_assign(
0084         __assign_str(dev, dev_name(dev));
0085         __entry->in_isr = in_isr;
0086         __entry->macintstatus = macintstatus;
0087         __entry->mask = mask;
0088     ),
0089     TP_printk("[%s] in_isr=%d macintstatus=%#x mask=%#x", __get_str(dev),
0090           __entry->in_isr, __entry->macintstatus, __entry->mask)
0091 );
0092 #endif /* __TRACE_BRCMSMAC_H */
0093 
0094 #ifdef CONFIG_BRCM_TRACING
0095 
0096 #undef TRACE_INCLUDE_PATH
0097 #define TRACE_INCLUDE_PATH .
0098 #undef TRACE_INCLUDE_FILE
0099 #define TRACE_INCLUDE_FILE brcms_trace_brcmsmac
0100 #include <trace/define_trace.h>
0101 
0102 #endif /* CONFIG_BRCM_TRACING */