From: Jiri Olsa <jolsa@redhat.com>
To: Tommy <tommy24@gatech.edu>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: Problems with perf
Date: Tue, 19 Aug 2014 10:08:52 +0200 [thread overview]
Message-ID: <20140819080852.GA12435@krava.brq.redhat.com> (raw)
In-Reply-To: <loom.20140818T221806-241@post.gmane.org>
On Mon, Aug 18, 2014 at 08:21:22PM +0000, Tommy wrote:
> Tommy <tommy24 <at> gatech.edu> writes:
>
> >
> > Jen-Cheng(Tommy) Huang <tommy24 <at> gatech.edu> writes:
> > >
> > > Hi
> > >
> > > I am trying to use perf with event grouping to profile Java apps.
> > > My kernel is 3.16.1-1.el6.elrepo.x86_64
> > > perf version 3.16.1-1.el6.elrepo.x86_64
> > > The Java app I use is hadoop TaskTracker, which spawns multiple child
> > JVMs.
> > > There seems to be something wrong with event group, since very few
> > > samples were collected if I use more than one event in a group.
> > > The following shows an example
> > >
> > > I used
> > > perf record -e '{instructions}:S' -c 100000 [TaskTracker command]
> > > This one works fine and it collects a reasonable amount of samples and
> > > several threads are sampled.
> > >
> > > However, the following command does not work.
> > > perf record -e '{instructions,cycles}:S' -c 100000 [TaskTracker command]
> > > Less than 1000 samples were collected and only one thread was sampled
> > >
> > > If I don't use :S to read samples, the sample counts are reasonable,
> > > but the event grouping is gone. (both events were sampled, no leader
> > > event.)
> > > perf record -e '{instructions,cycles}' -c 100000 [TaskTracker command]
> > >
> > > I tested single-threaded app, such as SPEC CPU.
> > > Everything works fine. The event grouping works fine, so as the :S flag.
> > > However, the Java app that I tested does not.
> > > Please let me know if any suggestions on this issue.
> > >
> > > Thanks.
> > >
> > To make it clear about the sample count difference, this is the stats
> > collected from a few seconds run of the same app: With only one event in a
> > group, it has ~362339 samples while 2 events in a group, it has only 938
> > samples (only 1 thread was profiled). I think the sample recording is
> > somehow stopped.
> > Thanks.
>
> I found that even the woken counts are different
> 1 event in a group:
> [ perf record: Woken up 27 times to write data ]
> [ perf record: Captured and wrote 7.165 MB perf.data (~313046 samples) ]
>
> 2 events in a group:
> [ perf record: Woken up 1 times to write data ]
> [ perf record: Captured and wrote 0.051 MB perf.data (~2223 samples) ]
hi,
we switch off event inheritance for multiple events in group
with leader sampling. That's probably why you see less samples
and only one thread.
The reason for that is the way we read event values, which
does not support inherited events yet.
I'll check and see what can be done about that.. at least
display a warning ;-)
thanks,
jirka
next prev parent reply other threads:[~2014-08-19 8:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-18 18:46 Problems with perf "event grouping" on Java apps Jen-Cheng(Tommy) Huang
2014-08-18 18:55 ` Problems with perf Tommy
2014-08-18 20:21 ` Tommy
2014-08-19 8:08 ` Jiri Olsa [this message]
2014-08-19 13:09 ` Andi Kleen
2014-08-19 14:50 ` Jen-Cheng(Tommy) Huang
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=20140819080852.GA12435@krava.brq.redhat.com \
--to=jolsa@redhat.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=tommy24@gatech.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).