summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/machine.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo2015-05-29 16:31:12 +0200
committerArnaldo Carvalho de Melo2015-05-29 17:43:44 +0200
commitaa7cc2ae5ae69aff555793fbfcff514141bb23f3 (patch)
tree2920c2fb1a8209b5216899cdd1491c53c5fcdd5d /tools/perf/util/machine.c
parentperf machine: No need to have two DSOs lists (diff)
downloadkernel-qcow2-linux-aa7cc2ae5ae69aff555793fbfcff514141bb23f3.tar.gz
kernel-qcow2-linux-aa7cc2ae5ae69aff555793fbfcff514141bb23f3.tar.xz
kernel-qcow2-linux-aa7cc2ae5ae69aff555793fbfcff514141bb23f3.zip
perf machine: Introduce machine__findnew_dso() method
Similar to machine__findnew_thread(), also prepping for refcounting and locking, this time for struct dso instances. 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-fv3tshv5o1413coh147lszjc@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/machine.c')
-rw-r--r--tools/perf/util/machine.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index ffd31079d447..698da1da5168 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -1157,7 +1157,7 @@ static int machine__process_kernel_mmap_event(struct machine *machine,
}
if (kernel == NULL)
- kernel = __dsos__findnew(&machine->dsos, kmmap_prefix);
+ kernel = machine__findnew_dso(machine, kmmap_prefix);
if (kernel == NULL)
goto out_problem;
@@ -1915,3 +1915,8 @@ int machine__get_kernel_start(struct machine *machine)
}
return err;
}
+
+struct dso *machine__findnew_dso(struct machine *machine, const char *filename)
+{
+ return __dsos__findnew(&machine->dsos, filename);
+}