git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
perf session: Make read_build_id routines look at the host_machine too
[safe/jmp/linux-2.6]
/
tools
/
perf
/
util
/
symbol.c
diff --git
a/tools/perf/util/symbol.c
b/tools/perf/util/symbol.c
index
994efdb
..
96bff0e
100644
(file)
--- a/
tools/perf/util/symbol.c
+++ b/
tools/perf/util/symbol.c
@@
-130,8
+130,9
@@
static struct symbol *symbol__new(u64 start, u64 len, const char *name)
if (symbol_conf.priv_size)
self = ((void *)self) + symbol_conf.priv_size;
if (symbol_conf.priv_size)
self = ((void *)self) + symbol_conf.priv_size;
- self->start = start;
- self->end = len ? start + len - 1 : start;
+ self->start = start;
+ self->end = len ? start + len - 1 : start;
+ self->namelen = namelen - 1;
pr_debug4("%s: %s %#Lx-%#Lx\n", __func__, name, start, self->end);
pr_debug4("%s: %s %#Lx-%#Lx\n", __func__, name, start, self->end);
@@
-524,7
+525,7
@@
static int dso__split_kallsyms(struct dso *self, struct map *map,
curr_map = map_groups__find_by_name(kmaps,
map->type, module);
if (curr_map == NULL) {
curr_map = map_groups__find_by_name(kmaps,
map->type, module);
if (curr_map == NULL) {
- pr_
err
("%s/proc/{kallsyms,modules} "
+ pr_
debug
("%s/proc/{kallsyms,modules} "
"inconsistency while looking "
"for \"%s\" module!\n",
machine->root_dir, module);
"inconsistency while looking "
"for \"%s\" module!\n",
machine->root_dir, module);
@@
-1130,6
+1131,10
@@
bool __dsos__read_build_ids(struct list_head *head, bool with_hits)
list_for_each_entry(pos, head, node) {
if (with_hits && !pos->hit)
continue;
list_for_each_entry(pos, head, node) {
if (with_hits && !pos->hit)
continue;
+ if (pos->has_build_id) {
+ have_build_id = true;
+ continue;
+ }
if (filename__read_build_id(pos->long_name, pos->build_id,
sizeof(pos->build_id)) > 0) {
have_build_id = true;
if (filename__read_build_id(pos->long_name, pos->build_id,
sizeof(pos->build_id)) > 0) {
have_build_id = true;
@@
-1932,6
+1937,12
@@
static size_t __dsos__fprintf_buildid(struct list_head *head, FILE *fp,
return ret;
}
return ret;
}
+size_t machine__fprintf_dsos_buildid(struct machine *self, FILE *fp, bool with_hits)
+{
+ return __dsos__fprintf_buildid(&self->kernel_dsos, fp, with_hits) +
+ __dsos__fprintf_buildid(&self->user_dsos, fp, with_hits);
+}
+
size_t machines__fprintf_dsos_buildid(struct rb_root *self, FILE *fp, bool with_hits)
{
struct rb_node *nd;
size_t machines__fprintf_dsos_buildid(struct rb_root *self, FILE *fp, bool with_hits)
{
struct rb_node *nd;
@@
-1939,8
+1950,7
@@
size_t machines__fprintf_dsos_buildid(struct rb_root *self, FILE *fp, bool with_
for (nd = rb_first(self); nd; nd = rb_next(nd)) {
struct machine *pos = rb_entry(nd, struct machine, rb_node);
for (nd = rb_first(self); nd; nd = rb_next(nd)) {
struct machine *pos = rb_entry(nd, struct machine, rb_node);
- ret += __dsos__fprintf_buildid(&pos->kernel_dsos, fp, with_hits);
- ret += __dsos__fprintf_buildid(&pos->user_dsos, fp, with_hits);
+ ret += machine__fprintf_dsos_buildid(pos, fp, with_hits);
}
return ret;
}
}
return ret;
}