Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 169569
b: refs/heads/master
c: d70a540
h: refs/heads/master
i:
  169567: ba5637a
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo authored and Ingo Molnar committed Nov 2, 2009
1 parent 7a6a8ac commit 3f78fab
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 00a192b395b0606ad0265243844b3cd68e73420a
refs/heads/master: d70a5402f9c2e2671b809363616b3508b4c5a565
16 changes: 14 additions & 2 deletions trunk/tools/perf/util/map.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ struct map *map__new(struct mmap_event *event, char *cwd, int cwdlen)
return NULL;
}

#define DSO__DELETED "(deleted)"

struct symbol *
map__find_symbol(struct map *self, u64 ip, symbol_filter_t filter)
{
Expand All @@ -86,8 +88,18 @@ map__find_symbol(struct map *self, u64 ip, symbol_filter_t filter)
self->dso->long_name);
return NULL;
} else if (nr == 0) {
pr_warning("No symbols found in %s, maybe install a debug package?\n",
self->dso->long_name);
const char *name = self->dso->long_name;
const size_t len = strlen(name);
const size_t real_len = len - sizeof(DSO__DELETED);

if (len > sizeof(DSO__DELETED) &&
strcmp(name + real_len + 1, DSO__DELETED) == 0)
pr_warning("%.*s was updated, restart the "
"long running apps that use it!\n",
real_len, name);
else
pr_warning("no symbols found in %s, maybe "
"install a debug package?\n", name);
return NULL;
}
}
Expand Down

0 comments on commit 3f78fab

Please sign in to comment.