All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Elena Talkova <e.talkova@zoho.eu>
Cc: linux-perf-users <linux-perf-users@vger.kernel.org>
Subject: Re: QEMU-KVM metrics collection | Calculation of instructions performed from perf events
Date: Wed, 05 Jul 2017 10:20:02 -0700	[thread overview]
Message-ID: <874luq7qd9.fsf@firstfloor.org> (raw)
In-Reply-To: <15d0cf6ed40.ad8fdbd059031.2271426277329799808@zoho.eu> (Elena Talkova's message of "Tue, 04 Jul 2017 12:38:15 +0300")

Elena Talkova <e.talkova@zoho.eu> writes:
>
> I have 2 problems so far:
>
> 1) I'm not sure how to use all available events to calculate number of instructions performed (integer and floating-points)

You would need a better definition. There's no way
to count "all integer" instructions. Just all instructions,
or some specific classes of instructions.

If you need an exact instruction histogram the only
way is to use special instrumentation tools like pin.

> 2) I get totally different results when running perf for a process on
> host machine and for a virtual machine process (with VM values often
> being just zeros)

Measuring the counts from the host should work, except for
PEBS events.

> Sandy bridge:
>
> FP_COMP_OPS_EXE.SSE_SCALAR_SINGLE

These events are difficult to use because they include speculative and
re-issued execution, which can be high. Typically you need a significant
workload specific correction factor.

The retired Broadwell, Skylake events below don't have this problem. But it's
still not "all floating point" instructions, just all floating point
arithmetic.

-Andi

  reply	other threads:[~2017-07-05 17:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-04  9:38 QEMU-KVM metrics collection | Calculation of instructions performed from perf events Elena Talkova
2017-07-05 17:20 ` Andi Kleen [this message]
2017-07-10  9:31   ` Elena Talkova

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=874luq7qd9.fsf@firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=e.talkova@zoho.eu \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.