linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tommy <tommy24@gatech.edu>
To: linux-perf-users@vger.kernel.org
Subject: Re: Problems with perf
Date: Mon, 18 Aug 2014 20:21:22 +0000 (UTC)	[thread overview]
Message-ID: <loom.20140818T221806-241@post.gmane.org> (raw)
In-Reply-To: loom.20140818T205057-420@post.gmane.org

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) ]

It seems that something has been disabled, but no error/warning messages 
were shown.
Thanks.

  reply	other threads:[~2014-08-18 20:21 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 [this message]
2014-08-19  8:08     ` Jiri Olsa
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=loom.20140818T221806-241@post.gmane.org \
    --to=tommy24@gatech.edu \
    --cc=linux-perf-users@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).