Lines Matching refs:dso

70 static int dso__inject_build_id(struct dso *dso, struct perf_tool *tool,
337 static struct dso *findnew_dso(int pid, int tid, const char *filename, in findnew_dso()
343 struct dso *dso; in findnew_dso() local
366 dso = machine__findnew_vdso(machine, thread); in findnew_dso()
368 dso = machine__findnew_dso_id(machine, filename, id); in findnew_dso()
371 if (dso) { in findnew_dso()
372 nsinfo__put(dso->nsinfo); in findnew_dso()
373 dso->nsinfo = nsi; in findnew_dso()
378 return dso; in findnew_dso()
386 struct dso *dso; in perf_event__repipe_buildid_mmap() local
388 dso = findnew_dso(event->mmap.pid, event->mmap.tid, in perf_event__repipe_buildid_mmap()
391 if (dso && !dso->hit) { in perf_event__repipe_buildid_mmap()
392 dso->hit = 1; in perf_event__repipe_buildid_mmap()
393 dso__inject_build_id(dso, tool, machine, sample->cpumode, 0); in perf_event__repipe_buildid_mmap()
395 dso__put(dso); in perf_event__repipe_buildid_mmap()
411 struct dso *dso; in perf_event__repipe_mmap2() local
413 dso = findnew_dso(event->mmap2.pid, event->mmap2.tid, in perf_event__repipe_mmap2()
415 if (dso) { in perf_event__repipe_mmap2()
417 dso->hit = 1; in perf_event__repipe_mmap2()
419 dso__put(dso); in perf_event__repipe_mmap2()
461 struct dso *dso; in perf_event__repipe_buildid_mmap2() local
465 dso = findnew_dso(event->mmap2.pid, event->mmap2.tid, in perf_event__repipe_buildid_mmap2()
467 if (dso) { in perf_event__repipe_buildid_mmap2()
469 dso->hit = 1; in perf_event__repipe_buildid_mmap2()
471 dso__put(dso); in perf_event__repipe_buildid_mmap2()
475 dso = findnew_dso(event->mmap2.pid, event->mmap2.tid, in perf_event__repipe_buildid_mmap2()
478 if (dso && !dso->hit) { in perf_event__repipe_buildid_mmap2()
479 dso->hit = 1; in perf_event__repipe_buildid_mmap2()
480 dso__inject_build_id(dso, tool, machine, sample->cpumode, in perf_event__repipe_buildid_mmap2()
483 dso__put(dso); in perf_event__repipe_buildid_mmap2()
549 static int dso__read_build_id(struct dso *dso) in dso__read_build_id() argument
553 if (dso->has_build_id) in dso__read_build_id()
556 nsinfo__mountns_enter(dso->nsinfo, &nsc); in dso__read_build_id()
557 if (filename__read_build_id(dso->long_name, &dso->bid) > 0) in dso__read_build_id()
558 dso->has_build_id = true; in dso__read_build_id()
559 else if (dso->nsinfo) { in dso__read_build_id()
562 new_name = filename_with_chroot(dso->nsinfo->pid, in dso__read_build_id()
563 dso->long_name); in dso__read_build_id()
564 if (new_name && filename__read_build_id(new_name, &dso->bid) > 0) in dso__read_build_id()
565 dso->has_build_id = true; in dso__read_build_id()
570 return dso->has_build_id ? 0 : -1; in dso__read_build_id()
573 static int dso__inject_build_id(struct dso *dso, struct perf_tool *tool, in dso__inject_build_id() argument
578 if (is_anon_memory(dso->long_name) || flags & MAP_HUGETLB) in dso__inject_build_id()
580 if (is_no_dso_memory(dso->long_name)) in dso__inject_build_id()
583 if (dso__read_build_id(dso) < 0) { in dso__inject_build_id()
584 pr_debug("no build_id found for %s\n", dso->long_name); in dso__inject_build_id()
588 err = perf_event__synthesize_build_id(tool, dso, cpumode, in dso__inject_build_id()
591 pr_err("Can't synthesize build_id event for %s\n", dso->long_name); in dso__inject_build_id()
614 if (!al.map->dso->hit) { in perf_event__inject_buildid()
615 al.map->dso->hit = 1; in perf_event__inject_buildid()
616 dso__inject_build_id(al.map->dso, tool, machine, in perf_event__inject_buildid()