linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Yale Zhang <yzhang1985@gmail.com>
Cc: Andi Kleen <andi@firstfloor.org>, linux-perf-users@vger.kernel.org
Subject: Re: Size of perf data files
Date: Tue, 6 Jan 2015 22:29:19 +0100	[thread overview]
Message-ID: <20150106212919.GW2915@two.firstfloor.org> (raw)
In-Reply-To: <CALQF7ZzpLB3Ch3=nn5yi23eneqwXnEpFTq6dX4BT7dLYvxcVXw@mail.gmail.com>

On Tue, Jan 06, 2015 at 01:02:23PM -0800, Yale Zhang wrote:
> I don't see how lowering the frequency helps. If I lower it, then I'll
> need to run longer to capture the same # samples to achieve a given
> variation.

I don't know what that means.

Normally you have a workload and you measure it a given time.

The sampling rate is related to the accuracy you need. However
the default algorithm has a tendency to go very low, which
results in large files, but it doesn't give you that much
better accuracy.

Not a pre-defined number of samples. 

One trick that perf tools currently don't support well (it is
supported in ther kernel) is to also use multiple events. 
One low frequency event to measure the call graphs and 
other high frequency events to measure whatever else you want.

> I've already tried lowering the size of each sample from 8KiB to 512,
> but that only allows storing 2 or 3 parent function calls, which isn't
> enough for me.
> 
> "don't use dwarf unwinding."
> The main reason I'm trying to switch from Zoom to perf is because it
> supports dwarf unwinding! That's very convenient because otherwise

Frankly, dwarf unwinding for profiling is terrible. Only use it as a last
resort.

> I'll need to compile with frame pointers to do stack traces. This
> isn't the default and can slow down the program. As long as the Dwarf
> unwinding doesn't perturb the profilee  (by doing it at the end), then
> it would be OK.

If you have a Haswell system the next kernel will have LBR call stack
support, which avoids the need for both in common cases.

-Andi

  reply	other threads:[~2015-01-06 21:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-06  3:21 Size of perf data files Yale Zhang
2015-01-06  5:39 ` Andi Kleen
2015-01-06 21:02   ` Yale Zhang
2015-01-06 21:29     ` Andi Kleen [this message]
2015-01-09  2:06     ` Frank Ch. Eigler
  -- strict thread matches above, loose matches on Subject: below --
2014-11-26 12:47 Milian Wolff
2014-11-26 16:06 ` Arnaldo Carvalho de Melo
2014-11-26 18:11   ` Milian Wolff
2014-11-27  0:56     ` Namhyung Kim
2014-11-27 13:19       ` Arnaldo Carvalho de Melo
2014-11-28  6:18         ` Namhyung Kim
2014-11-26 20:48 ` Andi Kleen

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=20150106212919.GW2915@two.firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=yzhang1985@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).