Path: blob/main/sys/contrib/dev/broadcom/brcm80211/brcmsmac/brcms_trace_brcmsmac.h
178665 views
/*1* Copyright (c) 2011 Broadcom Corporation2*3* Permission to use, copy, modify, and/or distribute this software for any4* purpose with or without fee is hereby granted, provided that the above5* copyright notice and this permission notice appear in all copies.6*7* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES8* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF9* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY10* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES11* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION12* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN13* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.14*/1516#if !defined(__TRACE_BRCMSMAC_H) || defined(TRACE_HEADER_MULTI_READ)17#define __TRACE_BRCMSMAC_H1819#include <linux/tracepoint.h>2021#undef TRACE_SYSTEM22#define TRACE_SYSTEM brcmsmac2324/*25* We define a tracepoint, its arguments, its printk format and its26* 'fast binary record' layout.27*/28TRACE_EVENT(brcms_timer,29/* TPPROTO is the prototype of the function called by this tracepoint */30TP_PROTO(struct brcms_timer *t),31/*32* TPARGS(firstarg, p) are the parameters names, same as found in the33* prototype.34*/35TP_ARGS(t),36/*37* Fast binary tracing: define the trace record via TP_STRUCT__entry().38* You can think about it like a regular C structure local variable39* definition.40*/41TP_STRUCT__entry(42__field(uint, ms)43__field(uint, set)44__field(uint, periodic)45),46TP_fast_assign(47__entry->ms = t->ms;48__entry->set = t->set;49__entry->periodic = t->periodic;50),51TP_printk(52"ms=%u set=%u periodic=%u",53__entry->ms, __entry->set, __entry->periodic54)55);5657TRACE_EVENT(brcms_dpc,58TP_PROTO(unsigned long data),59TP_ARGS(data),60TP_STRUCT__entry(61__field(unsigned long, data)62),63TP_fast_assign(64__entry->data = data;65),66TP_printk(67"data=%p",68(void *)__entry->data69)70);7172TRACE_EVENT(brcms_macintstatus,73TP_PROTO(const struct device *dev, int in_isr, u32 macintstatus,74u32 mask),75TP_ARGS(dev, in_isr, macintstatus, mask),76TP_STRUCT__entry(77__string(dev, dev_name(dev))78__field(int, in_isr)79__field(u32, macintstatus)80__field(u32, mask)81),82TP_fast_assign(83__assign_str(dev);84__entry->in_isr = in_isr;85__entry->macintstatus = macintstatus;86__entry->mask = mask;87),88TP_printk("[%s] in_isr=%d macintstatus=%#x mask=%#x", __get_str(dev),89__entry->in_isr, __entry->macintstatus, __entry->mask)90);91#endif /* __TRACE_BRCMSMAC_H */9293#ifdef CONFIG_BRCM_TRACING9495#undef TRACE_INCLUDE_PATH96#define TRACE_INCLUDE_PATH .97#undef TRACE_INCLUDE_FILE98#define TRACE_INCLUDE_FILE brcms_trace_brcmsmac99#include <trace/define_trace.h>100101#endif /* CONFIG_BRCM_TRACING */102103104