Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242522
b: refs/heads/master
c: 60e4b10
h: refs/heads/master
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo committed Mar 23, 2011
1 parent ed67a55 commit 0ec39c4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 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: b25114817a73bbd2b84ce9dba02ee1ef8989a947
refs/heads/master: 60e4b10c5a27182bc8ce7435050a17cb61c94d00
25 changes: 13 additions & 12 deletions trunk/tools/perf/util/symbol.c
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,9 @@ int dso__load(struct dso *self, struct map *map, symbol_filter_t filter)
* On the first pass, only load images if they have a full symtab.
* Failing that, do a second pass where we accept .dynsym also
*/
for (self->symtab_type = SYMTAB__BUILD_ID_CACHE, want_symtab = 1;
want_symtab = 1;
restart:
for (self->symtab_type = SYMTAB__BUILD_ID_CACHE;
self->symtab_type != SYMTAB__NOT_FOUND;
self->symtab_type++) {
switch (self->symtab_type) {
Expand Down Expand Up @@ -1536,17 +1538,7 @@ int dso__load(struct dso *self, struct map *map, symbol_filter_t filter)
snprintf(name, size, "%s%s", symbol_conf.symfs,
self->long_name);
break;

default:
/*
* If we wanted a full symtab but no image had one,
* relax our requirements and repeat the search.
*/
if (want_symtab) {
want_symtab = 0;
self->symtab_type = SYMTAB__BUILD_ID_CACHE;
} else
continue;
default:;
}

/* Name is now the name of the next image to try */
Expand All @@ -1573,6 +1565,15 @@ int dso__load(struct dso *self, struct map *map, symbol_filter_t filter)
}
}

/*
* If we wanted a full symtab but no image had one,
* relax our requirements and repeat the search.
*/
if (ret <= 0 && want_symtab) {
want_symtab = 0;
goto restart;
}

free(name);
if (ret < 0 && strstr(self->name, " (deleted)") != NULL)
return 0;
Expand Down

0 comments on commit 0ec39c4

Please sign in to comment.