Message ID | 20150406231357.2b8e452d@grimm.local.home (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Johannes Berg |
Headers | show |
On Mon, 2015-04-06 at 23:13 -0400, Steven Rostedt wrote: > Every tracing file must have its own TRACE_SYSTEM defined. Oh, that requirement is new to me. I also have the same in iwlwifi, with even more TRACE_SYSTEMs. > 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. > Cc: Johannes Berg <johannes@sipsolutions.net> > Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Looks fine to me. Reviewed-by: Johannes Berg <johannes@sipsolutions.net> I could merge through my tree but I guess you'll want to put it through a different one to be able to change the code that depends on this move. johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, 07 Apr 2015 08:58:58 +0200 Johannes Berg <johannes@sipsolutions.net> wrote: > On Mon, 2015-04-06 at 23:13 -0400, Steven Rostedt wrote: > > Every tracing file must have its own TRACE_SYSTEM defined. > > Oh, that requirement is new to me. I also have the same in iwlwifi, with > even more TRACE_SYSTEMs. Well, it's new now :-) I never expected people to use more than one TRACE_SYSTEM in a single file, so I never documented that it shouldn't be done. I'm more worried about people using the same TRACE_SYSTEM in different files, which will probably break now too. I should update the comments about that. Hmm, I must have missed the iwlwifi part, as that should have not built with an allmodconfig :-/ > > > 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. > > > > > Cc: Johannes Berg <johannes@sipsolutions.net> > > Signed-off-by: Steven Rostedt <rostedt@goodmis.org> > > Looks fine to me. > > Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Thanks! > > I could merge through my tree but I guess you'll want to put it through > a different one to be able to change the code that depends on this move. > Right, I'll need to pull this in my tree, as I have a set of patches dependent on this. -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, 2015-04-07 at 08:55 -0400, Steven Rostedt wrote: > Hmm, I must have missed the iwlwifi part, as that should have not built > with an allmodconfig :-/ Dunno, it seems that should be selected with allmodconfig, and it has 5 different ones ... :) > > I could merge through my tree but I guess you'll want to put it through > > a different one to be able to change the code that depends on this move. > Right, I'll need to pull this in my tree, as I have a set of patches > dependent on this. Makes sense. johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, 07 Apr 2015 08:58:58 +0200 Johannes Berg <johannes@sipsolutions.net> wrote: > On Mon, 2015-04-06 at 23:13 -0400, Steven Rostedt wrote: > > Every tracing file must have its own TRACE_SYSTEM defined. > > Oh, that requirement is new to me. I also have the same in iwlwifi, with > even more TRACE_SYSTEMs. OK, the reason I did not stumble over this is because the previous patch broke the build before I got here. During my latest tests, this breaks it too. You OK if I make more patches to split that file apart? Thanks, -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, 2015-04-07 at 10:21 -0400, Steven Rostedt wrote: > On Tue, 07 Apr 2015 08:58:58 +0200 > Johannes Berg <johannes@sipsolutions.net> wrote: > > > On Mon, 2015-04-06 at 23:13 -0400, Steven Rostedt wrote: > > > Every tracing file must have its own TRACE_SYSTEM defined. > > > > Oh, that requirement is new to me. I also have the same in iwlwifi, with > > even more TRACE_SYSTEMs. > > OK, the reason I did not stumble over this is because the previous > patch broke the build before I got here. > > During my latest tests, this breaks it too. > > You OK if I make more patches to split that file apart? Sure, no problem. I don't think we have any work on them that could possibly conflict now. johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/mac80211/trace.c b/net/mac80211/trace.c index 386e45d8a958..edfe0c170a1c 100644 --- a/net/mac80211/trace.c +++ b/net/mac80211/trace.c @@ -8,6 +8,7 @@ #include "debug.h" #define CREATE_TRACE_POINTS #include "trace.h" +#include "trace_msg.h" #ifdef CONFIG_MAC80211_MESSAGE_TRACING void __sdata_info(const char *fmt, ...) diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h index 263a9561eb26..755a5388dbca 100644 --- a/net/mac80211/trace.h +++ b/net/mac80211/trace.h @@ -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 */ #undef TRACE_INCLUDE_PATH diff --git a/net/mac80211/trace_msg.h b/net/mac80211/trace_msg.h new file mode 100644 index 000000000000..768f7c22a190 --- /dev/null +++ b/net/mac80211/trace_msg.h @@ -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
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. Cc: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> --- net/mac80211/trace.c | 1 + net/mac80211/trace.h | 38 ---------------------------------- net/mac80211/trace_msg.h | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 38 deletions(-) create mode 100644 net/mac80211/trace_msg.h