<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/tools/perf/util/scripting-engines, branch linux-4.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.16.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.16.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2018-01-12T14:06:57Z</updated>
<entry>
<title>perf script python: Add script to profile and resolve physical mem type</title>
<updated>2018-01-12T14:06:57Z</updated>
<author>
<name>Kan Liang</name>
<email>Kan.liang@intel.com</email>
</author>
<published>2018-01-04T20:59:55Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=41013f0c095980775e0746272873891ca7c28fb1'/>
<id>urn:sha1:41013f0c095980775e0746272873891ca7c28fb1</id>
<content type='text'>
There could be different types of memory in the system. E.g normal
System Memory, Persistent Memory. To understand how the workload maps to
those memories, it's important to know the I/O statistics of them.  Perf
can collect physical addresses, but those are raw data.  It still needs
extra work to resolve the physical addresses.  Provide a script to
facilitate the physical addresses resolving and I/O statistics.

Profile with MEM_INST_RETIRED.ALL_LOADS or MEM_UOPS_RETIRED.ALL_LOADS
event if any of them is available.

Look up the /proc/iomem and resolve the physical address.  Provide
memory type summary.

Here is an example output:

  # perf script report mem-phys-addr
  Event: mem_inst_retired.all_loads:P
  Memory type                                    count   percentage
  ----------------------------------------  -----------  -----------
  System RAM                                        74        53.2%
  Persistent Memory                                 55        39.6%
  N/A

  ---

Changes since V2:
 - Apply the new license rules.
 - Add comments for globals

Changes since V1:
 - Do not mix DLA and Load Latency. Do not compare the loads and stores.
   Only profile the loads.
 - Use event name to replace the RAW event

Signed-off-by: Kan Liang &lt;Kan.liang@intel.com&gt;
Reviewed-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Dan Williams &lt;dan.j.williams@intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Philippe Ombredanne &lt;pombredanne@nexb.com&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Link: https://lkml.kernel.org/r/1515099595-34770-1-git-send-email-kan.liang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf perf: Remove duplicate includes</title>
<updated>2017-12-27T15:15:49Z</updated>
<author>
<name>Pravin Shedge</name>
<email>pravin.shedge4linux@gmail.com</email>
</author>
<published>2017-12-06T17:43:24Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3315d14f8eea27a845bd2e3a88341a35f4025866'/>
<id>urn:sha1:3315d14f8eea27a845bd2e3a88341a35f4025866</id>
<content type='text'>
These duplicate includes have been found with scripts/checkincludes.pl
but they have been removed manually to avoid removing false positives.

Signed-off-by: Pravin Shedge &lt;pravin.shedge4linux@gmail.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Link: http://lkml.kernel.org/r/1512582204-6493-1-git-send-email-pravin.shedge4linux@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf script python: Generate hooks with additional argument</title>
<updated>2017-07-26T01:43:21Z</updated>
<author>
<name>Arun Kalyanasundaram</name>
<email>arunkaly@google.com</email>
</author>
<published>2017-07-21T22:04:22Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a641860550f05a4b8889dca61aab73c84b2d5e16'/>
<id>urn:sha1:a641860550f05a4b8889dca61aab73c84b2d5e16</id>
<content type='text'>
Modify the signature of tracepoint specific and trace_unhandled hooks to
add the perf_sample dict as a new argument.
Create a python helper function to print a dictionary.

Signed-off-by: Arun Kalyanasundaram &lt;arunkaly@google.com&gt;
Acked-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Cc: David Carrillo-Cisneros &lt;davidcc@google.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Seongjae Park &lt;sj38.park@gmail.com&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Link: http://lkml.kernel.org/r/20170721220422.63962-6-arunkaly@google.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf script python: Add perf_sample dict to tracepoint handlers</title>
<updated>2017-07-26T01:43:20Z</updated>
<author>
<name>Arun Kalyanasundaram</name>
<email>arunkaly@google.com</email>
</author>
<published>2017-07-21T22:04:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f38d281663b011d1d8a1b0119bb8357706d134a8'/>
<id>urn:sha1:f38d281663b011d1d8a1b0119bb8357706d134a8</id>
<content type='text'>
The process_event python hook receives a dict with all perf_sample
entries, but the tracepoint specific and trace_unhandled hooks predate
the introduction of this dict, and do not receive it.

Add the aforementioned dict as an additional argument to the affected
handlers. To keep backwards compatibility (and avoid unnecessary work),
do not pass the dict if the number of arguments signals that handler
version predates this change.

Signed-off-by: Arun Kalyanasundaram &lt;arunkaly@google.com&gt;
Acked-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Cc: David Carrillo-Cisneros &lt;davidcc@google.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Seongjae Park &lt;sj38.park@gmail.com&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Link: http://lkml.kernel.org/r/20170721220422.63962-5-arunkaly@google.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf script python: Add sample_read to dict</title>
<updated>2017-07-26T01:43:19Z</updated>
<author>
<name>Arun Kalyanasundaram</name>
<email>arunkaly@google.com</email>
</author>
<published>2017-07-21T22:04:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=74ec14f3893c3065053b91cec850cffa2d565e0a'/>
<id>urn:sha1:74ec14f3893c3065053b91cec850cffa2d565e0a</id>
<content type='text'>
Provide time_enabled, time_running and counter value in the perf_sample
dict.

Signed-off-by: Arun Kalyanasundaram &lt;arunkaly@google.com&gt;
Acked-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Cc: David Carrillo-Cisneros &lt;davidcc@google.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Seongjae Park &lt;sj38.park@gmail.com&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Link: http://lkml.kernel.org/r/20170721220422.63962-4-arunkaly@google.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf script python: Refactor creation of perf sample dict</title>
<updated>2017-07-26T01:43:19Z</updated>
<author>
<name>Arun Kalyanasundaram</name>
<email>arunkaly@google.com</email>
</author>
<published>2017-07-21T22:04:19Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=892e76b2e8c5e85e69514478e3319575a68b9770'/>
<id>urn:sha1:892e76b2e8c5e85e69514478e3319575a68b9770</id>
<content type='text'>
Move the creation of the dict containing perf_sample entries into a
helper function to enable its reuse in other sample processing routines.

Signed-off-by: Arun Kalyanasundaram &lt;arunkaly@google.com&gt;
Acked-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Cc: David Carrillo-Cisneros &lt;davidcc@google.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Seongjae Park &lt;sj38.park@gmail.com&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Link: http://lkml.kernel.org/r/20170721220422.63962-3-arunkaly@google.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf script python: Allocate memory only if handler exists</title>
<updated>2017-07-26T01:43:18Z</updated>
<author>
<name>Arun Kalyanasundaram</name>
<email>arunkaly@google.com</email>
</author>
<published>2017-07-21T22:04:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e9f9a9ca8588e58dc0800b44adc41d32f6fc813a'/>
<id>urn:sha1:e9f9a9ca8588e58dc0800b44adc41d32f6fc813a</id>
<content type='text'>
Avoid allocating memory if hook handler is not available. This saves
unused memory allocation and simplifies error path.

Let handler in python_process_tracepoint point to either tracepoint
specific or trace_unhandled hook. Use dict to check if handler points to
trace_unhandled.

Remove the exit label in python_process_general_event and return when no
handler is available.

Signed-off-by: Arun Kalyanasundaram &lt;arunkaly@google.com&gt;
Acked-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Cc: David Carrillo-Cisneros &lt;davidcc@google.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Seongjae Park &lt;sj38.park@gmail.com&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Link: http://lkml.kernel.org/r/20170721220422.63962-2-arunkaly@google.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools: Adopt __noreturn from kernel sources</title>
<updated>2017-06-19T18:14:58Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2017-06-16T14:39:15Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6c3466435b03fb84647f5ad413f98f2ccb12b5c2'/>
<id>urn:sha1:6c3466435b03fb84647f5ad413f98f2ccb12b5c2</id>
<content type='text'>
To have a more compact way to specify that a function doesn't return,
instead of the open coded:

	__attribute__((noreturn))

And use it instead of the tools/perf/ specific variation, NORETURN.

Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Wang Nan &lt;wangnan0@huawei.com&gt;
Link: http://lkml.kernel.org/n/tip-l0y144qzixcy5t4c6i7pdiqj@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf script: Fix outdated comment for perf-trace-python</title>
<updated>2017-06-07T23:23:22Z</updated>
<author>
<name>SeongJae Park</name>
<email>sj38.park@gmail.com</email>
</author>
<published>2017-05-30T11:18:23Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c76132dc5182776b98e946d674cb41c421661ea9'/>
<id>urn:sha1:c76132dc5182776b98e946d674cb41c421661ea9</id>
<content type='text'>
Script generated by the '--gen-script' option contains an outdated
comment. It mentions a 'perf-trace-python' document while it has been
renamed to 'perf-script-python'. Fix it.

Signed-off-by: SeongJae Park &lt;sj38.park@gmail.com&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Fixes: 133dc4c39c57 ("perf: Rename 'perf trace' to 'perf script'")
Link: http://lkml.kernel.org/r/20170530111827.21732-2-sj38.park@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools: Move HAS_BOOL define to where perl headers are used</title>
<updated>2017-04-26T18:27:52Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2017-04-26T18:27:52Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7de96c3e759e49b1d176722ed26c14c057bac34f'/>
<id>urn:sha1:7de96c3e759e49b1d176722ed26c14c057bac34f</id>
<content type='text'>
This is a perl specific hack, so move it from util.h to where perl
headers are used.

Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Wang Nan &lt;wangnan0@huawei.com&gt;
Link: http://lkml.kernel.org/n/tip-4igctbinuom2sr6g4b03jqht@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
</feed>
