linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Moody <benjamin.moody@gmail.com>
To: Vince Weaver <vincent.weaver@maine.edu>
Cc: David Ahern <dsahern@gmail.com>, linux-perf-users@vger.kernel.org
Subject: Re: Bizarre results from perf event API
Date: Sun, 22 Feb 2015 20:12:26 +0000	[thread overview]
Message-ID: <CAAk6P0V0QyCtBTi+zULhK_wwSQLN3xsLZq0uXWaBFkjar3BmWQ@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.11.1502211758120.24085@vincent-weaver-1.umelst.maine.edu>

On 2/21/15, Vince Weaver <vincent.weaver@maine.edu> wrote:
> On Sat, 21 Feb 2015, Benjamin Moody wrote:
>
>
>> there are grandchild processes involved.  (And I can't help thinking
>> the first version is a lot more elegant!)  Does the kernel somehow get
>> confused because enable_on_exec is set and the original process hasn't
>> actually exec'ed anything?
>
> Have you tried enabling the "inherit_stat" flag to see if that helps?

That does seem to help for the simple case I posted.  It doesn't work
in all cases, though.  I'll have to experiment a bit to find a simple
example.

My impression was that the inherit_stat bit shouldn't matter if we are
only interested in aggregate event counts, as opposed to counting
events per thread (found a ML thread about this a while ago but I
can't find it right now.)  Please correct me if I'm wrong.  In any
case, though, the perf tool doesn't use that bit.

Benjamin

  reply	other threads:[~2015-02-22 20:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-20 23:26 Bizarre results from perf event API Benjamin Moody
2015-02-21  0:39 ` David Ahern
2015-02-21 21:44   ` Benjamin Moody
2015-02-21 22:59     ` Vince Weaver
2015-02-22 20:12       ` Benjamin Moody [this message]
2015-02-22 20:37         ` Vince Weaver
2015-02-24  0:46           ` Benjamin Moody
2015-02-24  1:21     ` David Ahern
2015-02-27 21:41       ` Benjamin Moody
2015-02-23 20:44 ` Andi Kleen
2015-02-23 23:13   ` Benjamin Moody

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=CAAk6P0V0QyCtBTi+zULhK_wwSQLN3xsLZq0uXWaBFkjar3BmWQ@mail.gmail.com \
    --to=benjamin.moody@gmail.com \
    --cc=dsahern@gmail.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=vincent.weaver@maine.edu \
    /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).