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>
This commit is contained in:
Arnaldo Carvalho de Melo
2015-05-29 11:31:12 -03:00
parent 3d39ac5386
commit aa7cc2ae5a
6 changed files with 12 additions and 6 deletions

View File

@@ -1264,7 +1264,7 @@ static int __event_process_build_id(struct build_id_event *bev,
goto out;
}
dso = __dsos__findnew(&machine->dsos, filename);
dso = machine__findnew_dso(machine, filename);
if (dso != NULL) {
char sbuild_id[BUILD_ID_SIZE * 2 + 1];