linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Mikolaj Konarski <mikolaj.konarski@gmail.com>
Cc: chenggang.qin@gmail.com, Bernie Pope <florbitous@gmail.com>,
	Duncan Coutts <duncan@well-typed.com>,
	linux-perf-users@vger.kernel.org
Subject: Re: How to trace threads created by a process after perf has started recording, using the -p PID flag?
Date: Tue, 04 Sep 2012 10:04:31 -0600	[thread overview]
Message-ID: <5046268F.4050504@gmail.com> (raw)
In-Reply-To: <CAHFo2up0cy4A8pSX5=dJ4k95ZtUTEzvzqcvfRoaoUjedpcvw5Q@mail.gmail.com>

On 9/3/12 4:17 PM, Mikolaj Konarski wrote:
>>> Could someone clarify the behaviour of the -p PID flag of perf-record?
>>> In our experiments (3.2.0-27 #43-Ubuntu SMP x86_64),
>>> it ignores events on threads spawned after perf-record is started.
>>> Is this the intended behaviour, and is there any work-around?
>
> Anybody? We'd love to use a proven, standard workaround
> for this issue, preferably without forcing our users to upgrade
> the kernel or wait for any future release. Do we even diagnose
> the problem correctly? The best workaround we can come up with
> right now is to use the "--filter 'pid==NNNN'" option, but it has
> a couple of downsides. Any help would be sincerely appreciated.

I see the problem now. The perf tool gets FORK events as threads are 
created, but it does not respond to them and create new counters. Some 
refactoring is needed to make that happen.

David

  parent reply	other threads:[~2012-09-04 16:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-25 12:52 How to trace threads created by a process after perf has started recording, using the -p PID flag? Mikolaj Konarski
     [not found] ` <CAKYOsXwF-Rk97BEWk_fEHhfVisPy_q439tdx7H9onAOyFi=-uA@mail.gmail.com>
2012-09-03 22:17   ` Mikolaj Konarski
2012-09-04  6:47     ` Namhyung Kim
2012-09-04 16:04     ` David Ahern [this message]
2012-09-22  7:58       ` Mikolaj Konarski
2012-09-22 18:39         ` David Ahern
2012-09-22 19:57           ` Mikolaj Konarski
2012-09-24  4:31             ` David Ahern
     [not found] <CAJgLYc+dMADVBkbPq1wJFptcx63UUSg24DDM5BbYSWW2bDV+tg@mail.gmail.com>
2012-08-26  4:56 ` chenggang qin

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=5046268F.4050504@gmail.com \
    --to=dsahern@gmail.com \
    --cc=chenggang.qin@gmail.com \
    --cc=duncan@well-typed.com \
    --cc=florbitous@gmail.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mikolaj.konarski@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).