Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166439
b: refs/heads/master
c: 508c4d0
h: refs/heads/master
i:
  166437: b9c5f9e
  166435: 9218ed6
  166431: a1c70b3
v: v3
  • Loading branch information
Mike Galbraith authored and Ingo Molnar committed Sep 23, 2009
1 parent dcfc62d commit c282093
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 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: 7d42896628202a551ad1107697cd215dc5fca099
refs/heads/master: 508c4d0874acf8584787bbab7e4a3798e2834c1a
17 changes: 13 additions & 4 deletions trunk/tools/perf/util/symbol.c
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ int dso__load_modules(struct dso *self, symbol_filter_t filter, int v)
struct mod_dso *mods = mod_dso__new_dso("modules");
struct module *pos;
struct rb_node *next;
int err;
int err, count = 0;

err = mod_dso__load_modules(mods);

Expand All @@ -852,14 +852,16 @@ int dso__load_modules(struct dso *self, symbol_filter_t filter, int v)
break;

next = rb_next(&pos->rb_node);
count += err;
}

if (err < 0) {
mod_dso__delete_modules(mods);
mod_dso__delete_self(mods);
return err;
}

return err;
return count;
}

static inline void dso__fill_symbol_holes(struct dso *self)
Expand Down Expand Up @@ -913,8 +915,15 @@ int dso__load_kernel(struct dso *self, const char *vmlinux,

if (vmlinux) {
err = dso__load_vmlinux(self, vmlinux, filter, v);
if (err > 0 && use_modules)
err = dso__load_modules(self, filter, v);
if (err > 0 && use_modules) {
int syms = dso__load_modules(self, filter, v);

if (syms < 0) {
fprintf(stderr, "dso__load_modules failed!\n");
return syms;
}
err += syms;
}
}

if (err <= 0)
Expand Down

0 comments on commit c282093

Please sign in to comment.