diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-05-28 18:06:42 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-05-29 17:43:43 +0200 |
commit | 3d39ac538629e4f00a6e1c38d46346f1b8e69505 (patch) | |
tree | 91649aa3c3fb8099ed0a1ab5919308c0c42d7a93 /tools/perf/util/probe-event.c | |
parent | perf machine: Adopt findnew_kernel method (diff) | |
download | linux-3d39ac538629e4f00a6e1c38d46346f1b8e69505.tar.xz linux-3d39ac538629e4f00a6e1c38d46346f1b8e69505.zip |
perf machine: No need to have two DSOs lists
We can, given a DSO, figure out if it is a kernel, a kernel module or
a userlevel DSO, so stop having to process two lists in several
functions.
If searching becomes an issue at some point, we can have them in a
rbtree, etc.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-s4yb0onpdywu6dj2xl9lxi4t@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/probe-event.c')
-rw-r--r-- | tools/perf/util/probe-event.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index e6a02b1ffd6d..d27edef5eb5b 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c @@ -256,8 +256,9 @@ static int kernel_get_module_dso(const char *module, struct dso **pdso) int ret = 0; if (module) { - list_for_each_entry(dso, &host_machine->kernel_dsos.head, - node) { + list_for_each_entry(dso, &host_machine->dsos.head, node) { + if (!dso->kernel) + continue; if (strncmp(dso->short_name + 1, module, dso->short_name_len - 2) == 0) goto found; |