All of lore.kernel.org
 help / color / mirror / Atom feed
* QEMU-KVM metrics collection | Calculation of instructions performed from perf events
@ 2017-07-04  9:38 Elena Talkova
  2017-07-05 17:20 ` Andi Kleen
  0 siblings, 1 reply; 3+ messages in thread
From: Elena Talkova @ 2017-07-04  9:38 UTC (permalink / raw)
  To: linux-perf-users

Hi everyone,


I'm trying to gather metrics about the number of integer & floating point operations and instructions performed on different CPUs. In particular, I run perf from the host machine for regular processes and for qemu-kvm virtual machine processes.

I see that perf has multiple events related to this topic on each type of CPU I try it on. But I'm not sure of how to make sense of this data.

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)

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)


So, my questions are:

1) Could you please specify any reliable sources of info on how to process these events in order to get number of instructions actually performed? I'm sure I'm not the only one interested in this and I want to learn how do other people do it instead of inventing my own bicycle.

2) Where should I look for differences in perf results for VM processes? Is there any workaround for that? Again, I'm talking here about qemu-kvm VMs in particular.


Here are the events I'm trying to work with for 2 CPU groups I'm using.

Sandy bridge:

FP_COMP_OPS_EXE.SSE_SCALAR_SINGLE

FP_COMP_OPS_EXE.SSE_SCALAR_DOUBLE

FP_COMP_OPS_EXE.SSE_PACKED_DOUBLE

FP_COMP_OPS_EXE.SSE_PACKED_SINGLE

SIMD_FP_256.PACKED_DOUBLE

SIMD_FP_256.PACKED_SINGLE

Broadwell, Skylake:

FP_ARITH_INST_RETIRED.SCALAR_SINGLE

FP_ARITH_INST_RETIRED.SCALAR_DOUBLE

FP_ARITH_INST_RETIRED.128B_PACKED_DOUBLE

FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE

FP_ARITH_INST_RETIRED.256B_PACKED_DOUBLE

FP_ARITH_INST_RETIRED.256B_PACKED_SINGLE


Thanks!
Best regards, Elena

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-10  9:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2017-07-10  9:31   ` Elena Talkova

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.