[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20090919165247.GA9914@elte.hu>
Date: Sat, 19 Sep 2009 18:52:47 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: linux-kernel@...r.kernel.org, mingo@...hat.com, hpa@...or.com,
lizf@...fujitsu.com, peterz@...radead.org, fweisbec@...il.com,
tglx@...utronix.de, jbaron@...hat.com, mhiramat@...hat.com,
linux-tip-commits@...r.kernel.org
Subject: Re: [tip:tracing/urgent] tracing: Allocate the ftrace event
profile buffer dynamically
* Steven Rostedt <rostedt@...dmis.org> wrote:
> On Sat, 2009-09-19 at 07:58 +0000, tip-bot for Frederic Weisbecker
> wrote:
>
> > +/*
> > + * We can't use a size but a type in alloc_percpu()
> > + * So let's create a dummy type that matches the desired size
> > + */
> > +typedef struct {char buf[FTRACE_MAX_PROFILE_SIZE];} profile_buf_t;
> > +
> > static int ftrace_profile_enable_event(struct ftrace_event_call *event)
> > {
> > + char *buf;
> > + int ret;
> > +
> > if (atomic_inc_return(&event->profile_count))
> > return 0;
> >
> > - return event->profile_enable();
> > + buf = (char *)alloc_percpu(profile_buf_t);
> > + if (!buf)
> > + return -ENOMEM;
>
> Ingo,
>
> Did you pull in the version that allocates a buffer for each event? I
> thought Frederic made just a global per cpu buffer that all events can
> use. The buffer is just a temporary storage that will be too big to
> put on the stack.
Yeah - i had v1 briefly - then pulled in the later (v3) one.
Ingo
--
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