[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1321543050.3533.8.camel@frodo>
Date: Thu, 17 Nov 2011 10:17:30 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Frederic Weisbecker <fweisbec@...il.com>
Cc: Johannes Berg <johannes@...solutions.net>,
Christoph Hellwig <hch@...radead.org>,
LKML <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH] printk: add console output tracing
On Thu, 2011-11-17 at 16:00 +0100, Frederic Weisbecker wrote:
> On Thu, Nov 17, 2011 at 03:57:57PM +0100, Johannes Berg wrote:
> > On Thu, 2011-11-17 at 15:55 +0100, Frederic Weisbecker wrote:
> >
> > > > +++ b/kernel/trace/printk-trace.c 2011-11-16 21:22:20.000000000 +0100
> > > > @@ -0,0 +1,14 @@
> > > > +/*
> > > > + * printk trace points
> > > > + *
> > > > + * Copyright (C) 2011 Johannes Berg <johannes.berg@...el.com>
> > > > + */
> > > > +
> > > > +#include <linux/string.h>
> > > > +#include <linux/types.h>
> > > > +#include <linux/workqueue.h>
> > > > +#include <linux/sched.h>
> > > > +#include <linux/module.h>
> > > > +
> > > > +#define CREATE_TRACE_POINTS
> > > > +#include <trace/events/printk.h>
> > >
> > > Why not defining the tracepoint in kernel/printk.c ?
Right, there's no reason to add another file, except to get Johannes's
copyright in the kernel ;-)
> >
> > Is that even possible? Do you then have to do something like
> >
> > #include <.../printk.h>
> > #define CREATE_TRACE_POINTS
> > #include <.../printk.h>
> >
> > or how else? In any case it seemed more common to not do that.
>
> You can just do what you did:
>
> #define CREATE_TRACE_POINTS
> #include <trace/events/printk.h>
>
> but in kernel/printk.c
>
> We typically define the tracepoint from the file where an unconditional user
> resides.
The above *is* the correct way to do this.
Thanks Frederic for pointing that out. I should have spotted it, but I
blame my meds ;)
-- Steve
--
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