<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/tools/perf/util/symbol.c, branch v4.9.14</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>perf diff: Do not overwrite valid build id</title>
<updated>2017-01-26T07:24:36+00:00</updated>
<author>
<name>Kan Liang</name>
<email>kan.liang@intel.com</email>
</author>
<published>2016-12-13T15:29:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a1d308914090d689973af1b4cb8d0141a91d7a46'/>
<id>a1d308914090d689973af1b4cb8d0141a91d7a46</id>
<content type='text'>
commit ed6c166cc7dc329736cace3affd2df984fb22ec8 upstream.

Fixes a perf diff regression issue which was introduced by commit
5baecbcd9c9a ("perf symbols: we can now read separate debug-info files
based on a build ID")

The binary name could be same when perf diff different binaries. Build
id is used to distinguish between them.
However, the previous patch assumes the same binary name has same build
id. So it overwrites the build id according to the binary name,
regardless of whether the build id is set or not.

Check the has_build_id in dso__load. If the build id is already set, use
it.

Before the fix:

  $ perf diff 1.perf.data 2.perf.data
  # Event 'cycles'
  #
  # Baseline    Delta  Shared Object     Symbol
  # ........  .......  ................  .............................
  #
    99.83%  -99.80%  tchain_edit       [.] f2
     0.12%  +99.81%  tchain_edit       [.] f3
     0.02%   -0.01%  [ixgbe]           [k] ixgbe_read_reg

  After the fix:
  $ perf diff 1.perf.data 2.perf.data
  # Event 'cycles'
  #
  # Baseline    Delta  Shared Object     Symbol
  # ........  .......  ................  .............................
  #
    99.83%   +0.10%  tchain_edit       [.] f3
     0.12%   -0.08%  tchain_edit       [.] f2

Signed-off-by: Kan Liang &lt;kan.liang@intel.com&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
CC: Dima Kogan &lt;dima@secretsauce.net&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Fixes: 5baecbcd9c9a ("perf symbols: we can now read separate debug-info files based on a build ID")
Link: http://lkml.kernel.org/r/1481642984-13593-1-git-send-email-kan.liang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit ed6c166cc7dc329736cace3affd2df984fb22ec8 upstream.

Fixes a perf diff regression issue which was introduced by commit
5baecbcd9c9a ("perf symbols: we can now read separate debug-info files
based on a build ID")

The binary name could be same when perf diff different binaries. Build
id is used to distinguish between them.
However, the previous patch assumes the same binary name has same build
id. So it overwrites the build id according to the binary name,
regardless of whether the build id is set or not.

Check the has_build_id in dso__load. If the build id is already set, use
it.

Before the fix:

  $ perf diff 1.perf.data 2.perf.data
  # Event 'cycles'
  #
  # Baseline    Delta  Shared Object     Symbol
  # ........  .......  ................  .............................
  #
    99.83%  -99.80%  tchain_edit       [.] f2
     0.12%  +99.81%  tchain_edit       [.] f3
     0.02%   -0.01%  [ixgbe]           [k] ixgbe_read_reg

  After the fix:
  $ perf diff 1.perf.data 2.perf.data
  # Event 'cycles'
  #
  # Baseline    Delta  Shared Object     Symbol
  # ........  .......  ................  .............................
  #
    99.83%   +0.10%  tchain_edit       [.] f3
     0.12%   -0.08%  tchain_edit       [.] f2

Signed-off-by: Kan Liang &lt;kan.liang@intel.com&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
CC: Dima Kogan &lt;dima@secretsauce.net&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Fixes: 5baecbcd9c9a ("perf symbols: we can now read separate debug-info files based on a build ID")
Link: http://lkml.kernel.org/r/1481642984-13593-1-git-send-email-kan.liang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>perf symbols: Add dso__last_symbol()</title>
<updated>2016-09-29T14:17:01+00:00</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2016-09-23T14:38:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cd67f99fe90dcf515f1c70c474b84d56b6236cbb'/>
<id>cd67f99fe90dcf515f1c70c474b84d56b6236cbb</id>
<content type='text'>
Add a function to find the last symbol in a DSO. This will be used when
parsing address filters to calculate a region that includes the entire
DSO.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Cc: Mathieu Poirier &lt;mathieu.poirier@linaro.org&gt;
Link: http://lkml.kernel.org/r/1474641528-18776-7-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a function to find the last symbol in a DSO. This will be used when
parsing address filters to calculate a region that includes the entire
DSO.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Cc: Mathieu Poirier &lt;mathieu.poirier@linaro.org&gt;
Link: http://lkml.kernel.org/r/1474641528-18776-7-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>perf symbols: Remove symbol_filter_t machinery</title>
<updated>2016-09-05T14:14:50+00:00</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2016-09-01T22:25:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=be39db9f2932f0ce4e116c71ba5ae2b542e536a7'/>
<id>be39db9f2932f0ce4e116c71ba5ae2b542e536a7</id>
<content type='text'>
We're not using it anymore, few users were, but we really could do
without it, simplify lots of functions by removing it.

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: Masami Hiramatsu &lt;mhiramat@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-1zng8wdznn00iiz08bb7q3vn@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We're not using it anymore, few users were, but we really could do
without it, simplify lots of functions by removing it.

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: Masami Hiramatsu &lt;mhiramat@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-1zng8wdznn00iiz08bb7q3vn@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>perf symbols: Mark if a symbol is idle in the library</title>
<updated>2016-09-05T14:14:50+00:00</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2016-09-01T20:54:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=608c34de0b3d7bd15340a95ef758b4d8b81ebfc6'/>
<id>608c34de0b3d7bd15340a95ef758b4d8b81ebfc6</id>
<content type='text'>
This was being done just in 'perf top', but grouping idle symbols should
be useful in other places as well, so remove one more symbol_filter_t
user by moving this to the symbol library.

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: Masami Hiramatsu &lt;mhiramat@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-5r7xitjkzjr9jak1zy3d8u5l@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was being done just in 'perf top', but grouping idle symbols should
be useful in other places as well, so remove one more symbol_filter_t
user by moving this to the symbol library.

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: Masami Hiramatsu &lt;mhiramat@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-5r7xitjkzjr9jak1zy3d8u5l@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>perf symbols: Fixup symbol sizes before picking best ones</title>
<updated>2016-09-01T15:42:24+00:00</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2016-09-01T14:00:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=432746f8e0b6a82ba832b771afe31abd51af6752'/>
<id>432746f8e0b6a82ba832b771afe31abd51af6752</id>
<content type='text'>
When we call symbol__fixup_duplicate() we use algorithms to pick the
"best" symbols for cases where there are various functions/aliases to an
address, and those check zero size symbols, which, before calling
symbol__fixup_end() are _all_ symbols in a just parsed kallsyms file.

So first fixup the end, then fixup the duplicates.

Found while trying to figure out why 'perf test vmlinux' failed, see the
output of 'perf test -v vmlinux' to see cases where the symbols picked
as best for vmlinux don't match the ones picked for kallsyms.

Cc: Anton Blanchard &lt;anton@samba.org&gt;
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: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Wang Nan &lt;wangnan0@huawei.com&gt;
Fixes: 694bf407b061 ("perf symbols: Add some heuristics for choosing the best duplicate symbol")
Link: http://lkml.kernel.org/n/tip-rxqvdgr0mqjdxee0kf8i2ufn@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When we call symbol__fixup_duplicate() we use algorithms to pick the
"best" symbols for cases where there are various functions/aliases to an
address, and those check zero size symbols, which, before calling
symbol__fixup_end() are _all_ symbols in a just parsed kallsyms file.

So first fixup the end, then fixup the duplicates.

Found while trying to figure out why 'perf test vmlinux' failed, see the
output of 'perf test -v vmlinux' to see cases where the symbols picked
as best for vmlinux don't match the ones picked for kallsyms.

Cc: Anton Blanchard &lt;anton@samba.org&gt;
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: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Wang Nan &lt;wangnan0@huawei.com&gt;
Fixes: 694bf407b061 ("perf symbols: Add some heuristics for choosing the best duplicate symbol")
Link: http://lkml.kernel.org/n/tip-rxqvdgr0mqjdxee0kf8i2ufn@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>perf symbols: Check symbol_conf.allow_aliases for kallsyms loading too</title>
<updated>2016-09-01T15:42:24+00:00</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2016-09-01T13:56:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c97b40e4d15f13a36cd037d598e45cbe9e1e5757'/>
<id>c97b40e4d15f13a36cd037d598e45cbe9e1e5757</id>
<content type='text'>
We can allow aliases to be kept, but we were checking this just when
loading vmlinux files, be consistent, do it for any symbol table loading
code that calls symbol__fixup_duplicate() by making this function check
.allow_aliases instead.

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: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Wang Nan &lt;wangnan0@huawei.com&gt;
Fixes: 680d926a8cb0 ("perf symbols: Allow symbol alias when loading map for symbol name")
Link: http://lkml.kernel.org/n/tip-z0avp0s6cfjckc4xj3pdfjdz@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can allow aliases to be kept, but we were checking this just when
loading vmlinux files, be consistent, do it for any symbol table loading
code that calls symbol__fixup_duplicate() by making this function check
.allow_aliases instead.

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: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Wang Nan &lt;wangnan0@huawei.com&gt;
Fixes: 680d926a8cb0 ("perf symbols: Allow symbol alias when loading map for symbol name")
Link: http://lkml.kernel.org/n/tip-z0avp0s6cfjckc4xj3pdfjdz@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>perf annotate: Initialize the priv are in symbol__new()</title>
<updated>2016-08-30T13:56:34+00:00</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2016-08-25T19:09:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b01141f4f59ce56e5ed177a1fc70b3ba4d676aca'/>
<id>b01141f4f59ce56e5ed177a1fc70b3ba4d676aca</id>
<content type='text'>
We need to initializa some fields (right now just a mutex) when we
allocate the per symbol annotation struct, so do it at the symbol
constructor instead of (ab)using the filter mechanism for that.

This way we remove one of the few cases we have for that symbol filter,
which will eventually led to removing it.

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-cvz34avlz1lez888lob95390@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We need to initializa some fields (right now just a mutex) when we
allocate the per symbol annotation struct, so do it at the symbol
constructor instead of (ab)using the filter mechanism for that.

This way we remove one of the few cases we have for that symbol filter,
which will eventually led to removing it.

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-cvz34avlz1lez888lob95390@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>perf symbols: Use proper dso name for is_regular_file</title>
<updated>2016-06-28T13:54:54+00:00</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@redhat.com</email>
</author>
<published>2016-06-24T12:40:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ed7b630b310775f3b6c0b360ede7a12cd8dff6fe'/>
<id>ed7b630b310775f3b6c0b360ede7a12cd8dff6fe</id>
<content type='text'>
Marc reported use of uninitialized memory:

&gt; In commit "403567217d3f perf symbols: Do not read symbols/data from
&gt; device files" a check to uninitialzied memory was added. This leads to
&gt; the following valgrind output:
&gt;
&gt;  ==24515== Syscall param stat(file_name) points to uninitialised byte(s)
&gt;  ==24515==    at 0x75B26D5: _xstat (in /lib/x86_64-linux-gnu/libc-2.22.so)
&gt;  ==24515==    by 0x4E548D: stat (stat.h:454)
&gt;  ==24515==    by 0x4E548D: is_regular_file (util.c:687)
&gt;  ==24515==    by 0x4A5BEE: dso__load (symbol.c:1435)
&gt;  ==24515==    by 0x4BB1AE: map__load (map.c:289)
&gt;  ==24515==    by 0x4BB1AE: map__find_symbol (map.c:333)
&gt;  ==24515==    by 0x4835B3: thread__find_addr_location (event.c:1300)
&gt;  ==24515==    by 0x4B5342: add_callchain_ip (machine.c:1652)
&gt;  ==24515==    by 0x4B5342: thread__resolve_callchain_sample (machine.c:1906)
&gt;  ==24515==    by 0x4B9E7D: thread__resolve_callchain (machine.c:1958)
&gt;  ==24515==    by 0x441B3E: process_event (builtin-script.c:795)
&gt;  ==24515==    by 0x441B3E: process_sample_event (builtin-script.c:920)
&gt;  ==24515==    by 0x4BEE29: perf_evlist__deliver_sample (session.c:1192)
&gt;  ==24515==    by 0x4BEE29: machines__deliver_event (session.c:1229)
&gt;  ==24515==    by 0x4BF770: perf_session__deliver_event (session.c:1286)
&gt;  ==24515==    by 0x4BF770: ordered_events__deliver_event (session.c:114)
&gt;  ==24515==    by 0x4C1D17: __ordered_events__flush (ordered-events.c:207)
&gt;  ==24515==    by 0x4C1D17: ordered_events__flush.part.3 (ordered-events.c:274)
&gt;  ==24515==    by 0x4BF44C: perf_session__process_user_event (session.c:1325)
&gt;  ==24515==    by 0x4BF44C: perf_session__process_event (session.c:1451)
&gt;  ==24515==  Address 0x807c6a0 is 0 bytes inside a block of size 4,096 alloc'd
&gt;  ==24515==    at 0x4C29C0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
&gt;  ==24515==    by 0x4A5BCB: dso__load (symbol.c:1421)
&gt;  ==24515==    by 0x4BB1AE: map__load (map.c:289)
&gt;  ==24515==    by 0x4BB1AE: map__find_symbol (map.c:333)
&gt;  ==24515==    by 0x4835B3: thread__find_addr_location (event.c:1300)
&gt;  ==24515==    by 0x4B5342: add_callchain_ip (machine.c:1652)
&gt;  ==24515==    by 0x4B5342: thread__resolve_callchain_sample (machine.c:1906)
&gt;  ==24515==    by 0x4B9E7D: thread__resolve_callchain (machine.c:1958)
&gt;  ==24515==    by 0x441B3E: process_event (builtin-script.c:795)
&gt;  ==24515==    by 0x441B3E: process_sample_event (builtin-script.c:920)
&gt;  ==24515==    by 0x4BEE29: perf_evlist__deliver_sample (session.c:1192)
&gt;  ==24515==    by 0x4BEE29: machines__deliver_event (session.c:1229)
&gt;  ==24515==    by 0x4BF770: perf_session__deliver_event (session.c:1286)
&gt;  ==24515==    by 0x4BF770: ordered_events__deliver_event (session.c:114)
&gt;  ==24515==    by 0x4C1D17: __ordered_events__flush (ordered-events.c:207)
&gt;  ==24515==    by 0x4C1D17: ordered_events__flush.part.3 (ordered-events.c:274)
&gt;  ==24515==    by 0x4BF44C: perf_session__process_user_event (session.c:1325)
&gt;  ==24515==    by 0x4BF44C: perf_session__process_event (session.c:1451)
&gt;  ==24515==    by 0x4C0EAC: __perf_session__process_events (session.c:1804)
&gt;  ==24515==    by 0x4C0EAC: perf_session__process_events (session.c:1858)

The reason was a typo that passed global 'name' variable as the
is_regular_file argument instead dso-&gt;long_name.

Reported-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Acked-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Wang Nan &lt;wangnan0@huawei.com&gt;
Fixes: 403567217d3f ("perf symbols: Do not read symbols/data from device files")
Link: http://lkml.kernel.org/r/1466772025-17471-2-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Marc reported use of uninitialized memory:

&gt; In commit "403567217d3f perf symbols: Do not read symbols/data from
&gt; device files" a check to uninitialzied memory was added. This leads to
&gt; the following valgrind output:
&gt;
&gt;  ==24515== Syscall param stat(file_name) points to uninitialised byte(s)
&gt;  ==24515==    at 0x75B26D5: _xstat (in /lib/x86_64-linux-gnu/libc-2.22.so)
&gt;  ==24515==    by 0x4E548D: stat (stat.h:454)
&gt;  ==24515==    by 0x4E548D: is_regular_file (util.c:687)
&gt;  ==24515==    by 0x4A5BEE: dso__load (symbol.c:1435)
&gt;  ==24515==    by 0x4BB1AE: map__load (map.c:289)
&gt;  ==24515==    by 0x4BB1AE: map__find_symbol (map.c:333)
&gt;  ==24515==    by 0x4835B3: thread__find_addr_location (event.c:1300)
&gt;  ==24515==    by 0x4B5342: add_callchain_ip (machine.c:1652)
&gt;  ==24515==    by 0x4B5342: thread__resolve_callchain_sample (machine.c:1906)
&gt;  ==24515==    by 0x4B9E7D: thread__resolve_callchain (machine.c:1958)
&gt;  ==24515==    by 0x441B3E: process_event (builtin-script.c:795)
&gt;  ==24515==    by 0x441B3E: process_sample_event (builtin-script.c:920)
&gt;  ==24515==    by 0x4BEE29: perf_evlist__deliver_sample (session.c:1192)
&gt;  ==24515==    by 0x4BEE29: machines__deliver_event (session.c:1229)
&gt;  ==24515==    by 0x4BF770: perf_session__deliver_event (session.c:1286)
&gt;  ==24515==    by 0x4BF770: ordered_events__deliver_event (session.c:114)
&gt;  ==24515==    by 0x4C1D17: __ordered_events__flush (ordered-events.c:207)
&gt;  ==24515==    by 0x4C1D17: ordered_events__flush.part.3 (ordered-events.c:274)
&gt;  ==24515==    by 0x4BF44C: perf_session__process_user_event (session.c:1325)
&gt;  ==24515==    by 0x4BF44C: perf_session__process_event (session.c:1451)
&gt;  ==24515==  Address 0x807c6a0 is 0 bytes inside a block of size 4,096 alloc'd
&gt;  ==24515==    at 0x4C29C0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
&gt;  ==24515==    by 0x4A5BCB: dso__load (symbol.c:1421)
&gt;  ==24515==    by 0x4BB1AE: map__load (map.c:289)
&gt;  ==24515==    by 0x4BB1AE: map__find_symbol (map.c:333)
&gt;  ==24515==    by 0x4835B3: thread__find_addr_location (event.c:1300)
&gt;  ==24515==    by 0x4B5342: add_callchain_ip (machine.c:1652)
&gt;  ==24515==    by 0x4B5342: thread__resolve_callchain_sample (machine.c:1906)
&gt;  ==24515==    by 0x4B9E7D: thread__resolve_callchain (machine.c:1958)
&gt;  ==24515==    by 0x441B3E: process_event (builtin-script.c:795)
&gt;  ==24515==    by 0x441B3E: process_sample_event (builtin-script.c:920)
&gt;  ==24515==    by 0x4BEE29: perf_evlist__deliver_sample (session.c:1192)
&gt;  ==24515==    by 0x4BEE29: machines__deliver_event (session.c:1229)
&gt;  ==24515==    by 0x4BF770: perf_session__deliver_event (session.c:1286)
&gt;  ==24515==    by 0x4BF770: ordered_events__deliver_event (session.c:114)
&gt;  ==24515==    by 0x4C1D17: __ordered_events__flush (ordered-events.c:207)
&gt;  ==24515==    by 0x4C1D17: ordered_events__flush.part.3 (ordered-events.c:274)
&gt;  ==24515==    by 0x4BF44C: perf_session__process_user_event (session.c:1325)
&gt;  ==24515==    by 0x4BF44C: perf_session__process_event (session.c:1451)
&gt;  ==24515==    by 0x4C0EAC: __perf_session__process_events (session.c:1804)
&gt;  ==24515==    by 0x4C0EAC: perf_session__process_events (session.c:1858)

The reason was a typo that passed global 'name' variable as the
is_regular_file argument instead dso-&gt;long_name.

Reported-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Acked-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Wang Nan &lt;wangnan0@huawei.com&gt;
Fixes: 403567217d3f ("perf symbols: Do not read symbols/data from device files")
Link: http://lkml.kernel.org/r/1466772025-17471-2-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>perf tools: Rename strlist_for_each() macros to for_each_entry()</title>
<updated>2016-06-23T14:35:01+00:00</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2016-06-23T14:31:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=602a1f4daa5d107e890fd4f5f558dedf6a0874f3'/>
<id>602a1f4daa5d107e890fd4f5f558dedf6a0874f3</id>
<content type='text'>
To match the semantics for list.h in the kernel, that are the
interface we use in them.

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: Milian Wolff &lt;milian.wolff@kdab.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Taeung Song &lt;treeze.taeung@gmail.com&gt;
Cc: Wang Nan &lt;wangnan0@huawei.com&gt;
Link: http://lkml.kernel.org/n/tip-0b5i2ki9c3di6706fxpticsb@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To match the semantics for list.h in the kernel, that are the
interface we use in them.

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: Milian Wolff &lt;milian.wolff@kdab.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Taeung Song &lt;treeze.taeung@gmail.com&gt;
Cc: Wang Nan &lt;wangnan0@huawei.com&gt;
Link: http://lkml.kernel.org/n/tip-0b5i2ki9c3di6706fxpticsb@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>perf buildid-cache: Use path/to/bin/buildid/elf instead of path/to/bin/buildid</title>
<updated>2016-05-30T16:15:03+00:00</updated>
<author>
<name>Masami Hiramatsu</name>
<email>masami.hiramatsu.pt@hitachi.com</email>
</author>
<published>2016-05-28T15:15:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=01412261d99497021353c4b1d67e8df6c9cdc3c6'/>
<id>01412261d99497021353c4b1d67e8df6c9cdc3c6</id>
<content type='text'>
Use path/to/bin/buildid/elf instead of path/to/bin/buildid
to store corresponding elf binary.
This also stores vdso in buildid/vdso, kallsyms in buildid/kallsyms.

Note that the existing caches are not updated until user adds
or updates the cache. Anyway, if there is the old style build-id
cache it falls back to use it. (IOW, it is backward compatible)

Signed-off-by: Masami Hiramatsu &lt;mhiramat@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: Ananth N Mavinakayanahalli &lt;ananth@linux.vnet.ibm.com&gt;
Cc: Brendan Gregg &lt;brendan.d.gregg@gmail.com&gt;
Cc: Hemant Kumar &lt;hemant@linux.vnet.ibm.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: http://lkml.kernel.org/r/20160528151537.16098.85815.stgit@devbox
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use path/to/bin/buildid/elf instead of path/to/bin/buildid
to store corresponding elf binary.
This also stores vdso in buildid/vdso, kallsyms in buildid/kallsyms.

Note that the existing caches are not updated until user adds
or updates the cache. Anyway, if there is the old style build-id
cache it falls back to use it. (IOW, it is backward compatible)

Signed-off-by: Masami Hiramatsu &lt;mhiramat@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: Ananth N Mavinakayanahalli &lt;ananth@linux.vnet.ibm.com&gt;
Cc: Brendan Gregg &lt;brendan.d.gregg@gmail.com&gt;
Cc: Hemant Kumar &lt;hemant@linux.vnet.ibm.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: http://lkml.kernel.org/r/20160528151537.16098.85815.stgit@devbox
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
