<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/tools/perf/scripts/python, branch docs-5.15-2</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-5.15-2</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-5.15-2'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2021-06-01T13:05:20+00:00</updated>
<entry>
<title>perf scripting python: intel-pt-events.py: Add --insn-trace and --src-trace</title>
<updated>2021-06-01T13:05:20+00:00</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2021-05-30T19:23:08+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=a483e64c0b62e93a772cbc96f32bad885586fad7'/>
<id>urn:sha1:a483e64c0b62e93a772cbc96f32bad885586fad7</id>
<content type='text'>
Add an instruction trace and a source trace to the intel-pt-events.py
script.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Link: https://lore.kernel.org/r/20210530192308.7382-14-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf scripting python: exported-sql-viewer.py: Factor out libxed.py</title>
<updated>2021-06-01T13:05:08+00:00</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2021-05-30T19:23:07+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=2b87386c7a1c0488bf2a27d7f4ac80aa84e22fb5'/>
<id>urn:sha1:2b87386c7a1c0488bf2a27d7f4ac80aa84e22fb5</id>
<content type='text'>
Factor out libxed.py so it can be reused.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Link: https://lore.kernel.org/r/20210530192308.7382-13-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf scripting python: Add perf_sample_srcline() and perf_sample_srccode()</title>
<updated>2021-06-01T13:04:35+00:00</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2021-05-30T19:23:05+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=e79457a526105c94930a5babbecaeeb794593723'/>
<id>urn:sha1:e79457a526105c94930a5babbecaeeb794593723</id>
<content type='text'>
Add perf_sample_srcline() and perf_sample_srccode() to the
perf_trace_context module so that a script can get the srcline or srccode
information.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Link: https://lore.kernel.org/r/20210530192308.7382-11-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf scripting python: Add perf_set_itrace_options()</title>
<updated>2021-06-01T13:04:24+00:00</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2021-05-30T19:23:04+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=7d00540d7deb6802cde23b132b0c50347f27cc90'/>
<id>urn:sha1:7d00540d7deb6802cde23b132b0c50347f27cc90</id>
<content type='text'>
Add perf_set_itrace_options() to the perf_trace_context module so that a
script can set the itrace options for a session if they have not been set
already.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Link: https://lore.kernel.org/r/20210530192308.7382-10-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf scripting python: Add perf_sample_insn()</title>
<updated>2021-06-01T13:03:58+00:00</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2021-05-30T19:23:02+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=13c71b92327aaacc7a3c3ca5f003f3f66ba5af65'/>
<id>urn:sha1:13c71b92327aaacc7a3c3ca5f003f3f66ba5af65</id>
<content type='text'>
Add perf_sample_insn() to the perf_trace_context module so that a script
can get the instruction bytes.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Link: https://lore.kernel.org/r/20210530192308.7382-8-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf scripting python: Assign perf_script_context</title>
<updated>2021-06-01T13:03:33+00:00</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2021-05-30T19:23:00+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=cf9bfa6c150f038328f8059a69a6f1598d6702b2'/>
<id>urn:sha1:cf9bfa6c150f038328f8059a69a6f1598d6702b2</id>
<content type='text'>
The scripting_context pointer itself does not change and nor does it need
to. Put it directly into the script as a variable at the start so it does
not have to be passed on each call into the script.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Link: https://lore.kernel.org/r/20210530192308.7382-6-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf scripting python: Simplify perf-trace-context module functions</title>
<updated>2021-06-01T13:02:47+00:00</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2021-05-30T19:22:57+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=6337bd0c91f66527741e61ecb73b9cff0d7f48f8'/>
<id>urn:sha1:6337bd0c91f66527741e61ecb73b9cff0d7f48f8</id>
<content type='text'>
Simplify perf-trace-context module functions by factoring out some
common code.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Link: https://lore.kernel.org/r/20210530192308.7382-3-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf scripting python: Remove unnecessary 'static'</title>
<updated>2021-06-01T13:02:25+00:00</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2021-05-30T19:22:56+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=4c62244e035e99a9e43d25a017cbe98f7562b21f'/>
<id>urn:sha1:4c62244e035e99a9e43d25a017cbe98f7562b21f</id>
<content type='text'>
The variables are always assigned before use, making the 'static'
storage class unnecessary.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Arnaldo Carvalho de Melo &lt;acme@kernel.org&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Link: https://lore.kernel.org/r/20210530192308.7382-2-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf scripts python: intel-pt-events.py: Add branches to script</title>
<updated>2021-05-25T13:07:17+00:00</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2021-05-25T09:51:12+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=a92bf335fd82eeee0e95705bfd25014ee0c8262e'/>
<id>urn:sha1:a92bf335fd82eeee0e95705bfd25014ee0c8262e</id>
<content type='text'>
As an example, add branch information to intel-pt-events.py script.
This shows how a simple python script can be used to customize
perf script output for Intel PT branch traces or power event traces.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Link: https://lore.kernel.org/r/20210525095112.1399-11-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 warning display</title>
<updated>2021-05-21T19:31:07+00:00</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2021-05-21T09:20:53+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f56299a9c998e0bfbd4ab07cafe9eb8444512448'/>
<id>urn:sha1:f56299a9c998e0bfbd4ab07cafe9eb8444512448</id>
<content type='text'>
Deprecation warnings are useful only for the developer, not an end user.
Display warnings only when requested using the python -W option. This
stops the display of warnings like:

 tools/perf/scripts/python/exported-sql-viewer.py:5102: DeprecationWarning:
         an integer is required (got type PySide2.QtCore.Qt.AlignmentFlag).
         Implicit conversion to integers using __int__ is deprecated, and
         may be removed in a future version of Python.
    err = app.exec_()

Since the warning can be fixed only in PySide2, we must wait for it to
be finally fixed there.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: stable@vger.kernel.org      # v5.3+
Link: http://lore.kernel.org/lkml/20210521092053.25683-4-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
</feed>
