[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131125094618.GC3161@krava.brq.redhat.com>
Date: Mon, 25 Nov 2013 10:46:18 +0100
From: Jiri Olsa <jolsa@...hat.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Namhyung Kim <namhyung@...nel.org>, linux-kernel@...r.kernel.org,
Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...e.hu>, Paul Mackerras <paulus@...ba.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
David Ahern <dsahern@...il.com>,
"Theodore Ts'o" <tytso@....edu>
Subject: Re: [PATCH 04/22] tools lib traceevent: Add jbd2 plugin
On Sat, Nov 23, 2013 at 03:52:21AM -0500, Steven Rostedt wrote:
> On Fri, 22 Nov 2013 23:27:57 +0900
> Namhyung Kim <namhyung@...nel.org> wrote:
>
> > [SNIP]
> > > +#define MINORBITS 20
> > > +#define MINORMASK ((1U << MINORBITS) - 1)
> > > +
> > > +#define MAJOR(dev) ((unsigned int) ((dev) >> MINORBITS))
> > > +#define MINOR(dev) ((unsigned int) ((dev) & MINORMASK))
> > > +
> > > +unsigned long long process_jbd2_dev_to_name(struct trace_seq *s,
> > > + unsigned long long *args)
> >
> > Isn't it better to make these functions static?
>
> Yeah, but that was my mistake. Lets keep the fix separate from the
> backport though. Thanks!
ok
>
> >
> >
> > > +{
> > > + unsigned int dev = args[0];
> > > +
> > > + trace_seq_printf(s, "%d:%d", MAJOR(dev), MINOR(dev));
SNIP
>
> jbd2: remove jbd2_dev_to_name() from jbd2 tracepoints
>
> Using function calls in TP_printk causes perf heartburn, so print the
> MAJOR/MINOR device numbers instead.
>
> Signed-off-by: "Theodore Ts'o" <tytso@....edu>
yep, it's rather old change (v3.1-rc1) but I thought
we want to keep that for backward compatibility
and it's small piece of code anyway.. ;-)
>
>
>
> >
> >
> > > + "jbd2_dev_to_name",
> > > + PEVENT_FUNC_ARG_INT,
> > > + PEVENT_FUNC_ARG_VOID);
> > > +
> > > + pevent_register_print_function(pevent,
> > > + process_jiffies_to_msecs,
> > > + PEVENT_FUNC_ARG_LONG,
> > > + "jiffies_to_msecs",
> > > + PEVENT_FUNC_ARG_LONG,
> > > + PEVENT_FUNC_ARG_VOID);
> > > + return 0;
> > > +}
> >
> > Shouldn't it unregister these functions when unloaded?
>
> Probably ;-)
will add,
thanks,
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists