Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182427
b: refs/heads/master
c: a19afe4
h: refs/heads/master
i:
  182425: 72065df
  182423: 52b2c8d
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo authored and Ingo Molnar committed Jan 29, 2010
1 parent 3c54772 commit da00e1a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 15 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: 72b8fa1730207274f6818b47b891ce5dff79287e
refs/heads/master: a19afe46412452fef89cc623873a8931b3685944
38 changes: 24 additions & 14 deletions trunk/tools/perf/util/symbol.c
Original file line number Diff line number Diff line change
Expand Up @@ -1578,6 +1578,27 @@ static int dso__load_vmlinux(struct dso *self, struct map *map,
return err;
}

int dso__load_vmlinux_path(struct dso *self, struct map *map,
struct perf_session *session, symbol_filter_t filter)
{
int i, err = 0;

pr_debug("Looking at the vmlinux_path (%d entries long)\n",
vmlinux_path__nr_entries);

for (i = 0; i < vmlinux_path__nr_entries; ++i) {
err = dso__load_vmlinux(self, map, session, vmlinux_path[i],
filter);
if (err > 0) {
pr_debug("Using %s for symbols\n", vmlinux_path[i]);
dso__set_long_name(self, strdup(vmlinux_path[i]));
break;
}
}

return err;
}

static int dso__load_kernel_sym(struct dso *self, struct map *map,
struct perf_session *session, symbol_filter_t filter)
{
Expand Down Expand Up @@ -1606,20 +1627,9 @@ static int dso__load_kernel_sym(struct dso *self, struct map *map,
}

if (vmlinux_path != NULL) {
int i;
pr_debug("Looking at the vmlinux_path (%d entries long)\n",
vmlinux_path__nr_entries);
for (i = 0; i < vmlinux_path__nr_entries; ++i) {
err = dso__load_vmlinux(self, map, session,
vmlinux_path[i], filter);
if (err > 0) {
pr_debug("Using %s for symbols\n",
vmlinux_path[i]);
dso__set_long_name(self,
strdup(vmlinux_path[i]));
goto out_fixup;
}
}
err = dso__load_vmlinux_path(self, map, session, filter);
if (err > 0)
goto out_fixup;
}

/*
Expand Down
2 changes: 2 additions & 0 deletions trunk/tools/perf/util/symbol.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ struct perf_session;

int dso__load(struct dso *self, struct map *map, struct perf_session *session,
symbol_filter_t filter);
int dso__load_vmlinux_path(struct dso *self, struct map *map,
struct perf_session *session, symbol_filter_t filter);
void dsos__fprintf(FILE *fp);
size_t dsos__fprintf_buildid(FILE *fp, bool with_hits);

Expand Down

0 comments on commit da00e1a

Please sign in to comment.