From: Ingo Molnar <mingo@elte.hu>
To: Peter Zijlstra <peterz@infradead.org>
Cc: "Arnaldo Carvalho de Melo" <acme@redhat.com>,
"Mike Galbraith" <efault@gmx.de>,
"Frédéric Weisbecker" <fweisbec@gmail.com>,
"Tim Blechmann" <tim@klingt.org>,
linux-kernel@vger.kernel.org
Subject: Re: pref record question
Date: Tue, 20 Oct 2009 14:46:09 +0200 [thread overview]
Message-ID: <20091020124609.GA18276@elte.hu> (raw)
In-Reply-To: <1256030390.17774.35.camel@laptop>
* Peter Zijlstra <peterz@infradead.org> wrote:
> On Tue, 2009-10-20 at 08:00 +0200, Ingo Molnar wrote:
> > * Peter Zijlstra <peterz@infradead.org> wrote:
> >
> > > On Mon, 2009-10-19 at 19:04 +0200, Tim Blechmann wrote:
> > >
> > > > i am trying to do some profiling with perf (2.6.31.4). while
> > > > thread-level profiling works fine, i haven't been able to record
> > > > profiling data of a whole process (i.e. main thread + child
> > > > threads). from my understanding, this should be enabled by running
> > > > 'perf record -i' on the main thread. this does only collect the data
> > > > from the main thread, though.
> > > >
> > > > is this an issue with perf or with my understanding of perf?
> > >
> > > -i will only inherit the counters on new fork()/clone() calls, so an
> > > existing process/task tree will not automagically get the counters.
> >
> > Looks like something very much worth fixing.
>
> Well, maybe.
>
> There's two ways to go about this, either iterate the tasks in
> userspace and attach a counter to each one (repeat until there's no
> new ones left).
>
> Or add a new flag in perf_event_attr to iterate the tasks on attach in
> an atomic manner.
>
> We cannot simply extend the current attach behaviour as that would
> make it impossible to attach to a single thread in a thread group.
Correct.
> Also, if you extend the interface, it would make sense to allow
> automatically attaching to a process group, not only a thread group,
> etc.
Indeed. This more automated approach sounds like the better solution to
me.
Ingo
prev parent reply other threads:[~2009-10-20 12:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-19 17:04 Tim Blechmann
2009-10-20 4:26 ` Peter Zijlstra
2009-10-20 6:00 ` Ingo Molnar
2009-10-20 9:19 ` Peter Zijlstra
2009-10-20 12:46 ` Ingo Molnar [this message]
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=20091020124609.GA18276@elte.hu \
--to=mingo@elte.hu \
--cc=acme@redhat.com \
--cc=efault@gmx.de \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=tim@klingt.org \
/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
Powered by JetHome