Home
last modified time | relevance | path

Searched refs:nsi (Results 1 – 18 of 18) sorted by relevance

/linux/tools/perf/util/
H A Dnamespaces.c97 int nsinfo__init(struct nsinfo *nsi) in nsinfo__init() argument
109 if (asprintf(&newns, "/proc/%d/ns/mnt", nsinfo__pid(nsi)) == -1) in nsinfo__init()
122 RC_CHK_ACCESS(nsi)->need_setns = true; in nsinfo__init()
123 RC_CHK_ACCESS(nsi)->mntns_path = newns; in nsinfo__init()
130 if (snprintf(spath, PATH_MAX, "/proc/%d/status", nsinfo__pid(nsi)) >= PATH_MAX) in nsinfo__init()
133 rv = nsinfo__get_nspid(&RC_CHK_ACCESS(nsi)->tgid, &RC_CHK_ACCESS(nsi)->nstgid, in nsinfo__init()
134 &RC_CHK_ACCESS(nsi)->in_pidns, spath); in nsinfo__init()
144 RC_STRUCT(nsinfo) *nsi; in nsinfo__alloc()
146 nsi = calloc(1, sizeof(*nsi)); in nsinfo__alloc()
147 if (ADD_RC_CHK(res, nsi)) in nsinfo__alloc()
[all …]
H A Dcopyfile.c14 static int slow_copyfile(const char *from, const char *to, struct nsinfo *nsi) in slow_copyfile() argument
22 nsinfo__mountns_enter(nsi, &nsc); in slow_copyfile()
74 struct nsinfo *nsi) in copyfile_mode_ns() argument
82 nsinfo__mountns_enter(nsi, &nsc); in copyfile_mode_ns()
105 err = slow_copyfile(from, tmp, nsi); in copyfile_mode_ns()
114 nsinfo__mountns_enter(nsi, &nsc); in copyfile_mode_ns()
133 int copyfile_ns(const char *from, const char *to, struct nsinfo *nsi) in copyfile_ns() argument
135 return copyfile_mode_ns(from, to, 0755, nsi); in copyfile_ns()
H A Dbuild-id.c515 struct nsinfo *nsi, bool is_kallsyms, in build_id_cache__cachedir() argument
522 realname = nsinfo__realpath(name, nsi); in build_id_cache__cachedir()
533 int build_id_cache__list_build_ids(const char *pathname, struct nsinfo *nsi, in build_id_cache__list_build_ids() argument
539 dir_name = build_id_cache__cachedir(NULL, pathname, nsi, false, false); in build_id_cache__list_build_ids()
554 struct nsinfo *nsi) in build_id_cache__add_sdt_cache() argument
560 cache = probe_cache__new(sbuild_id, nsi); in build_id_cache__add_sdt_cache()
564 nsinfo__mountns_enter(nsi, &nsc); in build_id_cache__add_sdt_cache()
576 #define build_id_cache__add_sdt_cache(sbuild_id, realname, nsi) (0) argument
580 struct nsinfo *nsi, in build_id_cache__find_debug() argument
603 nsinfo__mountns_enter(nsi, &nsc); in build_id_cache__find_debug()
[all …]
H A Dbuild-id.h54 struct nsinfo *nsi, bool is_kallsyms,
61 int build_id_cache__list_build_ids(const char *pathname, struct nsinfo *nsi,
65 struct nsinfo *nsi, bool is_kallsyms, bool is_vdso,
68 const char *name, struct nsinfo *nsi,
72 const char *name, struct nsinfo *nsi, in build_id_cache__add_s() argument
75 return __build_id_cache__add_s(sbuild_id, name, nsi, is_kallsyms, is_vdso, NULL, NULL); in build_id_cache__add_s()
H A Djitdump.c39 struct nsinfo *nsi; member
88 nsinfo__mountns_enter(jd->nsi, &nsc); in jit_emit_elf()
104 nsinfo__mountns_enter(jd->nsi, &nsc); in jit_emit_elf()
147 nsinfo__mountns_enter(jd->nsi, &nsc); in jit_open()
382 if (jd->nsi && nsinfo__in_pidns(jd->nsi)) in jr_entry_pid()
383 return nsinfo__tgid(jd->nsi); in jr_entry_pid()
389 if (jd->nsi && nsinfo__in_pidns(jd->nsi)) in jr_entry_tid()
390 return nsinfo__pid(jd->nsi); in jr_entry_tid()
489 if (nsinfo__stat(filename, &st, jd->nsi)) in jit_repipe_code_load()
598 if (nsinfo__stat(filename, &st, jd->nsi)) in jit_repipe_code_move()
[all …]
H A Dmap.c129 struct nsinfo *nsi = NULL; in map__new() local
142 nsi = nsinfo__get(thread__nsinfo(thread)); in map__new()
144 if ((anon || no_dso) && nsi && (prot & PROT_EXEC)) { in map__new()
146 "/tmp/perf-%d.map", nsinfo__pid(nsi)); in map__new()
160 nnsi = nsinfo__copy(nsi); in map__new()
162 nsinfo__put(nsi); in map__new()
164 nsi = nnsi; in map__new()
189 dso__set_nsinfo(dso, nsi); in map__new()
211 nsinfo__put(nsi); in map__new()
H A Dprobe-event.c202 struct map *get_target_map(const char *target, struct nsinfo *nsi, bool user) in get_target_map() argument
213 dso__set_nsinfo(dso, nsinfo__get(nsi)); in get_target_map()
399 const char *target, struct nsinfo *nsi, in find_alternative_probe_point() argument
412 map = get_target_map(target, nsi, uprobes); in find_alternative_probe_point()
460 pev->nsi, pev->uprobes); in get_alternative_probe_event()
495 static struct debuginfo *open_from_debuginfod(struct dso *dso, struct nsinfo *nsi, in open_from_debuginfod() argument
522 nsinfo__mountns_enter(nsi, &nsc); in open_from_debuginfod()
530 struct nsinfo *nsi __maybe_unused, in open_from_debuginfod()
538 static struct debuginfo *open_debuginfo(const char *module, struct nsinfo *nsi, in open_debuginfo() argument
557 ret = open_from_debuginfod(dso, nsi, silent); in open_debuginfo()
[all …]
H A Dcopyfile.h13 int copyfile_ns(const char *from, const char *to, struct nsinfo *nsi);
H A Dprobe-file.c433 struct nsinfo *nsi) in probe_cache__open() argument
454 nsinfo__mountns_enter(nsi, &nsc); in probe_cache__open()
466 ret = build_id_cache__add_s(sbuildid, target, nsi, in probe_cache__open()
474 dir_name = build_id_cache__cachedir(sbuildid, target, nsi, is_kallsyms, in probe_cache__open()
583 struct probe_cache *probe_cache__new(const char *target, struct nsinfo *nsi) in probe_cache__new() argument
591 ret = probe_cache__open(pcache, target, nsi); in probe_cache__new()
H A Dsymbol.c1646 struct nsinfo *nsi; in dso__find_perf_map() local
1650 nsi = *nsip; in dso__find_perf_map()
1652 if (nsinfo__need_setns(nsi)) { in dso__find_perf_map()
1653 snprintf(filebuf, bufsz, "/tmp/perf-%d.map", nsinfo__nstgid(nsi)); in dso__find_perf_map()
1654 nsinfo__mountns_enter(nsi, &nsc); in dso__find_perf_map()
1661 nnsi = nsinfo__copy(nsi); in dso__find_perf_map()
1663 nsinfo__put(nsi); in dso__find_perf_map()
H A Dsynthetic-events.c372 struct nsinfo *nsi; in perf_record_mmap2__read_build_id() local
401 nsi = nsinfo__new(event->pid); in perf_record_mmap2__read_build_id()
402 nsinfo__mountns_enter(nsi, &nc); in perf_record_mmap2__read_build_id()
407 nsinfo__put(nsi); in perf_record_mmap2__read_build_id()
H A Ddso.h626 void dso__set_nsinfo(struct dso *dso, struct nsinfo *nsi);
H A Ddso.c44 void dso__set_nsinfo(struct dso *dso, struct nsinfo *nsi) in dso__set_nsinfo() argument
47 RC_CHK_ACCESS(dso)->nsinfo = nsi; in dso__set_nsinfo()
/linux/tools/perf/
H A Dbuiltin-buildid-cache.c175 static int build_id_cache__add_file(const char *filename, struct nsinfo *nsi) in build_id_cache__add_file() argument
182 nsinfo__mountns_enter(nsi, &nsc); in build_id_cache__add_file()
191 err = build_id_cache__add_s(sbuild_id, filename, nsi, in build_id_cache__add_file()
198 static int build_id_cache__remove_file(const char *filename, struct nsinfo *nsi) in build_id_cache__remove_file() argument
206 nsinfo__mountns_enter(nsi, &nsc); in build_id_cache__remove_file()
222 static int build_id_cache__purge_path(const char *pathname, struct nsinfo *nsi) in build_id_cache__purge_path() argument
228 err = build_id_cache__list_build_ids(pathname, nsi, &list); in build_id_cache__purge_path()
305 static int build_id_cache__update_file(const char *filename, struct nsinfo *nsi) in build_id_cache__update_file() argument
313 nsinfo__mountns_enter(nsi, &nsc); in build_id_cache__update_file()
327 err = build_id_cache__add_s(sbuild_id, filename, nsi, false, in build_id_cache__update_file()
[all …]
H A Dbuiltin-probe.c49 struct nsinfo *nsi; member
72 pev->nsi = nsinfo__get(params->nsi); in parse_probe_event()
183 tmp = nsinfo__realpath(str, params->nsi); in opt_set_target()
219 params->nsi = nsinfo__get(nsip); in opt_set_target_ns()
329 nsinfo__put(params->nsi); in cleanup_params()
691 ret = show_available_funcs(params->target, params->nsi, in __cmd_probe()
699 params->nsi, params->uprobes); in __cmd_probe()
H A Dbuiltin-inject.c476 struct nsinfo *nsi = NULL; in findnew_dso() local
488 nsi = nsinfo__get(thread__nsinfo(thread)); in findnew_dso()
495 nnsi = nsinfo__copy(nsi); in findnew_dso()
497 nsinfo__put(nsi); in findnew_dso()
499 nsi = nnsi; in findnew_dso()
508 dso__set_nsinfo(dso, nsi); in findnew_dso()
511 nsinfo__put(nsi); in findnew_dso()
/linux/tools/perf/arch/powerpc/util/
H A Dsym-handling.c127 map = get_target_map(pev->target, pev->nsi, pev->uprobes); in arch__post_process_probe_trace_events()
/linux/drivers/net/ethernet/aquantia/atlantic/hw_atl/
H A Dhw_atl_b0.c1242 u64 nsi; in hw_atl_b0_adj_params_get() local
1245 nsi = div64_u64(base_ns, NSEC_PER_SEC); in hw_atl_b0_adj_params_get()
1247 if (base_ns != nsi * NSEC_PER_SEC) { in hw_atl_b0_adj_params_get()
1249 base_ns - nsi * NSEC_PER_SEC); in hw_atl_b0_adj_params_get()
1253 *ns = (u32)nsi; in hw_atl_b0_adj_params_get()