perf machine: Fix the search for the kernel DSO on the unified list
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 2 Jun 2015 14:28:13 +0000 (11:28 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 2 Jun 2015 18:15:37 +0000 (15:15 -0300)
When unifying the user_dsos and kernel_dsos a bug was introduced by
inverting the check for dso->kernel, fix it.

Fixes: 3d39ac538629 ("perf machine: No need to have two DSOs lists")
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/n/tip-xnrnq0kams3s2z9ek1wjb506@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/machine.c

index 2ed61f59d415ec65c050ec63802e2819d4e06a2a..4e29e80932e5342439e3b189ad0879ba69dc0daf 100644 (file)
@@ -1149,7 +1149,7 @@ static int machine__process_kernel_mmap_event(struct machine *machine,
                struct dso *dso;
 
                list_for_each_entry(dso, &machine->dsos.head, node) {
-                       if (dso->kernel && is_kernel_module(dso->long_name))
+                       if (!dso->kernel || is_kernel_module(dso->long_name))
                                continue;
 
                        kernel = dso;