Re: [PATCH] printk: add console output tracing

Johannes Berg
2011-11-17T14:58:07Z

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@intel.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 ?

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.

johannes