<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/tools/perf/util/kvm-stat.h, branch linux-4.3.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.3.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.3.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2015-04-02T16:18:47Z</updated>
<entry>
<title>perf kvm: Support using -f to override perf.data.guest file ownership</title>
<updated>2015-04-02T16:18:47Z</updated>
<author>
<name>Yunlong Song</name>
<email>yunlong.song@huawei.com</email>
</author>
<published>2015-04-02T13:47:13Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=8cc5ec1f754355ed788838390e86389c9ffb7590'/>
<id>urn:sha1:8cc5ec1f754355ed788838390e86389c9ffb7590</id>
<content type='text'>
Enable perf kvm to use perf.data.guest when it is not owned by current
user or root.

Example:

 # perf kvm stat record ls
 # chown Yunlong.Song:Yunlong.Song perf.data.guest
 # ls -al perf.data.guest
 -rw------- 1 Yunlong.Song Yunlong.Song 4128937 Apr  2 11:05 perf.data.guest
 # id
 uid=0(root) gid=0(root) groups=0(root),64(pkcs11)

Before this patch:

 # perf kvm stat report
 File perf.data.guest not owned by current user or root (use -f to override)
 Initializing perf session failed
 # perf kvm stat report -f
   Error: unknown switch `f'

  usage: perf kvm stat report [&lt;options&gt;]

         --event &lt;report event&gt;
                           event for reporting: vmexit, mmio (x86 only),
                           ioport (x86 only)
         --vcpu &lt;n&gt;        vcpu id to report
     -k, --key &lt;sort-key&gt;  key for sorting: sample(sort by samples
 						   number) time (sort by avg time)
     -p, --pid &lt;pid&gt;       analyze events only for given process id(s)

As shown above, the -f option does not work at all.

After this patch:

 # perf kvm stat report
 File perf.data.guest not owned by current user or root (use -f to override)
 Initializing perf session failed
 # perf kvm stat report -f
 Analyze events for all VMs, all VCPUs:

   VM-EXIT    Samples  Samples%     Time%    Min Time    Max Time   Avg time

 Total Samples:0, Total events handled time:0.00us.

As shown above, the -f option really works now. Since we have not
launched any KVM related process, the result shows 0 sample here.

Signed-off-by: Yunlong Song &lt;yunlong.song@huawei.com&gt;
Tested-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Wang Nan &lt;wangnan0@huawei.com&gt;
Link: http://lkml.kernel.org/r/1427982439-27388-5-git-send-email-yunlong.song@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf kvm stat report: Save pid string in opts.target.pid</title>
<updated>2014-09-17T20:08:07Z</updated>
<author>
<name>Alexander Yarygin</name>
<email>yarygin@linux.vnet.ibm.com</email>
</author>
<published>2014-09-01T13:44:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3ae4a76ac840021294c091884e04af7c92e481ae'/>
<id>urn:sha1:3ae4a76ac840021294c091884e04af7c92e481ae</id>
<content type='text'>
The 'perf kvm stat report' command uses the kvm-&gt;pid_str field to keep
the value of the --pid option. Let's use kvm-&gt;opts.target.pid instead.

Signed-off-by: Alexander Yarygin &lt;yarygin@linux.vnet.ibm.com&gt;
Acked-by: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1409579095-12963-2-git-send-email-yarygin@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf kvm: Add stat support on s390</title>
<updated>2014-07-16T20:57:33Z</updated>
<author>
<name>Alexander Yarygin</name>
<email>yarygin@linux.vnet.ibm.com</email>
</author>
<published>2014-07-03T14:29:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3be8e2a0a53c3179a44a933614f6a893da0b5c19'/>
<id>urn:sha1:3be8e2a0a53c3179a44a933614f6a893da0b5c19</id>
<content type='text'>
On s390, the vmexit event has a tree-like structure: between
exit_event_begin and exit_event_end several other events may happen and
with each of them refining the previous ones.

This patch adds a decoder for such events to the generic code and also
the files &lt;asm/kvm_perf.h&gt; and kvm-stat.c for s390.

Commands 'perf kvm stat record', 'report' and 'live' are supported.

Reviewed-by: David Ahern &lt;dsahern@gmail.com&gt;
Signed-off-by: Alexander Yarygin &lt;yarygin@linux.vnet.ibm.com&gt;
Acked-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Cc: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Cc: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1404397747-20939-5-git-send-email-yarygin@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf kvm: Add skip_event() for --duration option</title>
<updated>2014-07-16T20:57:32Z</updated>
<author>
<name>Alexander Yarygin</name>
<email>yarygin@linux.vnet.ibm.com</email>
</author>
<published>2014-07-03T14:29:06Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=54c801ff71ba9c9ae41871e226b9d846ff9c6bab'/>
<id>urn:sha1:54c801ff71ba9c9ae41871e226b9d846ff9c6bab</id>
<content type='text'>
Current code skips output of the x86 specific HLT event in order to
avoid flooding the output with enabled --duration option. The events to
be skipped should be architecture dependent, though.

Let's add an architecture specific array of events to be skipped and
introduce a skip_event() function checking against that array.

Reviewed-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Reviewed-by: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Reviewed-by: David Ahern &lt;dsahern@gmail.com&gt;
Signed-off-by: Alexander Yarygin &lt;yarygin@linux.vnet.ibm.com&gt;
Cc: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Cc: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1404397747-20939-4-git-send-email-yarygin@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf kvm: Move arch specific code into arch/</title>
<updated>2014-07-16T20:57:32Z</updated>
<author>
<name>Alexander Yarygin</name>
<email>yarygin@linux.vnet.ibm.com</email>
</author>
<published>2014-07-03T14:29:05Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9daa81239e60c162153fb2a365b8492c9a9bf632'/>
<id>urn:sha1:9daa81239e60c162153fb2a365b8492c9a9bf632</id>
<content type='text'>
Parts of a 'perf kvm stat' code make sense only for x86.

Let's move this code into the arch/x86/kvm-stat.c file and add
util/kvm-stat.h for generic structure definitions.

Add a global array 'kvm_reg_events_ops' for accessing the arch-specific
'kvm_events_ops' from generic code.

Since the several global arrays (i.e. 'kvm_events_tp') have been moved
to arch/*, we can not know their sizes and use them directly in
builtin-kvm.c. This patch fixes that problem by adding trimming NULL
element to each array and changing the behavior of their handlers in
generic code.

Reviewed-by: David Ahern &lt;dsahern@gmail.com&gt;
Reviewed-by: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Signed-off-by: Alexander Yarygin &lt;yarygin@linux.vnet.ibm.com&gt;
Acked-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Cc: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Cc: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1404397747-20939-3-git-send-email-yarygin@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
</feed>
