From: Steven Rostedt <rostedt@goodmis.org>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Joel Fernandes <joel@joelfernandes.org>,
Peter Zijlstra <peterz@infradead.org>,
Tom Zanussi <zanussi@kernel.org>
Subject: Re: [PATCH 2/2] tracing: Add sample code for custom trace events
Date: Wed, 2 Mar 2022 22:23:25 -0500 [thread overview]
Message-ID: <20220302222325.7ad12606@rorschach.local.home> (raw)
In-Reply-To: <20220303104006.56820d801a9ba6c4d5da8c93@kernel.org>
On Thu, 3 Mar 2022 10:40:06 +0900
Masami Hiramatsu <mhiramat@kernel.org> wrote:
> > +static struct trace_event_call sched_switch_call = {
> > + .class = &sched_switch_class,
> > + .event = {
> > + .funcs = &sched_switch_funcs,
> > + },
> > + .print_fmt = SCHED_PRINT_FMT,
> > +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
> > + .module = THIS_MODULE,
> > +#else
> > + .mod = THIS_MODULE,
> > +#endif
>
> I think this example code doesn't need to care about older kernels.
Oops, I thought I got rid of all the mod versions :-p I had this
working on a 5.4 kernel that we were going use, and there was a bunch
more of these in my original code. I'll nuke this on v2.
>
> Others looks good to me.
>
> Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
>
> Hopefully, it is more helpful if there are more comments for other developers. :-)
> (and usage comments too)
Actually, I was thinking of coming up with a bunch of helper
functions/macros to make this less complex. But yeah, it needs a bunch
of comments before it can be accepted.
Thanks a lot for the review!
-- Steve
next prev parent reply other threads:[~2022-03-03 3:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-02 3:24 [PATCH 0/2] tracing: Add a way to have custom events in the tracefs directory Steven Rostedt
2022-03-02 3:24 ` [PATCH 1/2] tracing: Allow custom events to be added to " Steven Rostedt
2022-03-02 3:24 ` [PATCH 2/2] tracing: Add sample code for custom trace events Steven Rostedt
2022-03-03 1:40 ` Masami Hiramatsu
2022-03-03 3:23 ` Steven Rostedt [this message]
2022-03-03 3:22 ` Joel Fernandes
2022-03-03 3:41 ` Steven Rostedt
2022-03-02 16:00 ` [PATCH 0/2] tracing: Add a way to have custom events in the tracefs directory Joel Fernandes
2022-03-03 1:31 ` Masami Hiramatsu
2022-03-03 3:20 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220302222325.7ad12606@rorschach.local.home \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=joel@joelfernandes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=zanussi@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.