mac80211: Move message tracepoints to their own header
Every tracing file must have its own TRACE_SYSTEM defined. The mac80211 tracepoint header broke this and add in the middle of the file had: #undef TRACE_SYSTEM #define TRACE_SYSTEM mac80211_msg Unfortunately, this broke new code in the ftrace infrastructure. Moving the mac80211_msg into its own trace file with its own TRACE_SYSTEM defined fixes the issue. Link: http://lkml.kernel.org/r/1428389938.1841.1.camel@sipsolutions.net Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
parent
7267b23859
commit
1bc1e4d048
3 changed files with 54 additions and 38 deletions
|
@ -8,6 +8,7 @@
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#define CREATE_TRACE_POINTS
|
#define CREATE_TRACE_POINTS
|
||||||
#include "trace.h"
|
#include "trace.h"
|
||||||
|
#include "trace_msg.h"
|
||||||
|
|
||||||
#ifdef CONFIG_MAC80211_MESSAGE_TRACING
|
#ifdef CONFIG_MAC80211_MESSAGE_TRACING
|
||||||
void __sdata_info(const char *fmt, ...)
|
void __sdata_info(const char *fmt, ...)
|
||||||
|
|
|
@ -2312,44 +2312,6 @@ TRACE_EVENT(drv_tdls_recv_channel_switch,
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
#ifdef CONFIG_MAC80211_MESSAGE_TRACING
|
|
||||||
#undef TRACE_SYSTEM
|
|
||||||
#define TRACE_SYSTEM mac80211_msg
|
|
||||||
|
|
||||||
#define MAX_MSG_LEN 100
|
|
||||||
|
|
||||||
DECLARE_EVENT_CLASS(mac80211_msg_event,
|
|
||||||
TP_PROTO(struct va_format *vaf),
|
|
||||||
|
|
||||||
TP_ARGS(vaf),
|
|
||||||
|
|
||||||
TP_STRUCT__entry(
|
|
||||||
__dynamic_array(char, msg, MAX_MSG_LEN)
|
|
||||||
),
|
|
||||||
|
|
||||||
TP_fast_assign(
|
|
||||||
WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg),
|
|
||||||
MAX_MSG_LEN, vaf->fmt,
|
|
||||||
*vaf->va) >= MAX_MSG_LEN);
|
|
||||||
),
|
|
||||||
|
|
||||||
TP_printk("%s", __get_str(msg))
|
|
||||||
);
|
|
||||||
|
|
||||||
DEFINE_EVENT(mac80211_msg_event, mac80211_info,
|
|
||||||
TP_PROTO(struct va_format *vaf),
|
|
||||||
TP_ARGS(vaf)
|
|
||||||
);
|
|
||||||
DEFINE_EVENT(mac80211_msg_event, mac80211_dbg,
|
|
||||||
TP_PROTO(struct va_format *vaf),
|
|
||||||
TP_ARGS(vaf)
|
|
||||||
);
|
|
||||||
DEFINE_EVENT(mac80211_msg_event, mac80211_err,
|
|
||||||
TP_PROTO(struct va_format *vaf),
|
|
||||||
TP_ARGS(vaf)
|
|
||||||
);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
|
#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
|
||||||
|
|
||||||
#undef TRACE_INCLUDE_PATH
|
#undef TRACE_INCLUDE_PATH
|
||||||
|
|
53
net/mac80211/trace_msg.h
Normal file
53
net/mac80211/trace_msg.h
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
#ifdef CONFIG_MAC80211_MESSAGE_TRACING
|
||||||
|
|
||||||
|
#if !defined(__MAC80211_MSG_DRIVER_TRACE) || defined(TRACE_HEADER_MULTI_READ)
|
||||||
|
#define __MAC80211_MSG_DRIVER_TRACE
|
||||||
|
|
||||||
|
#include <linux/tracepoint.h>
|
||||||
|
#include <net/mac80211.h>
|
||||||
|
#include "ieee80211_i.h"
|
||||||
|
|
||||||
|
#undef TRACE_SYSTEM
|
||||||
|
#define TRACE_SYSTEM mac80211_msg
|
||||||
|
|
||||||
|
#define MAX_MSG_LEN 100
|
||||||
|
|
||||||
|
DECLARE_EVENT_CLASS(mac80211_msg_event,
|
||||||
|
TP_PROTO(struct va_format *vaf),
|
||||||
|
|
||||||
|
TP_ARGS(vaf),
|
||||||
|
|
||||||
|
TP_STRUCT__entry(
|
||||||
|
__dynamic_array(char, msg, MAX_MSG_LEN)
|
||||||
|
),
|
||||||
|
|
||||||
|
TP_fast_assign(
|
||||||
|
WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg),
|
||||||
|
MAX_MSG_LEN, vaf->fmt,
|
||||||
|
*vaf->va) >= MAX_MSG_LEN);
|
||||||
|
),
|
||||||
|
|
||||||
|
TP_printk("%s", __get_str(msg))
|
||||||
|
);
|
||||||
|
|
||||||
|
DEFINE_EVENT(mac80211_msg_event, mac80211_info,
|
||||||
|
TP_PROTO(struct va_format *vaf),
|
||||||
|
TP_ARGS(vaf)
|
||||||
|
);
|
||||||
|
DEFINE_EVENT(mac80211_msg_event, mac80211_dbg,
|
||||||
|
TP_PROTO(struct va_format *vaf),
|
||||||
|
TP_ARGS(vaf)
|
||||||
|
);
|
||||||
|
DEFINE_EVENT(mac80211_msg_event, mac80211_err,
|
||||||
|
TP_PROTO(struct va_format *vaf),
|
||||||
|
TP_ARGS(vaf)
|
||||||
|
);
|
||||||
|
#endif /* !__MAC80211_MSG_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
|
||||||
|
|
||||||
|
#undef TRACE_INCLUDE_PATH
|
||||||
|
#define TRACE_INCLUDE_PATH .
|
||||||
|
#undef TRACE_INCLUDE_FILE
|
||||||
|
#define TRACE_INCLUDE_FILE trace_msg
|
||||||
|
#include <trace/define_trace.h>
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in a new issue