<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/tools/kvm, branch v4.16-rc4</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<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.toradex.cn/cgit/linux-toradex.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.toradex.cn/cgit/linux-toradex.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.toradex.cn/cgit/linux-toradex.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.toradex.cn/cgit/linux-toradex.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.toradex.cn/cgit/linux-toradex.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.toradex.cn/cgit/linux-toradex.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.toradex.cn/cgit/linux-toradex.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>
<entry>
<title>tools/kvm_stat: fix crash when filtering out all non-child trace events</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:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3df33a0f34a3883b6696bff8cc8fcda3c7444a62'/>
<id>3df33a0f34a3883b6696bff8cc8fcda3c7444a62</id>
<content type='text'>
When we apply a filter that will only leave child trace events, we
receive a ZeroDivisionError when calculating the percentages.
In that case, provide percentages based on child events only.
To reproduce, run 'kvm_stat -f .*[\(].*'.

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>
When we apply a filter that will only leave child trace events, we
receive a ZeroDivisionError when calculating the percentages.
In that case, provide percentages based on child events only.
To reproduce, run 'kvm_stat -f .*[\(].*'.

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: avoid 'is' for equality checks</title>
<updated>2018-02-24T00:43:40+00:00</updated>
<author>
<name>Marc Hartmayer</name>
<email>mhartmay@linux.vnet.ibm.com</email>
</author>
<published>2018-01-09T12:27:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=369d5a85bb782ecf63c5bae9686c7e6104eea991'/>
<id>369d5a85bb782ecf63c5bae9686c7e6104eea991</id>
<content type='text'>
Use '==' for equality checks and 'is' when comparing identities.

An example where '==' and 'is' behave differently:
&gt;&gt;&gt; a = 4242
&gt;&gt;&gt; a == 4242
True
&gt;&gt;&gt; a is 4242
False

Signed-off-by: Marc Hartmayer &lt;mhartmay@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>
Use '==' for equality checks and 'is' when comparing identities.

An example where '==' and 'is' behave differently:
&gt;&gt;&gt; a = 4242
&gt;&gt;&gt; a == 4242
True
&gt;&gt;&gt; a is 4242
False

Signed-off-by: Marc Hartmayer &lt;mhartmay@linux.vnet.ibm.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tools/kvm_stat: use a more pythonic way to iterate over dictionaries</title>
<updated>2018-02-24T00:43:39+00:00</updated>
<author>
<name>Marc Hartmayer</name>
<email>mhartmay@linux.vnet.ibm.com</email>
</author>
<published>2018-01-09T12:27:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0eb578009a1d530a11846d7c4733a5db04730884'/>
<id>0eb578009a1d530a11846d7c4733a5db04730884</id>
<content type='text'>
If it's clear that the values of a dictionary will be used then use
the '.items()' method.

Signed-off-by: Marc Hartmayer &lt;mhartmay@linux.vnet.ibm.com&gt;
Tested-by: Stefan Raspl &lt;raspl@linux.vnet.ibm.com&gt;
[Include fix for logging mode by Stefan Raspl]
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If it's clear that the values of a dictionary will be used then use
the '.items()' method.

Signed-off-by: Marc Hartmayer &lt;mhartmay@linux.vnet.ibm.com&gt;
Tested-by: Stefan Raspl &lt;raspl@linux.vnet.ibm.com&gt;
[Include fix for logging mode by Stefan Raspl]
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
