From: Rusty Russell <rusty@rustcorp.com.au>
To: Steven Rostedt <rostedt@goodmis.org>, linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
Frederic Weisbecker <fweisbec@gmail.com>,
Yuanhan Liu <yuanhan.liu@linux.intel.com>,
chris <chris@chris-wilson.co.uk>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Subject: Re: [PATCH][RFC] tracing: Enable tracepoints via module parameters
Date: Fri, 11 Mar 2011 10:03:09 +1030 [thread overview]
Message-ID: <877hc64klm.fsf@rustcorp.com.au> (raw)
In-Reply-To: <1299622684.20306.77.camel@gandalf.stny.rr.com>
On Tue, 08 Mar 2011 17:18:04 -0500, Steven Rostedt <rostedt@goodmis.org> wrote:
> A few months ago it was suggested to have a way to enable tracepoints in
> a module when it is loaded. I tried various methods, but this one seems
> to be the least intrusive. In fact, it requires no modification to the
> module code.
This seems quite nice!
Importantly, do you like it better than the previous version? I like it
because it doesn't touch my code, but that's not a fair test.
A few minor things:
1) Can we document this somewhere more persistent too? ftrace.txt?
2) Your documentation should probably just use "trace_foo_bar" and omit
the "=1". Because we can :)
3) Can we share more with param_set_bool? Nice to have it in one place
when someone decides the kernel really needs to accept "=true" or
whatever.
4) =n should really unset the flag, so args fight correctly.
eg (wildly untested):
int ftrace_mod_param_set(const char *val, const struct kernel_param *kp)
{
struct ftrace_event_call *call = kp->arg;
struct kernel_param bool_kp;
bool set;
int err;
/* We work exactly like param_set_bool. */
bool_kp.arg = &set;
bool_kp.flags = KPARAM_ISBOOL;
err = param_set_bool(val, &bool_kp);
if (err)
return err;
/* Set flag to tell ftrace to enable this event on init */
if (set)
call->flags = TRACE_EVENT_FL_MOD_ENABLE;
else
call->flags &= ~TRACE_EVENT_FL_MOD_ENABLE;
return 0;
}
Cheers,
Rusty.
next prev parent reply other threads:[~2011-03-11 3:38 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-08 22:18 [PATCH][RFC] tracing: Enable tracepoints via module parameters Steven Rostedt
2011-03-08 22:42 ` Steven Rostedt
2011-03-08 23:22 ` Mathieu Desnoyers
2011-03-08 23:32 ` Steven Rostedt
2011-03-09 0:07 ` Mathieu Desnoyers
2011-03-09 0:14 ` Steven Rostedt
2011-03-09 0:29 ` Mathieu Desnoyers
2011-03-09 0:52 ` Steven Rostedt
2011-03-09 1:17 ` Mathieu Desnoyers
2011-03-09 2:01 ` Steven Rostedt
2011-03-09 2:30 ` Mathieu Desnoyers
2011-03-09 2:01 ` Yuanhan Liu
2011-03-09 2:12 ` Steven Rostedt
2011-03-09 2:19 ` Yuanhan Liu
2011-03-10 23:33 ` Rusty Russell [this message]
2013-08-13 15:14 ` Steven Rostedt
2013-08-13 22:34 ` Mathieu Desnoyers
2013-08-13 23:09 ` Steven Rostedt
2013-08-15 2:02 ` Rusty Russell
2013-08-15 3:32 ` Steven Rostedt
2021-04-19 21:54 ` Williams, Dan J
2021-04-19 22:11 ` Steven Rostedt
2021-04-20 1:25 ` Dan Williams
2021-04-20 12:55 ` Steven Rostedt
2021-04-20 13:29 ` Mathieu Desnoyers
2021-04-20 14:55 ` Steven Rostedt
2021-04-20 15:15 ` Mathieu Desnoyers
2021-04-20 15:34 ` Steven Rostedt
2021-04-20 19:54 ` Dan Williams
2021-04-20 20:32 ` Steven Rostedt
2021-04-21 6:27 ` Dan Williams
2021-04-21 7:30 ` Rasmus Villemoes
2021-04-21 14:20 ` Steven Rostedt
2021-04-21 14:50 ` Rasmus Villemoes
2021-04-21 15:00 ` 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=877hc64klm.fsf@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=chris@chris-wilson.co.uk \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=yuanhan.liu@linux.intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).