diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2017-03-24 08:15:52 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-05-20 08:28:38 -0400 |
commit | 7929b50dedd131be308f8b3cd54b6cb1c4c5b949 (patch) | |
tree | 02022d26beb4790543c88bdb01009f070a9cb1ae /tools | |
parent | e3cea38357ea66d63b1c42500c69ca88a3f0c44f (diff) |
perf auxtrace: Fix no_size logic in addr_filter__resolve_kernel_syms()
commit c3a0bbc7ad7598dec5a204868bdf8a2b1b51df14 upstream.
Address filtering with kernel symbols incorrectly resulted in the error
"Cannot determine size of symbol" because the no_size logic was the wrong
way around.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Tested-by: Andi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/r/1490357752-27942-1-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/auxtrace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/auxtrace.c b/tools/perf/util/auxtrace.c index c5a6e0b12452..78bd632f144d 100644 --- a/tools/perf/util/auxtrace.c +++ b/tools/perf/util/auxtrace.c | |||
@@ -1826,7 +1826,7 @@ static int addr_filter__resolve_kernel_syms(struct addr_filter *filt) | |||
1826 | filt->addr = start; | 1826 | filt->addr = start; |
1827 | if (filt->range && !filt->size && !filt->sym_to) { | 1827 | if (filt->range && !filt->size && !filt->sym_to) { |
1828 | filt->size = size; | 1828 | filt->size = size; |
1829 | no_size = !!size; | 1829 | no_size = !size; |
1830 | } | 1830 | } |
1831 | } | 1831 | } |
1832 | 1832 | ||
@@ -1840,7 +1840,7 @@ static int addr_filter__resolve_kernel_syms(struct addr_filter *filt) | |||
1840 | if (err) | 1840 | if (err) |
1841 | return err; | 1841 | return err; |
1842 | filt->size = start + size - filt->addr; | 1842 | filt->size = start + size - filt->addr; |
1843 | no_size = !!size; | 1843 | no_size = !size; |
1844 | } | 1844 | } |
1845 | 1845 | ||
1846 | /* The very last symbol in kallsyms does not imply a particular size */ | 1846 | /* The very last symbol in kallsyms does not imply a particular size */ |