<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/perf/scripts/python/exported-sql-viewer.py, branch v5.1</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.1</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-03-28T18:53:16Z</updated>
<entry>
<title>perf scripts python: exported-sql-viewer.py: Fix python3 support</title>
<updated>2019-03-28T18:53:16Z</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2019-03-27T07:28:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=606bd60ab6fbcb7f73deeef4fa37cfd5e447a200'/>
<id>urn:sha1:606bd60ab6fbcb7f73deeef4fa37cfd5e447a200</id>
<content type='text'>
Unlike python2, python3 strings are not compatible with byte strings.
That results in disassembly not working for the branches reports. Fixup
those places overlooked in the port to python3.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Fixes: beda0e725e5f ("perf script python: Add Python3 support to exported-sql-viewer.py")
Link: http://lkml.kernel.org/r/20190327072826.19168-3-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf scripts python: exported-sql-viewer.py: Fix never-ending loop</title>
<updated>2019-03-28T17:41:21Z</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2019-03-27T07:28:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8453c936db20489dbf0957187dca9a2656a2a7b6'/>
<id>urn:sha1:8453c936db20489dbf0957187dca9a2656a2a7b6</id>
<content type='text'>
pyside version 1 fails to handle python3 large integers in some cases,
resulting in Qt getting into a never-ending loop. This affects:
	samples Table
	samples_view Table
	All branches Report
	Selected branches Report

Add workarounds for those cases.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Fixes: beda0e725e5f ("perf script python: Add Python3 support to exported-sql-viewer.py")
Link: http://lkml.kernel.org/r/20190327072826.19168-2-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf script python: Add Python3 support to exported-sql-viewer.py</title>
<updated>2019-03-11T19:12:52Z</updated>
<author>
<name>Tony Jones</name>
<email>tonyj@suse.de</email>
</author>
<published>2019-03-09T00:05:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=beda0e725e5f06aca27eda2434ea9447dad88e36'/>
<id>urn:sha1:beda0e725e5f06aca27eda2434ea9447dad88e36</id>
<content type='text'>
Support both Python2 and Python3 in the exported-sql-viewer.py script.

The use of 'from __future__' implies the minimum supported Python2 version
is now v2.6

Signed-off-by: Tony Jones &lt;tonyj@suse.de&gt;
Acked-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Link: http://lkml.kernel.org/r/20190309000518.2438-2-tonyj@suse.de
Signed-off-by: Seeteena Thoufeek &lt;s1seetee@linux.vnet.ibm.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf scripts python: exported-sql-viewer.py: Add call tree</title>
<updated>2019-03-01T18:04:16Z</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2019-02-28T13:00:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ae8b887c00d3fe4ca8c2cba16ae452b5df4c19e2'/>
<id>urn:sha1:ae8b887c00d3fe4ca8c2cba16ae452b5df4c19e2</id>
<content type='text'>
Add a new report to display a call tree. The Call Tree report is very
similar to the Context-Sensitive Call Graph, but the data is not
aggregated. Also the 'Count' column, which would be always 1, is replaced
by the 'Call Time'.

Committer testing:

  $ cat simple-retpoline.c
  /*

    https://lkml.kernel.org/r/20190109091835.5570-6-adrian.hunter@intel.com

  $ gcc -ggdb3 -Wall -Wextra -O2 -o simple-retpoline simple-retpoline.c
  $ objdump -d simple-retpoline
  */

  __attribute__((noinline)) int bar(void)
  {
          return -1;
  }

  int foo(void)
  {
          return bar() + 1;
  }

  __attribute__((indirect_branch("thunk"))) int main()
  {
          int (*volatile fn)(void) = foo;

          fn();
          return fn();
  }
  $
  $ perf record -o simple-retpoline.perf.data -e intel_pt/cyc/u ./simple-retpoline
  $ perf script -i simple-retpoline.perf.data --itrace=be -s ~acme/libexec/perf-core/scripts/python/export-to-sqlite.py simple-retpoline.db branches calls
  $ python ~acme/libexec/perf-core/scripts/python/exported-sql-viewer.py simple-retpoline.db

And in the GUI select:

    "Reports"
      "Call Tree"

    Call Path                 | Object          | Call Time (ns) | Time (ns) | Time (%) | Branch Count | Brach Count (%) |
    &gt; simple-retpolin
      &gt; PID:TID
        &gt; _start                ld-2.28.so       2193855505777      156267      100.0       10602          100.0
            unknown             unknown          2193855506010        2276        1.5           1            0.0
          &gt; _dl_start           ld-2.28.so       2193855508286      137047       87.7       10088           95.2
          &gt; _dl_init            ld-2.28.so       2193855645444        9142        5.9         326            3.1
          &gt; _start              simple-retpoline 2193855654587        7457        4.8         182            1.7
            &gt; __libc_start_main &lt;SNIP&gt;
              &lt;SNIP&gt;
              &gt; main            simple-retpoline 2193855657493          32        0.5          12            6.7
                &gt; foo           simple-retpoline 2193855657493          14       43.8           5           41.7
              &lt;SNIP&gt;

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Tested-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Link: https://lkml.kernel.org/n/tip-enf0w96gqzfpv4fi16pw9ovc@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf scripts python: exported-sql-viewer.py: Factor out CallGraphModelBase</title>
<updated>2019-03-01T17:56:17Z</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2019-02-28T13:00:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=254c0d820b86d7712e03750c58ab104e06e3655d'/>
<id>urn:sha1:254c0d820b86d7712e03750c58ab104e06e3655d</id>
<content type='text'>
Factor out a base class CallGraphModelBase from CallGraphModel, so that
CallGraphModelBase can be reused.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Link: https://lkml.kernel.org/n/tip-76eybebzjwvgnadkm2oufrqi@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf scripts python: exported-sql-viewer.py: Improve TreeModel abstraction</title>
<updated>2019-03-01T17:55:32Z</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2019-02-28T13:00:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a448ba232a5f0176c226df1bab8877ec06a7c771'/>
<id>urn:sha1:a448ba232a5f0176c226df1bab8877ec06a7c771</id>
<content type='text'>
Instead of passing the tree root, get it from a method that can be
implemented in any derived class.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Link: https://lkml.kernel.org/n/tip-ovcv28bg4mt9swk36ypdyz14@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf scripts python: exported-sql-viewer.py: Factor out TreeWindowBase</title>
<updated>2019-03-01T17:54:39Z</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2019-02-28T13:00:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a731cc4c990a90d9d42a2081ca93fb4310680ae2'/>
<id>urn:sha1:a731cc4c990a90d9d42a2081ca93fb4310680ae2</id>
<content type='text'>
Factor out a base class TreeWindowBase from CallGraphWindow, so that
TreeWindowBase can be reused.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Link: https://lkml.kernel.org/n/tip-ifirw0c0mhkwxg6l12lk6k4p@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf scripts python: exported-sql-viewer.py: Add top calls report</title>
<updated>2019-02-22T19:52:07Z</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2019-02-22T07:27:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cd358012ba20d4193c225d89cd1d0c11bc54b1bc'/>
<id>urn:sha1:cd358012ba20d4193c225d89cd1d0c11bc54b1bc</id>
<content type='text'>
Add a new report to display top calls by elapsed time. It displays calls
in descending order of time elapsed between when the function was called
and when it returned.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf scripts python: exported-sql-viewer.py: Remove no selection error</title>
<updated>2019-02-22T19:52:07Z</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2019-02-22T07:27:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fc2c77aa8437855d2992d3f3c6a1dff681789a07'/>
<id>urn:sha1:fc2c77aa8437855d2992d3f3c6a1dff681789a07</id>
<content type='text'>
If no selection is made on the 'Selected branches' dialog, then the
output is the same as the 'All branches' report. That is not really an
error, and is not desirable for future reports, so remove it.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf scripts python: exported-sql-viewer.py: Remove SQLTableDialogDataItem</title>
<updated>2019-02-22T19:52:07Z</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2019-02-22T07:27:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0d5f8f230c67d911fa5c3b868eb4529ecd6faf34'/>
<id>urn:sha1:0d5f8f230c67d911fa5c3b868eb4529ecd6faf34</id>
<content type='text'>
Remove SQLTableDialogDataItem as it is no longer used.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
</feed>
