<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/tools/kvm, branch linux-4.18.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-4.18.y</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=linux-4.18.y'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2018-10-10T06:55:54+00:00</updated>
<entry>
<title>tools/kvm_stat: fix updates for dead guests</title>
<updated>2018-10-10T06:55:54+00:00</updated>
<author>
<name>Stefan Raspl</name>
<email>stefan.raspl@de.ibm.com</email>
</author>
<published>2018-08-24T12:03:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e8f38e4e22168595d18de1065407d101ceeb61b8'/>
<id>urn:sha1:e8f38e4e22168595d18de1065407d101ceeb61b8</id>
<content type='text'>
[ Upstream commit 710ab11ad9329d2d4b044405e328c994b19a2aa9 ]

With pid filtering active, when a guest is removed e.g. via virsh shutdown,
successive updates produce garbage.
Therefore, we add code to detect this case and prevent further body updates.
Note that when displaying the help dialog via 'h' in this case, once we exit
we're stuck with the 'Collecting data...' message till we remove the filter.

Signed-off-by: Stefan Raspl &lt;raspl@linux.ibm.com&gt;
Signed-off-by: Radim Krčmář &lt;rkrcmar@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tools/kvm_stat: fix handling of invalid paths in debugfs provider</title>
<updated>2018-10-10T06:55:54+00:00</updated>
<author>
<name>Stefan Raspl</name>
<email>stefan.raspl@de.ibm.com</email>
</author>
<published>2018-08-24T12:03:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=52ff1e423ec99997651ddde3dd0657d7d8708135'/>
<id>urn:sha1:52ff1e423ec99997651ddde3dd0657d7d8708135</id>
<content type='text'>
[ Upstream commit 617c66b9f236d20f11cecbb3f45e6d5675b2fae1 ]

When filtering by guest, kvm_stat displays garbage when the guest is
destroyed - see sample output below.
We add code to remove the invalid paths from the providers, so at least
no more garbage is displayed.
Here's a sample output to illustrate:

  kvm statistics - pid 13986 (foo)

   Event                                         Total %Total CurAvg/s
   diagnose_258                                     -2    0.0        0
   deliver_program_interruption                     -3    0.0        0
   diagnose_308                                     -4    0.0        0
   halt_poll_invalid                               -91    0.0       -6
   deliver_service_signal                         -244    0.0      -16
   halt_successful_poll                           -250    0.1      -17
   exit_pei                                       -285    0.1      -19
   exit_external_request                          -312    0.1      -21
   diagnose_9c                                    -328    0.1      -22
   userspace_handled                              -713    0.1      -47
   halt_attempted_poll                            -939    0.2      -62
   deliver_emergency_signal                      -3126    0.6     -208
   halt_wakeup                                   -7199    1.5     -481
   exit_wait_state                               -7379    1.5     -493
   diagnose_500                                 -56499   11.5    -3757
   exit_null                                    -85491   17.4    -5685
   diagnose_44                                 -133300   27.1    -8874
   exit_instruction                            -195898   39.8   -13037
   Total                                       -492063

Signed-off-by: Stefan Raspl &lt;raspl@linux.vnet.ibm.com&gt;
Signed-off-by: Radim Krčmář &lt;rkrcmar@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tools/kvm_stat: fix python3 issues</title>
<updated>2018-10-10T06:55:54+00:00</updated>
<author>
<name>Stefan Raspl</name>
<email>stefan.raspl@de.ibm.com</email>
</author>
<published>2018-08-24T12:03:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a9ffbadacc94cb3e7906fcb0bb17404a1e6a1c89'/>
<id>urn:sha1:a9ffbadacc94cb3e7906fcb0bb17404a1e6a1c89</id>
<content type='text'>
[ Upstream commit 58f33cfe73076b6497bada4f7b5bda961ed68083 ]

Python3 returns a float for a regular division - switch to a division
operator that returns an integer.
Furthermore, filters return a generator object instead of the actual
list - wrap result in yet another list, which makes it still work in
both, Python2 and 3.

Signed-off-by: Stefan Raspl &lt;raspl@linux.ibm.com&gt;
Signed-off-by: Radim Krčmář &lt;rkrcmar@redhat.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tools/kvm_stat: Remove unused function</title>
<updated>2018-03-28T20:47:06+00:00</updated>
<author>
<name>Cole Robinson</name>
<email>crobinso@redhat.com</email>
</author>
<published>2018-03-23T22:07:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=1f97e01a385703c18ceb853c894ea09736161233'/>
<id>urn:sha1:1f97e01a385703c18ceb853c894ea09736161233</id>
<content type='text'>
Unused since added in 18e8f4100

Signed-off-by: Cole Robinson &lt;crobinso@redhat.com&gt;
Reviewed-and-tested-by: Stefan Raspl &lt;stefan.raspl@linux.vnet.ibm.com&gt;
Signed-off-by: Radim Krčmář &lt;rkrcmar@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools/kvm_stat: Don't use deprecated file()</title>
<updated>2018-03-28T20:47:06+00:00</updated>
<author>
<name>Cole Robinson</name>
<email>crobinso@redhat.com</email>
</author>
<published>2018-03-23T22:07:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=0866c31bf32fbd05dd25b6ed4976fa9134773227'/>
<id>urn:sha1:0866c31bf32fbd05dd25b6ed4976fa9134773227</id>
<content type='text'>
$ python3 tools/kvm/kvm_stat/kvm_stat
Traceback (most recent call last):
  File "tools/kvm/kvm_stat/kvm_stat", line 1668, in &lt;module&gt;
    main()
  File "tools/kvm/kvm_stat/kvm_stat", line 1639, in main
    assign_globals()
  File "tools/kvm/kvm_stat/kvm_stat", line 1618, in assign_globals
    for line in file('/proc/mounts'):
NameError: name 'file' is not defined

open() is the python3 way, and works on python2.6+

Signed-off-by: Cole Robinson &lt;crobinso@redhat.com&gt;
Reviewed-and-tested-by: Stefan Raspl &lt;stefan.raspl@linux.vnet.ibm.com&gt;
Signed-off-by: Radim Krčmář &lt;rkrcmar@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools/kvm_stat: Fix python3 syntax</title>
<updated>2018-03-28T20:47:06+00:00</updated>
<author>
<name>Cole Robinson</name>
<email>crobinso@redhat.com</email>
</author>
<published>2018-03-23T22:07:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6ade1ae84c9236cbb58de4b17f770f2791106676'/>
<id>urn:sha1:6ade1ae84c9236cbb58de4b17f770f2791106676</id>
<content type='text'>
$ python3 tools/kvm/kvm_stat/kvm_stat
  File "tools/kvm/kvm_stat/kvm_stat", line 1137
    def sortkey((_k, v)):
                ^
SyntaxError: invalid syntax

Fix it in a way that's compatible with python2 and python3

Signed-off-by: Cole Robinson &lt;crobinso@redhat.com&gt;
Tested-by: Stefan Raspl &lt;stefan.raspl@linux.vnet.ibm.com&gt;
Signed-off-by: Radim Krčmář &lt;rkrcmar@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools/kvm_stat: print 'Total' line for multiple events only</title>
<updated>2018-02-24T00:43:46+00:00</updated>
<author>
<name>Stefan Raspl</name>
<email>stefan.raspl@de.ibm.com</email>
</author>
<published>2018-02-22T11:16:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6789af030a462708f937137e05eb12ea009fb348'/>
<id>urn:sha1:6789af030a462708f937137e05eb12ea009fb348</id>
<content type='text'>
The 'Total' line looks a bit weird when we have a single event only. This
can happen e.g. due to filters. Therefore suppress when there's only a
single event in the output.

Signed-off-by: Stefan Raspl &lt;raspl@linux.vnet.ibm.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools/kvm_stat: group child events indented after parent</title>
<updated>2018-02-24T00:43:45+00:00</updated>
<author>
<name>Stefan Raspl</name>
<email>stefan.raspl@de.ibm.com</email>
</author>
<published>2018-02-22T11:16:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=df72ecfc790fa01de1c41f836ff51d12f9c40318'/>
<id>urn:sha1:df72ecfc790fa01de1c41f836ff51d12f9c40318</id>
<content type='text'>
We keep the current logic that sorts all events (parent and child), but
re-shuffle the events afterwards, grouping the children after the
respective parent. Note that the percentage column for child events
gives the percentage of the parent's total.
Since we rework the logic anyway, we modify the total average
calculation to use the raw numbers instead of the (rounded) averages.
Note that this can result in differing numbers (between total average
and the sum of the individual averages) due to rounding errors.

Signed-off-by: Stefan Raspl &lt;raspl@linux.vnet.ibm.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools/kvm_stat: separate drilldown and fields filtering</title>
<updated>2018-02-24T00:43:44+00:00</updated>
<author>
<name>Stefan Raspl</name>
<email>stefan.raspl@de.ibm.com</email>
</author>
<published>2018-02-22T11:16:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=18e8f4100ef14f924514fbd91eb67bd5fa5396b7'/>
<id>urn:sha1:18e8f4100ef14f924514fbd91eb67bd5fa5396b7</id>
<content type='text'>
Drilldown (i.e. toggle display of child trace events) was implemented by
overriding the fields filter. This resulted in inconsistencies: E.g. when
drilldown was not active, adding a filter that also matches child trace
events would not only filter fields according to the filter, but also add
in the child trace events matching the filter. E.g. on x86, setting
'kvm_userspace_exit' as the fields filter after startup would result in
display of kvm_userspace_exit(DCR), although that wasn't previously
present - not exactly what one would expect from a filter.
This patch addresses the issue by keeping drilldown and fields filter
separate. While at it, we also fix a PEP8 issue by adding a blank line
at one place (since we're in the area...).
We implement this by adding a framework that also allows to define a
taxonomy among the debugfs events to identify child trace events. I.e.
drilldown using 'x' can now also work with debugfs. A respective parent-
child relationship is only known for S390 at the moment, but could be
added adjusting other platforms' ARCH.dbg_is_child() methods
accordingly.

Signed-off-by: Stefan Raspl &lt;raspl@linux.vnet.ibm.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools/kvm_stat: eliminate extra guest/pid selection dialog</title>
<updated>2018-02-24T00:43:44+00:00</updated>
<author>
<name>Stefan Raspl</name>
<email>stefan.raspl@de.ibm.com</email>
</author>
<published>2018-02-22T11:16:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=516f1190a1e0cce12128a6446e6438745c8de62a'/>
<id>urn:sha1:516f1190a1e0cce12128a6446e6438745c8de62a</id>
<content type='text'>
We can do with a single dialog that takes both, pids and guest names.
Note that we keep both interactive commands, 'p' and 'g' for now, to
avoid confusion among users used to a specific key.

While at it, we improve on some minor glitches regarding curses usage,
e.g. cursor still visible when not supposed to be.

Signed-off-by: Stefan Raspl &lt;raspl@linux.vnet.ibm.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
</feed>
