<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/perf/util, branch v3.15.2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/tools/perf/util?h=v3.15.2</id>
<link rel='self' href='https://git.amat.us/linux/atom/tools/perf/util?h=v3.15.2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-06-04T12:49:20Z</updated>
<entry>
<title>perf probe: Fix perf probe to find correct variable DIE</title>
<updated>2014-06-04T12:49:20Z</updated>
<author>
<name>Masami Hiramatsu</name>
<email>masami.hiramatsu.pt@hitachi.com</email>
</author>
<published>2014-05-29T12:19:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=082f96a93eb5ba9bf771518a0dda590624568e8e'/>
<id>urn:sha1:082f96a93eb5ba9bf771518a0dda590624568e8e</id>
<content type='text'>
Fix perf probe to find correct variable DIE which has location or
external instance by tracking down the lexical blocks.

Current die_find_variable() expects that the all variable DIEs
which has DW_TAG_variable have a location. However, since recent
dwarf information may have declaration variable DIEs at the
entry of function (subprogram), die_find_variable() returns it.

To solve this problem, it must track down the DIE tree to find
a DIE which has an actual location or a reference for external
instance.

e.g. finding a DIE which origin is &lt;0xdc73&gt;;

 &lt;1&gt;&lt;11496&gt;: Abbrev Number: 95 (DW_TAG_subprogram)
    &lt;11497&gt;   DW_AT_abstract_origin: &lt;0xdc42&gt;
    &lt;1149b&gt;   DW_AT_low_pc      : 0x1850
[...]
 &lt;2&gt;&lt;114cc&gt;: Abbrev Number: 119 (DW_TAG_variable) &lt;- this is a declaration
    &lt;114cd&gt;   DW_AT_abstract_origin: &lt;0xdc73&gt;
 &lt;2&gt;&lt;114d1&gt;: Abbrev Number: 119 (DW_TAG_variable)
[...]
 &lt;3&gt;&lt;115a7&gt;: Abbrev Number: 105 (DW_TAG_lexical_block)
    &lt;115a8&gt;   DW_AT_ranges      : 0xaa0
 &lt;4&gt;&lt;115ac&gt;: Abbrev Number: 96 (DW_TAG_variable) &lt;- this has a location
    &lt;115ad&gt;   DW_AT_abstract_origin: &lt;0xdc73&gt;
    &lt;115b1&gt;   DW_AT_location    : 0x486c        (location list)

Signed-off-by: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Tested-by: Arnaldo Carvalho de Melo &lt;acme@kernel.org&gt;
Acked-by: Arnaldo Carvalho de Melo &lt;acme@kernel.org&gt;
Cc: Arnaldo Carvalho de Melo &lt;acme@kernel.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Link: http://lkml.kernel.org/r/20140529121930.30879.87092.stgit@ltc230.yrl.intra.hitachi.co.jp
Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf probe: Fix a segfault if asked for variable it doesn't find</title>
<updated>2014-06-04T12:48:03Z</updated>
<author>
<name>Masami Hiramatsu</name>
<email>masami.hiramatsu.pt@hitachi.com</email>
</author>
<published>2014-05-29T10:52:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0c188a07b6a399e3df66534c29fef0a2082aaf57'/>
<id>urn:sha1:0c188a07b6a399e3df66534c29fef0a2082aaf57</id>
<content type='text'>
Fix a segfault bug by asking for variable it doesn't find.
Since the convert_variable() didn't handle error code returned
from convert_variable_location(), it just passed an incomplete
variable field and then a segfault was occurred when formatting
the field.

This fixes that bug by handling success code correctly in
convert_variable(). Other callers of convert_variable_location()
are correctly checking the return code.

This bug was introduced by following commit. But another hidden
erroneous error handling has been there previously (-ENOMEM case).

 commit 3d918a12a1b3088ac16ff37fa52760639d6e2403

Signed-off-by: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Reported-by: Arnaldo Carvalho de Melo &lt;acme@kernel.org&gt;
Tested-by: Arnaldo Carvalho de Melo &lt;acme@kernel.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Link: http://lkml.kernel.org/r/20140529105232.28251.30447.stgit@ltc230.yrl.intra.hitachi.co.jp
Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf machine: Search for modules in %s/lib/modules/%s</title>
<updated>2014-04-30T14:49:29Z</updated>
<author>
<name>Richard Yao</name>
<email>ryao@gentoo.org</email>
</author>
<published>2014-04-26T17:17:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=61d4290cc1f10588147b76b385875f06827d47ff'/>
<id>urn:sha1:61d4290cc1f10588147b76b385875f06827d47ff</id>
<content type='text'>
Modules installed outside of the kernel's build system should go into
"%s/lib/modules/%s/extra", but at present, perf will only look at them
when they are in "%s/lib/modules/%s/kernel". Lets encourage good
citizenship by relaxing this requirement to "%s/lib/modules/%s". This
way open source modules that are out-of-tree have no incentive to start
populating a directory reserved for in-kernel modules and I can stop
hex-editing my system's perf binary when profiling OSS out-of-tree
modules.

Feedback from Namhyung Kim correctly revealed that the hex-edits that I
had been doing meant that perf was also traversing the build and source
symlinks in %s/lib/modules/%s. That is undesireable, so we explicitly
exclude them from traversal with a minor tweak to the traversal routine.

Signed-off-by: Richard Yao &lt;ryao@gentoo.org&gt;
Acked-by: Namhyung kim &lt;namhyung@kernel.org&gt;
Link: http://lkml.kernel.org/r/1398532675-13684-1-git-send-email-ryao@gentoo.org
Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf tools: Improve error reporting</title>
<updated>2014-04-19T22:15:12Z</updated>
<author>
<name>Adrien BAK</name>
<email>adrien.bak@metascale.org</email>
</author>
<published>2014-04-18T02:00:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ffa91880a992ec1aaee4b4f7c9ddffda0c277ba9'/>
<id>urn:sha1:ffa91880a992ec1aaee4b4f7c9ddffda0c277ba9</id>
<content type='text'>
In the current version, when using perf record, if something goes
wrong in tools/perf/builtin-record.c:375
  session = perf_session__new(file, false, NULL);

The error message:
"Not enough memory for reading per file header"

is issued. This error message seems to be outdated and is not very
helpful. This patch proposes to replace this error message by
"Perf session creation failed"

I believe this issue has been brought to lkml:
https://lkml.org/lkml/2014/2/24/458
although this patch only tackles a (small) part of the issue.

Additionnaly, this patch improves error reporting in
tools/perf/util/data.c open_file_write.

Currently, if the call to open fails, the user is unaware of it.
This patch logs the error, before returning the error code to
the caller.

Reported-by: Will Deacon &lt;will.deacon@arm.com&gt;
Signed-off-by: Adrien BAK &lt;adrien.bak@metascale.org&gt;
Link: http://lkml.kernel.org/r/1397786443.3093.4.camel@beast
[ Reorganize the changelog into paragraphs ]
[ Added empty line after fd declaration in open_file_write ]
Signed-off-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools: Adjust symbols in VDSO</title>
<updated>2014-04-19T22:15:11Z</updated>
<author>
<name>Vladimir Nikulichev</name>
<email>nvs@tbricks.com</email>
</author>
<published>2014-04-17T15:27:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=922d0e4d9f042f68baea28e5b3bd7bb708875f2e'/>
<id>urn:sha1:922d0e4d9f042f68baea28e5b3bd7bb708875f2e</id>
<content type='text'>
pert-report doesn't resolve function names in VDSO:

$ perf report --stdio -g flat,0.0,15,callee --sort pid
...
            8.76%
               0x7fff6b1fe861
               __gettimeofday
               ACE_OS::gettimeofday()
...

In this case symbol values should be adjusted the same way as for executables,
relocatable objects and prelinked libraries.

After fix:

$ perf report --stdio -g flat,0.0,15,callee --sort pid
...
            8.76%
               __vdso_gettimeofday
               __gettimeofday
               ACE_OS::gettimeofday()

Signed-off-by: Vladimir Nikulichev &lt;nvs@tbricks.com&gt;
Tested-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Reviewed-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Link: http://lkml.kernel.org/r/969812.163009436-sendEmail@nvs
Signed-off-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf probe: Use dwarf_getcfi_elf() instead of dwarf_getcfi()</title>
<updated>2014-04-14T10:55:40Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@kernel.org</email>
</author>
<published>2014-04-07T07:05:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=03d89412981a7681971bc77edba1669595763030'/>
<id>urn:sha1:03d89412981a7681971bc77edba1669595763030</id>
<content type='text'>
The dwarf_getcfi() only checks .debug_frame section for CFI, but as
most binaries only have .eh_frame it'd return NULL and it makes
some variables inaccessible.

Using dwarf_getcfi_elf (along with dwarf_getelf()) allows to show and
add probe to more variables.

Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Acked-by: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Cc: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Link: http://lkml.kernel.org/r/1396854348-9296-1-git-send-email-namhyung@kernel.org
Signed-off-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf probe: Fix to handle errors in line_range searching</title>
<updated>2014-04-14T10:55:39Z</updated>
<author>
<name>Masami Hiramatsu</name>
<email>masami.hiramatsu.pt@hitachi.com</email>
</author>
<published>2014-04-02T05:48:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=182c228ebcf1ac67a44e62236d8f7a8a9a3c5699'/>
<id>urn:sha1:182c228ebcf1ac67a44e62236d8f7a8a9a3c5699</id>
<content type='text'>
As Namhyung reported(https://lkml.org/lkml/2014/4/1/89),
current perf-probe -L option doesn't handle errors in line-range
searching correctly. It causes a SEGV if an error occured in the
line-range searching.

  ----
  $ perf probe -x ./perf -v -L map__load
  Open Debuginfo file: /home/namhyung/project/linux/tools/perf/perf
  fname: util/map.c, lineno:153
  New line range: 153 to 2147483647
  path: (null)
  Segmentation fault (core dumped)
  ----

This is because line_range_inline_cb() ignores errors
from find_line_range_by_line() which means that lr-&gt;path is
already freed on the error path in find_line_range_by_line().
As a result, get_real_path() accesses the lr-&gt;path and it
causes a NULL pointer exception.

This fixes line_range_inline_cb() to handle the error correctly,
and report it to the caller.

Anyway, this just fixes a possible SEGV bug, Namhyung's patch
is also required.

Reported-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Signed-off-by: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Arnaldo Carvalho de Melo &lt;acme@kernel.org&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung.kim@lge.com&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/20140402054831.19080.27006.stgit@ltc230.yrl.intra.hitachi.co.jp
Signed-off-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf probe: Fix --line option behavior</title>
<updated>2014-04-14T10:55:39Z</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@kernel.org</email>
</author>
<published>2014-04-01T04:47:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=202c7c123c96a1c193149b7fa2718d7fb143efb2'/>
<id>urn:sha1:202c7c123c96a1c193149b7fa2718d7fb143efb2</id>
<content type='text'>
The commit 5a62257a3ddd1 ("perf probe: Replace line_list with
intlist") replaced line_list to intlist but it has a problem that if a
same line was added again, it'd return -EEXIST rather than 1.

Since line_range_walk_cb() only checks the result being negative, it
resulted in failure or segfault sometimes.

Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Acked-by: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Cc: Masami Hiramatsu &lt;masami.hiramatsu.pt@hitachi.com&gt;
Link: http://lkml.kernel.org/r/1396327677-3657-1-git-send-email-namhyung@kernel.org
Signed-off-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools: Remove unused simple_strtoul() function</title>
<updated>2014-03-18T21:17:07Z</updated>
<author>
<name>Ramkumar Ramachandra</name>
<email>artagnon@gmail.com</email>
</author>
<published>2014-03-18T21:05:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a51e87cb5a0fbebee15a3373d951dbf6f59a76c2'/>
<id>urn:sha1:a51e87cb5a0fbebee15a3373d951dbf6f59a76c2</id>
<content type='text'>
Moreover, the corresponding function in include/linux/kernel.h is marked
obsolete.

Signed-off-by: Ramkumar Ramachandra &lt;artagnon@gmail.com&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Link: http://lkml.kernel.org/r/1395176715-4465-1-git-send-email-artagnon@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf evsel: Update function names in debug messages</title>
<updated>2014-03-18T21:17:05Z</updated>
<author>
<name>Ramkumar Ramachandra</name>
<email>artagnon@gmail.com</email>
</author>
<published>2014-03-18T19:10:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a33f6efc43cb71795bbdaf0251544ff3edbfdb2f'/>
<id>urn:sha1:a33f6efc43cb71795bbdaf0251544ff3edbfdb2f</id>
<content type='text'>
perf_event_open() was renamed to sys_perf_event_open(); update the debug
messages to reflect this.

Signed-off-by: Ramkumar Ramachandra &lt;artagnon@gmail.com&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Link: http://lkml.kernel.org/r/1395169842-1399-1-git-send-email-artagnon@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
</feed>
