diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-10-30 14:28:25 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-11-02 10:52:12 -0500 |
commit | d70a5402f9c2e2671b809363616b3508b4c5a565 (patch) | |
tree | 1dd27fc44cc1e395542fcd6381f4b9b46be72264 /tools/perf/util/map.c | |
parent | 00a192b395b0606ad0265243844b3cd68e73420a (diff) |
perf tools: Improve message about missing symtabs for deleted DSOs
Instead of:
no symbols found in /usr/lib/gstreamer-0.10/libgsttypefindfunctions.so (deleted), maybe install a debug package?
no symbols found in /usr/lib/gstreamer-0.10/libgstaudioconvert.so (deleted), maybe install a debug package?
We now emit:
/usr/lib/gstreamer-0.10/libgsttypefindfunctions.so was updated, restart the long running apps that use it!
/usr/lib/gstreamer-0.10/libgstaudioconvert.so was updated, restart the long running apps that use it!
Which is far less misleading about what the cause of the
symbol mismatch is.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Mike Galbraith <efault@gmx.de>
LKML-Reference: <1256927305-4628-3-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/map.c')
-rw-r--r-- | tools/perf/util/map.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c index 679011c1b6d1..f1e216955420 100644 --- a/tools/perf/util/map.c +++ b/tools/perf/util/map.c | |||
@@ -75,6 +75,8 @@ out_delete: | |||
75 | return NULL; | 75 | return NULL; |
76 | } | 76 | } |
77 | 77 | ||
78 | #define DSO__DELETED "(deleted)" | ||
79 | |||
78 | struct symbol * | 80 | struct symbol * |
79 | map__find_symbol(struct map *self, u64 ip, symbol_filter_t filter) | 81 | map__find_symbol(struct map *self, u64 ip, symbol_filter_t filter) |
80 | { | 82 | { |
@@ -86,8 +88,18 @@ map__find_symbol(struct map *self, u64 ip, symbol_filter_t filter) | |||
86 | self->dso->long_name); | 88 | self->dso->long_name); |
87 | return NULL; | 89 | return NULL; |
88 | } else if (nr == 0) { | 90 | } else if (nr == 0) { |
89 | pr_warning("No symbols found in %s, maybe install a debug package?\n", | 91 | const char *name = self->dso->long_name; |
90 | self->dso->long_name); | 92 | const size_t len = strlen(name); |
93 | const size_t real_len = len - sizeof(DSO__DELETED); | ||
94 | |||
95 | if (len > sizeof(DSO__DELETED) && | ||
96 | strcmp(name + real_len + 1, DSO__DELETED) == 0) | ||
97 | pr_warning("%.*s was updated, restart the " | ||
98 | "long running apps that use it!\n", | ||
99 | real_len, name); | ||
100 | else | ||
101 | pr_warning("no symbols found in %s, maybe " | ||
102 | "install a debug package?\n", name); | ||
91 | return NULL; | 103 | return NULL; |
92 | } | 104 | } |
93 | } | 105 | } |