<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/perf/builtin-script.c, branch v3.4.33</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/tools/perf/builtin-script.c?h=v3.4.33</id>
<link rel='self' href='https://git.amat.us/linux/atom/tools/perf/builtin-script.c?h=v3.4.33'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-01-30T20:13:07Z</updated>
<entry>
<title>perf script: Add option resolving vmlinux path</title>
<updated>2012-01-30T20:13:07Z</updated>
<author>
<name>Akihiro Nagai</name>
<email>akihiro.nagai.hw@hitachi.com</email>
</author>
<published>2012-01-30T04:43:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0bc8d20580af74c9a8a39c200e269261e5cded05'/>
<id>urn:sha1:0bc8d20580af74c9a8a39c200e269261e5cded05</id>
<content type='text'>
Add the option get the path of [kernel.kallsyms].
Specify '--show-kernel-path' option to use this function.
This patch enables other applications to use this output easily.

Without --show-kernel-path  option

ffffffff81467612 irq_return ([kernel.kallsyms])
ffffffff81467612 irq_return ([kernel.kallsyms])
    7f24fc02a6b3 _start (/lib64/ld-2.14.so)
[snip]

With --show-kernel-path option

ffffffff81467612 irq_return (/lib/modules/3.2.0+/build/vmlinux)
ffffffff81467612 irq_return (/lib/modules/3.2.0+/build/vmlinux)
    7f24fc02a6b3 _start (/lib64/ld-2.14.so)
[snip]

Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: yrl.pp-manager.tt@hitachi.com
Link: http://lkml.kernel.org/r/20120130044320.2384.73322.stgit@linux3
Signed-off-by: Akihiro Nagai &lt;akihiro.nagai.hw@hitachi.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf script: Add the offset field specifier</title>
<updated>2012-01-30T20:09:21Z</updated>
<author>
<name>Akihiro Nagai</name>
<email>akihiro.nagai.hw@hitachi.com</email>
</author>
<published>2012-01-30T04:43:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a978f2ab4166a84c77d0f846f59690f2a892d058'/>
<id>urn:sha1:a978f2ab4166a84c77d0f846f59690f2a892d058</id>
<content type='text'>
Add the offset field specifier 'symoff' to show the offset from
the symbols in the output of perf-script. We can get the more
detailed address information.

Output sample:
ffffffff81467612 irq_return+0x0 =&gt; 301ec016b0 _start+0x0
ffffffff81467612 irq_return+0x0 =&gt; 301ec016b0 _start+0x0
      301ec016b3 _start+0x3     =&gt; 301ec04b70 _dl_start+0x0
ffffffff81467612 irq_return+0x0 =&gt; 301ec04b70 _dl_start+0x0
ffffffff81467612 irq_return+0x0 =&gt; 301ec04b96 _dl_start+0x26
ffffffff81467612 irq_return+0x0 =&gt; 301ec04b9d _dl_start+0x2d
      301ec04beb _dl_start+0x7b =&gt; 301ec04c0d _dl_start+0x9d
      301ec04c11 _dl_start+0xa1 =&gt; 301ec04bf0 _dl_start+0x80
[snip]

Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: yrl.pp-manager.tt@hitachi.com
Link: http://lkml.kernel.org/r/20120130044314.2384.67094.stgit@linux3
Signed-off-by: Akihiro Nagai &lt;akihiro.nagai.hw@hitachi.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf script: Print branch_from and branch_to of BTS events</title>
<updated>2012-01-30T20:08:43Z</updated>
<author>
<name>Akihiro Nagai</name>
<email>akihiro.nagai.hw@hitachi.com</email>
</author>
<published>2012-01-30T04:43:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9558259697b827106b464648e850e568e0b0c931'/>
<id>urn:sha1:9558259697b827106b464648e850e568e0b0c931</id>
<content type='text'>
BTS records branch_from_addr and branch_to_addr in IP and ADDR field in perf_sample.
This patch enables to print them in following format,

&lt;from_addr&gt; &lt;from_symbol&gt; (&lt;from_dso&gt;) =&gt; &lt;to_addr&gt; &lt;to_symbol&gt; (&lt;to_dso&gt;)

Sample:
 ffffffff814675d2 irq_return ([kernel.kallsyms]) =&gt; 3f03e016b0    _start (/lib64/ld-2.14.so)
 ffffffff814675d2 irq_return ([kernel.kallsyms]) =&gt; 3f03e016b0    _start (/lib64/ld-2.14.so)
       3f03e016b3     _start (/lib64/ld-2.14.so) =&gt; 3f03e04b80 _dl_start (/lib64/ld-2.14.so)
 ffffffff814675d2 irq_return ([kernel.kallsyms]) =&gt; 3f03e04b80 _dl_start (/lib64/ld-2.14.so)
 ffffffff814675d2 irq_return ([kernel.kallsyms]) =&gt; 3f03e04ba6 _dl_start (/lib64/ld-2.14.so)
 ffffffff814675d2 irq_return ([kernel.kallsyms]) =&gt; 3f03e04bad _dl_start (/lib64/ld-2.14.so)
       3f03e04bfb  _dl_start (/lib64/ld-2.14.so) =&gt; 3f03e04c1d _dl_start (/lib64/ld-2.14.so)
[snip]

Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: yrl.pp-manager.tt@hitachi.com
Link: http://lkml.kernel.org/r/20120130044309.2384.44252.stgit@linux3
Signed-off-by: Akihiro Nagai &lt;akihiro.nagai.hw@hitachi.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf script: Unify the expressions indicating "unknown"</title>
<updated>2012-01-30T19:57:57Z</updated>
<author>
<name>Akihiro Nagai</name>
<email>akihiro.nagai.hw@hitachi.com</email>
</author>
<published>2012-01-30T04:42:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=547a92e0aedb88129e7fbd804697a11949de2e5a'/>
<id>urn:sha1:547a92e0aedb88129e7fbd804697a11949de2e5a</id>
<content type='text'>
The perf script command uses various expressions to indicate "unknown".

It is unfriendly for user scripts to parse it. So, this patch unifies
the expressions to "[unknown]".

Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: yrl.pp-manager.tt@hitachi.com
Link: http://lkml.kernel.org/r/20120130044257.2384.62905.stgit@linux3
Signed-off-by: Akihiro Nagai &lt;akihiro.nagai.hw@hitachi.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf script: Add missing closedir() calls</title>
<updated>2012-01-08T14:35:41Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@gmail.com</email>
</author>
<published>2012-01-07T17:25:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=946ef2a24523e59e5cf931068ab7e9443c63c9df'/>
<id>urn:sha1:946ef2a24523e59e5cf931068ab7e9443c63c9df</id>
<content type='text'>
The get_script_path() calls opendir() but misses corresponding
closedir()'s. Add them.

Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1325957132-10600-1-git-send-email-namhyung@gmail.com
Signed-off-by: Namhyung Kim &lt;namhyung@gmail.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf script: Kill script_spec__delete</title>
<updated>2012-01-03T17:06:34Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@gmail.com</email>
</author>
<published>2011-12-27T15:35:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=466e2876bcb9ddc9b92502c46689679bee7d72a0'/>
<id>urn:sha1:466e2876bcb9ddc9b92502c46689679bee7d72a0</id>
<content type='text'>
As script_spec__delete() frees given struct script_spec it should not be
called if we failed to allocate the struct. Also it's the only caller of
the function, we can get rid of the function itself.

Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/1325000151-4463-4-git-send-email-namhyung@gmail.com
Signed-off-by: Namhyung Kim &lt;namhyung@gmail.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf report: Accept fifos as input file</title>
<updated>2011-12-23T19:01:03Z</updated>
<author>
<name>Robert Richter</name>
<email>robert.richter@amd.com</email>
</author>
<published>2011-12-07T09:02:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=efad14150a0b4429f37da7245001a8096ef7ee38'/>
<id>urn:sha1:efad14150a0b4429f37da7245001a8096ef7ee38</id>
<content type='text'>
The default input file for perf report is not handled the same way as
perf record does it for its output file. This leads to unexpected
behavior of perf report, etc. E.g.:

 # perf record -a -e cpu-cycles sleep 2 | perf report | cat
 failed to open perf.data: No such file or directory  (try 'perf record' first)

While perf record writes to a fifo, perf report expects perf.data to be
read. This patch changes this to accept fifos as input file.

Applies to the following commands:

 perf annotate
 perf buildid-list
 perf evlist
 perf kmem
 perf lock
 perf report
 perf sched
 perf script
 perf timechart

Also fixes char const* -&gt; const char* type declaration for filename
strings.

v2:
* Prevent potential null pointer access to input_name in
  builtin-report.c. Needed due to removal of patch "perf report: Setup
  browser if stdout is a pipe"

Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Link: http://lkml.kernel.org/r/1323248577-11268-5-git-send-email-robert.richter@amd.com
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf script: look up thread using tid instead of pid</title>
<updated>2011-12-23T18:35:00Z</updated>
<author>
<name>David Ahern</name>
<email>dsahern@gmail.com</email>
</author>
<published>2011-12-22T18:30:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=64aab93cdffb3967642ffab954395ae2400c0b06'/>
<id>urn:sha1:64aab93cdffb3967642ffab954395ae2400c0b06</id>
<content type='text'>
This allows the thread name to be dispalyed when dumping
events:
           myapp 25118 [000] 450385.538815: context-switches ...
    myapp:worker 25119 [000] 450385.538894: context-switches ...

Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: http://lkml.kernel.org/r/1324578603-12762-4-git-send-email-dsahern@gmail.com
Signed-off-by: David Ahern &lt;dsahern@gmail.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf script: Implement option for system-wide profiling</title>
<updated>2011-12-12T10:44:00Z</updated>
<author>
<name>Robert Richter</name>
<email>robert.richter@amd.com</email>
</author>
<published>2011-11-25T14:05:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=317df650c588bb9091b1fa0b5d726fe485aad88e'/>
<id>urn:sha1:317df650c588bb9091b1fa0b5d726fe485aad88e</id>
<content type='text'>
The option is documented in man perf-script but was not yet implemented:

       -a
           Force system-wide collection. Scripts run without a
           &lt;command&gt; normally use -a by default, while scripts run
           with a &lt;command&gt; normally don't - this option allows the
           latter to be run in system-wide mode.

As with perf record you now can profile in system-wide mode for the
runtime of a given command, e.g.:

 # perf script -a syscall-counts sleep 2

Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Link: http://lkml.kernel.org/r/1322229925-10075-1-git-send-email-robert.richter@amd.com
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf script: Fix mem leaks and NULL pointer checks around strdup()s</title>
<updated>2011-12-12T10:44:00Z</updated>
<author>
<name>Robert Richter</name>
<email>robert.richter@amd.com</email>
</author>
<published>2011-11-25T10:38:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=38efb539c13f8f173e381435cdd40463ab5d38de'/>
<id>urn:sha1:38efb539c13f8f173e381435cdd40463ab5d38de</id>
<content type='text'>
Fix mem leaks and missing NULL pointer checks after strdup().

And get_script_path() did not free __script_root in case of continue.

Introduce a helper function get_script_root().

Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Link: http://lkml.kernel.org/r/1322217520-3287-1-git-send-email-robert.richter@amd.com
Signed-off-by: Robert Richter &lt;robert.richter@amd.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
</feed>
