<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/tools/kvm, branch v4.18.2</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<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.tavy.me/linux-stable.git/commit/?id=1f97e01a385703c18ceb853c894ea09736161233'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</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.tavy.me/linux-stable.git/commit/?id=0866c31bf32fbd05dd25b6ed4976fa9134773227'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
$ 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;
</pre>
</div>
</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.tavy.me/linux-stable.git/commit/?id=6ade1ae84c9236cbb58de4b17f770f2791106676'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
$ 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;
</pre>
</div>
</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.tavy.me/linux-stable.git/commit/?id=6789af030a462708f937137e05eb12ea009fb348'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</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.tavy.me/linux-stable.git/commit/?id=df72ecfc790fa01de1c41f836ff51d12f9c40318'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</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.tavy.me/linux-stable.git/commit/?id=18e8f4100ef14f924514fbd91eb67bd5fa5396b7'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</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.tavy.me/linux-stable.git/commit/?id=516f1190a1e0cce12128a6446e6438745c8de62a'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools/kvm_stat: mark private methods as such</title>
<updated>2018-02-24T00:43:43+00:00</updated>
<author>
<name>Stefan Raspl</name>
<email>stefan.raspl@de.ibm.com</email>
</author>
<published>2018-02-22T11:16:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c0e8c21eae616ed8703c1b4b01046a1578ee875c'/>
<id>c0e8c21eae616ed8703c1b4b01046a1578ee875c</id>
<content type='text'>
Helps quite a bit reading the code when it's obvious when a method is
intended for internal use only.

Signed-off-by: Stefan Raspl &lt;raspl@linux.vnet.ibm.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Helps quite a bit reading the code when it's obvious when a method is
intended for internal use only.

Signed-off-by: Stefan Raspl &lt;raspl@linux.vnet.ibm.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools/kvm_stat: fix debugfs handling</title>
<updated>2018-02-24T00:43:42+00:00</updated>
<author>
<name>Stefan Raspl</name>
<email>stefan.raspl@de.ibm.com</email>
</author>
<published>2018-02-22T11:16:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1fd6a708c8438403dee17eb411cf81ffba13cf43'/>
<id>1fd6a708c8438403dee17eb411cf81ffba13cf43</id>
<content type='text'>
Te checks for debugfs assumed that debugfs is always mounted at
/sys/kernel/debug - which is likely, but not guaranteed. This is addressed
by checking /proc/mounts for the actual location.
Furthermore, when debugfs was mounted, but the kvm module not loaded, a
misleading error pointing towards debugfs not present was given.
To reproduce,
(a) run kvm_stat with debugfs mounted at a place different from
    /sys/kernel/debug
(b) run kvm_stat with debugfs mounted but kvm module not loaded

Signed-off-by: Stefan Raspl &lt;raspl@linux.vnet.ibm.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Te checks for debugfs assumed that debugfs is always mounted at
/sys/kernel/debug - which is likely, but not guaranteed. This is addressed
by checking /proc/mounts for the actual location.
Furthermore, when debugfs was mounted, but the kvm module not loaded, a
misleading error pointing towards debugfs not present was given.
To reproduce,
(a) run kvm_stat with debugfs mounted at a place different from
    /sys/kernel/debug
(b) run kvm_stat with debugfs mounted but kvm module not loaded

Signed-off-by: Stefan Raspl &lt;raspl@linux.vnet.ibm.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools/kvm_stat: print error on invalid regex</title>
<updated>2018-02-24T00:43:41+00:00</updated>
<author>
<name>Stefan Raspl</name>
<email>stefan.raspl@de.ibm.com</email>
</author>
<published>2018-02-05T12:59:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1cd8bfb1ed9962be6d80d5020508922aa93653ac'/>
<id>1cd8bfb1ed9962be6d80d5020508922aa93653ac</id>
<content type='text'>
Entering an invalid regular expression did not produce any indication of an
error so far.
To reproduce, press 'f' and enter 'foo(' (with an unescaped bracket).

Signed-off-by: Stefan Raspl &lt;raspl@linux.vnet.ibm.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Entering an invalid regular expression did not produce any indication of an
error so far.
To reproduce, press 'f' and enter 'foo(' (with an unescaped bracket).

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