public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, mingo@redhat.com, hpa@zytor.com,
	lizf@cn.fujitsu.com, peterz@infradead.org, fweisbec@gmail.com,
	tglx@linutronix.de, jbaron@redhat.com, mhiramat@redhat.com,
	linux-tip-commits@vger.kernel.org
Subject: Re: [tip:tracing/urgent] tracing: Allocate the ftrace event profile buffer dynamically
Date: Sat, 19 Sep 2009 18:52:47 +0200	[thread overview]
Message-ID: <20090919165247.GA9914@elte.hu> (raw)
In-Reply-To: <1253367914.20020.338.camel@gandalf.stny.rr.com>


* Steven Rostedt <rostedt@goodmis.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

  reply	other threads:[~2009-09-19 16:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <tip-31dcbc09033bd90190e90d943863d7ef9f39b93b@git.kernel.org>
2009-09-19 13:45 ` [tip:tracing/urgent] tracing: Allocate the ftrace event profile buffer dynamically Steven Rostedt
2009-09-19 16:52   ` Ingo Molnar [this message]
     [not found] <tip-20ab4425a77a1f34028cc6ce57053c22c184ba5f@git.kernel.org>
2009-09-19 13:47 ` 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=20090919165247.GA9914@elte.hu \
    --to=mingo@elte.hu \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jbaron@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=mhiramat@redhat.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /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