/kernel/linux/linux-6.6/tools/perf/util/ |
H A D | namespaces.c | 98 int nsinfo__init(struct nsinfo *nsi) in nsinfo__init() argument 110 if (asprintf(&newns, "/proc/%d/ns/mnt", nsinfo__pid(nsi)) == -1) in nsinfo__init() 123 RC_CHK_ACCESS(nsi)->need_setns = true; in nsinfo__init() 124 RC_CHK_ACCESS(nsi)->mntns_path = newns; in nsinfo__init() 131 if (snprintf(spath, PATH_MAX, "/proc/%d/status", nsinfo__pid(nsi)) >= PATH_MAX) in nsinfo__init() 134 rv = nsinfo__get_nspid(&RC_CHK_ACCESS(nsi)->tgid, &RC_CHK_ACCESS(nsi)->nstgid, in nsinfo__init() 135 &RC_CHK_ACCESS(nsi)->in_pidns, spath); in nsinfo__init() 145 RC_STRUCT(nsinfo) *nsi; in nsinfo__alloc() 147 nsi in nsinfo__alloc() 156 struct nsinfo *nsi; nsinfo__new() local 180 nsinfo__mntns_path(const struct nsinfo *nsi) nsinfo__mntns_path() argument 185 nsinfo__copy(const struct nsinfo *nsi) nsinfo__copy() argument 212 nsinfo__refcnt(struct nsinfo *nsi) nsinfo__refcnt() argument 217 nsinfo__delete(struct nsinfo *nsi) nsinfo__delete() argument 226 nsinfo__get(struct nsinfo *nsi) nsinfo__get() argument 236 nsinfo__put(struct nsinfo *nsi) nsinfo__put() argument 244 nsinfo__need_setns(const struct nsinfo *nsi) nsinfo__need_setns() argument 249 nsinfo__clear_need_setns(struct nsinfo *nsi) nsinfo__clear_need_setns() argument 254 nsinfo__tgid(const struct nsinfo *nsi) nsinfo__tgid() argument 259 nsinfo__nstgid(const struct nsinfo *nsi) nsinfo__nstgid() argument 264 nsinfo__pid(const struct nsinfo *nsi) nsinfo__pid() argument 269 nsinfo__in_pidns(const struct nsinfo *nsi) nsinfo__in_pidns() argument 274 nsinfo__mountns_enter(struct nsinfo *nsi, struct nscookie *nc) nsinfo__mountns_enter() argument 345 nsinfo__realpath(const char *path, struct nsinfo *nsi) nsinfo__realpath() argument 357 nsinfo__stat(const char *filename, struct stat *st, struct nsinfo *nsi) nsinfo__stat() argument [all...] |
H A D | namespaces.h | 49 int nsinfo__init(struct nsinfo *nsi); 51 struct nsinfo *nsinfo__copy(const struct nsinfo *nsi); 53 struct nsinfo *nsinfo__get(struct nsinfo *nsi); 54 void nsinfo__put(struct nsinfo *nsi); 56 bool nsinfo__need_setns(const struct nsinfo *nsi); 57 void nsinfo__clear_need_setns(struct nsinfo *nsi); 58 pid_t nsinfo__tgid(const struct nsinfo *nsi); 59 pid_t nsinfo__nstgid(const struct nsinfo *nsi); 60 pid_t nsinfo__pid(const struct nsinfo *nsi); 61 pid_t nsinfo__in_pidns(const struct nsinfo *nsi); [all...] |
H A D | copyfile.c | 14 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() 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() 73 copyfile_mode_ns(const char *from, const char *to, mode_t mode, struct nsinfo *nsi) copyfile_mode_ns() argument
|
H A D | build-id.c | 560 struct nsinfo *nsi, bool is_kallsyms, in build_id_cache__cachedir() 567 realname = nsinfo__realpath(name, nsi); in build_id_cache__cachedir() 578 int build_id_cache__list_build_ids(const char *pathname, struct nsinfo *nsi, in build_id_cache__list_build_ids() argument 584 dir_name = build_id_cache__cachedir(NULL, pathname, nsi, false, false); in build_id_cache__list_build_ids() 599 struct nsinfo *nsi) in build_id_cache__add_sdt_cache() 605 cache = probe_cache__new(sbuild_id, nsi); in build_id_cache__add_sdt_cache() 609 nsinfo__mountns_enter(nsi, &nsc); in build_id_cache__add_sdt_cache() 621 #define build_id_cache__add_sdt_cache(sbuild_id, realname, nsi) (0) 625 struct nsinfo *nsi, in build_id_cache__find_debug() 648 nsinfo__mountns_enter(nsi, in build_id_cache__find_debug() 559 build_id_cache__cachedir(const char *sbuild_id, const char *name, struct nsinfo *nsi, bool is_kallsyms, bool is_vdso) build_id_cache__cachedir() argument 597 build_id_cache__add_sdt_cache(const char *sbuild_id, const char *realname, struct nsinfo *nsi) build_id_cache__add_sdt_cache() argument 624 build_id_cache__find_debug(const char *sbuild_id, struct nsinfo *nsi, const char *root_dir) build_id_cache__find_debug() argument 678 build_id_cache__add(const char *sbuild_id, const char *name, const char *realname, struct nsinfo *nsi, bool is_kallsyms, bool is_vdso, const char *proper_name, const char *root_dir) build_id_cache__add() argument 800 __build_id_cache__add_s(const char *sbuild_id, const char *name, struct nsinfo *nsi, bool is_kallsyms, bool is_vdso, const char *proper_name, const char *root_dir) __build_id_cache__add_s() argument 824 build_id_cache__add_b(const struct build_id *bid, const char *name, struct nsinfo *nsi, bool is_kallsyms, bool is_vdso, const char *proper_name, const char *root_dir) build_id_cache__add_b() argument 888 filename__read_build_id_ns(const char *filename, struct build_id *bid, struct nsinfo *nsi) filename__read_build_id_ns() argument [all...] |
H A D | build-id.h | 58 struct nsinfo *nsi, bool is_kallsyms, 65 int build_id_cache__list_build_ids(const char *pathname, struct nsinfo *nsi, 69 struct nsinfo *nsi, bool is_kallsyms, bool is_vdso, 72 const char *name, struct nsinfo *nsi, 76 const char *name, struct nsinfo *nsi, in build_id_cache__add_s() 79 return __build_id_cache__add_s(sbuild_id, name, nsi, is_kallsyms, is_vdso, NULL, NULL); in build_id_cache__add_s() 75 build_id_cache__add_s(const char *sbuild_id, const char *name, struct nsinfo *nsi, bool is_kallsyms, bool is_vdso) build_id_cache__add_s() argument
|
H A D | jitdump.c | 39 struct nsinfo *nsi; member 88 nsinfo__mountns_enter(jd->nsi, &nsc); in jit_emit_elf() 103 nsinfo__mountns_enter(jd->nsi, &nsc); in jit_emit_elf() 146 nsinfo__mountns_enter(jd->nsi, &nsc); in jit_open() 380 if (jd->nsi && nsinfo__in_pidns(jd->nsi)) in jr_entry_pid() 381 return nsinfo__tgid(jd->nsi); in jr_entry_pid() 387 if (jd->nsi && nsinfo__in_pidns(jd->nsi)) in jr_entry_tid() 388 return nsinfo__pid(jd->nsi); in jr_entry_tid() 739 jit_detect(char *mmap_name, pid_t pid, struct nsinfo *nsi) jit_detect() argument 829 struct nsinfo *nsi; jit_process() local [all...] |
H A D | probe-event.h | 105 struct nsinfo *nsi; /* Target namespace */ member 178 struct nsinfo *nsi, bool user); 181 int show_available_funcs(const char *module, struct nsinfo *nsi, 196 struct map *get_target_map(const char *target, struct nsinfo *nsi, bool user);
|
H A D | map.c | 125 struct nsinfo *nsi = NULL; in map__new() local 140 nsi = nsinfo__get(thread__nsinfo(thread)); in map__new() 142 if ((anon || no_dso) && nsi && (prot & PROT_EXEC)) { in map__new() 144 "/tmp/perf-%d.map", nsinfo__pid(nsi)); in map__new() 158 nnsi = nsinfo__copy(nsi); in map__new() 160 nsinfo__put(nsi); in map__new() 162 nsi = nnsi; in map__new() 187 dso->nsinfo = nsi; in map__new() 211 nsinfo__put(nsi); in map__new()
|
H A D | probe-file.h | 55 struct probe_cache *probe_cache__new(const char *target, struct nsinfo *nsi); 77 static inline struct probe_cache *probe_cache__new(const char *tgt __maybe_unused, struct nsinfo *nsi __maybe_unused) in probe_cache__new()
|
H A D | probe-event.c | 182 struct map *get_target_map(const char *target, struct nsinfo *nsi, bool user) in get_target_map() argument 194 dso->nsinfo = nsinfo__get(nsi); in get_target_map() 379 const char *target, struct nsinfo *nsi, in find_alternative_probe_point() 392 map = get_target_map(target, nsi, uprobes); in find_alternative_probe_point() 440 pev->nsi, pev->uprobes); in get_alternative_probe_event() 475 static struct debuginfo *open_from_debuginfod(struct dso *dso, struct nsinfo *nsi, in open_from_debuginfod() argument 502 nsinfo__mountns_enter(nsi, &nsc); in open_from_debuginfod() 510 struct nsinfo *nsi __maybe_unused, in open_from_debuginfod() 518 static struct debuginfo *open_debuginfo(const char *module, struct nsinfo *nsi, in open_debuginfo() argument 537 ret = open_from_debuginfod(dso, nsi, silen in open_debuginfo() 376 find_alternative_probe_point(struct debuginfo *dinfo, struct perf_probe_point *pp, struct perf_probe_point *result, const char *target, struct nsinfo *nsi, bool uprobes) find_alternative_probe_point() argument 603 get_text_start_address(const char *exec, u64 *address, struct nsinfo *nsi) get_text_start_address() argument 755 add_exec_to_probe_trace_events(struct probe_trace_event *tevs, int ntevs, const char *exec, struct nsinfo *nsi) add_exec_to_probe_trace_events() argument 1129 show_line_range(struct line_range *lr, const char *module, struct nsinfo *nsi, bool user) show_line_range() argument 3750 show_available_funcs(const char *target, struct nsinfo *nsi, struct strfilter *_filter, bool user) show_available_funcs() argument [all...] |
/kernel/linux/linux-5.10/tools/perf/util/ |
H A D | namespaces.c | 63 int nsinfo__init(struct nsinfo *nsi) in nsinfo__init() argument 78 if (asprintf(&newns, "/proc/%d/ns/mnt", nsi->pid) == -1) in nsinfo__init() 91 nsi->need_setns = true; in nsinfo__init() 92 nsi->mntns_path = newns; in nsinfo__init() 99 if (snprintf(spath, PATH_MAX, "/proc/%d/status", nsi->pid) >= PATH_MAX) in nsinfo__init() 109 nsi->tgid = (pid_t)strtol(strrchr(statln, '\t'), in nsinfo__init() 111 nsi->nstgid = nsi->tgid; in nsinfo__init() 115 nsi->nstgid = (pid_t)strtol(strrchr(statln, '\t'), in nsinfo__init() 132 struct nsinfo *nsi; in nsinfo__new() local 156 nsinfo__copy(struct nsinfo *nsi) nsinfo__copy() argument 182 nsinfo__delete(struct nsinfo *nsi) nsinfo__delete() argument 188 nsinfo__get(struct nsinfo *nsi) nsinfo__get() argument 195 nsinfo__put(struct nsinfo *nsi) nsinfo__put() argument 201 nsinfo__mountns_enter(struct nsinfo *nsi, struct nscookie *nc) nsinfo__mountns_enter() argument 272 nsinfo__realpath(const char *path, struct nsinfo *nsi) nsinfo__realpath() argument [all...] |
H A D | namespaces.h | 46 int nsinfo__init(struct nsinfo *nsi); 48 struct nsinfo *nsinfo__copy(struct nsinfo *nsi); 49 void nsinfo__delete(struct nsinfo *nsi); 51 struct nsinfo *nsinfo__get(struct nsinfo *nsi); 52 void nsinfo__put(struct nsinfo *nsi); 54 void nsinfo__mountns_enter(struct nsinfo *nsi, struct nscookie *nc); 57 char *nsinfo__realpath(const char *path, struct nsinfo *nsi); 67 #define nsinfo__zput(nsi) __nsinfo__zput(&nsi)
|
H A D | copyfile.c | 14 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() 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() 73 copyfile_mode_ns(const char *from, const char *to, mode_t mode, struct nsinfo *nsi) copyfile_mode_ns() argument
|
H A D | build-id.c | 555 struct nsinfo *nsi, bool is_kallsyms, in build_id_cache__cachedir() 562 realname = nsinfo__realpath(name, nsi); in build_id_cache__cachedir() 578 int build_id_cache__list_build_ids(const char *pathname, struct nsinfo *nsi, in build_id_cache__list_build_ids() argument 584 dir_name = build_id_cache__cachedir(NULL, pathname, nsi, false, false); in build_id_cache__list_build_ids() 599 struct nsinfo *nsi) in build_id_cache__add_sdt_cache() 605 cache = probe_cache__new(sbuild_id, nsi); in build_id_cache__add_sdt_cache() 609 nsinfo__mountns_enter(nsi, &nsc); in build_id_cache__add_sdt_cache() 621 #define build_id_cache__add_sdt_cache(sbuild_id, realname, nsi) (0) 625 struct nsinfo *nsi) in build_id_cache__find_debug() 641 nsinfo__mountns_enter(nsi, in build_id_cache__find_debug() 554 build_id_cache__cachedir(const char *sbuild_id, const char *name, struct nsinfo *nsi, bool is_kallsyms, bool is_vdso) build_id_cache__cachedir() argument 597 build_id_cache__add_sdt_cache(const char *sbuild_id, const char *realname, struct nsinfo *nsi) build_id_cache__add_sdt_cache() argument 624 build_id_cache__find_debug(const char *sbuild_id, struct nsinfo *nsi) build_id_cache__find_debug() argument 666 build_id_cache__add_s(const char *sbuild_id, const char *name, struct nsinfo *nsi, bool is_kallsyms, bool is_vdso) build_id_cache__add_s() argument 775 build_id_cache__add_b(const struct build_id *bid, const char *name, struct nsinfo *nsi, bool is_kallsyms, bool is_vdso) build_id_cache__add_b() argument [all...] |
H A D | probe-event.h | 104 struct nsinfo *nsi; /* Target namespace */ member 177 struct nsinfo *nsi, bool user); 180 int show_available_funcs(const char *module, struct nsinfo *nsi, 195 struct map *get_target_map(const char *target, struct nsinfo *nsi, bool user);
|
H A D | build-id.h | 50 struct nsinfo *nsi, bool is_kallsyms, 57 int build_id_cache__list_build_ids(const char *pathname, struct nsinfo *nsi, 61 const char *name, struct nsinfo *nsi,
|
H A D | probe-file.h | 55 struct probe_cache *probe_cache__new(const char *target, struct nsinfo *nsi); 77 static inline struct probe_cache *probe_cache__new(const char *tgt __maybe_unused, struct nsinfo *nsi __maybe_unused) in probe_cache__new()
|
H A D | map.c | 136 struct nsinfo *nsi = NULL; in map__new() local 150 nsi = nsinfo__get(thread->nsinfo); in map__new() 152 if ((anon || no_dso) && nsi && (prot & PROT_EXEC)) { in map__new() 154 "/tmp/perf-%d.map", nsi->pid); in map__new() 168 nnsi = nsinfo__copy(nsi); in map__new() 170 nsinfo__put(nsi); in map__new() 172 nsi = nnsi; in map__new() 195 dso->nsinfo = nsi; in map__new() 200 nsinfo__put(nsi); in map__new()
|
H A D | probe-event.c | 176 struct map *get_target_map(const char *target, struct nsinfo *nsi, bool user) in get_target_map() argument 185 map->dso->nsinfo = nsinfo__get(nsi); in get_target_map() 369 const char *target, struct nsinfo *nsi, in find_alternative_probe_point() 381 map = get_target_map(target, nsi, uprobes); in find_alternative_probe_point() 430 pev->nsi, pev->uprobes); in get_alternative_probe_event() 465 static struct debuginfo *open_from_debuginfod(struct dso *dso, struct nsinfo *nsi, in open_from_debuginfod() argument 492 nsinfo__mountns_enter(nsi, &nsc); in open_from_debuginfod() 500 struct nsinfo *nsi __maybe_unused, in open_from_debuginfod() 508 static struct debuginfo *open_debuginfo(const char *module, struct nsinfo *nsi, in open_debuginfo() argument 527 ret = open_from_debuginfod(dso, nsi, silen in open_debuginfo() 366 find_alternative_probe_point(struct debuginfo *dinfo, struct perf_probe_point *pp, struct perf_probe_point *result, const char *target, struct nsinfo *nsi, bool uprobes) find_alternative_probe_point() argument 593 get_text_start_address(const char *exec, unsigned long *address, struct nsinfo *nsi) get_text_start_address() argument 741 add_exec_to_probe_trace_events(struct probe_trace_event *tevs, int ntevs, const char *exec, struct nsinfo *nsi) add_exec_to_probe_trace_events() argument 1101 show_line_range(struct line_range *lr, const char *module, struct nsinfo *nsi, bool user) show_line_range() argument 3608 show_available_funcs(const char *target, struct nsinfo *nsi, struct strfilter *_filter, bool user) show_available_funcs() argument [all...] |
H A D | copyfile.h | 13 int copyfile_ns(const char *from, const char *to, struct nsinfo *nsi);
|
/kernel/linux/linux-5.10/tools/perf/ |
H A D | builtin-buildid-cache.c | 174 static int build_id_cache__add_file(const char *filename, struct nsinfo *nsi) in build_id_cache__add_file() argument 181 nsinfo__mountns_enter(nsi, &nsc); in build_id_cache__add_file() 190 err = build_id_cache__add_s(sbuild_id, filename, nsi, in build_id_cache__add_file() 197 static int build_id_cache__remove_file(const char *filename, struct nsinfo *nsi) in build_id_cache__remove_file() argument 205 nsinfo__mountns_enter(nsi, &nsc); in build_id_cache__remove_file() 221 static int build_id_cache__purge_path(const char *pathname, struct nsinfo *nsi) in build_id_cache__purge_path() argument 227 err = build_id_cache__list_build_ids(pathname, nsi, &list); in build_id_cache__purge_path() 300 static int build_id_cache__update_file(const char *filename, struct nsinfo *nsi) in build_id_cache__update_file() argument 308 nsinfo__mountns_enter(nsi, &nsc); in build_id_cache__update_file() 322 err = build_id_cache__add_s(sbuild_id, filename, nsi, fals in build_id_cache__update_file() 373 struct nsinfo *nsi = NULL; cmd_buildid_cache() local [all...] |
H A D | builtin-probe.c | 49 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() 220 params.nsi = nsinfo__get(nsip); in opt_set_target_ns() 321 nsinfo__put(params.nsi); in cleanup_params() 664 ret = show_available_funcs(params.target, params.nsi, in __cmd_probe() 672 params.nsi, params.uprobes); in __cmd_probe()
|
H A D | builtin-inject.c | 331 struct nsinfo *nsi = NULL; in findnew_dso() local 343 nsi = nsinfo__get(thread->nsinfo); in findnew_dso() 350 nnsi = nsinfo__copy(nsi); in findnew_dso() 352 nsinfo__put(nsi); in findnew_dso() 354 nsi = nnsi; in findnew_dso() 363 dso->nsinfo = nsi; in findnew_dso() 365 nsinfo__put(nsi); in findnew_dso()
|
/kernel/linux/linux-6.6/tools/perf/ |
H A D | builtin-buildid-cache.c | 175 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() 301 static int build_id_cache__update_file(const char *filename, struct nsinfo *nsi) in build_id_cache__update_file() argument 309 nsinfo__mountns_enter(nsi, &nsc); in build_id_cache__update_file() 323 err = build_id_cache__add_s(sbuild_id, filename, nsi, fals in build_id_cache__update_file() 388 struct nsinfo *nsi = NULL; cmd_buildid_cache() local [all...] |
H A D | builtin-probe.c | 49 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() 220 params->nsi = nsinfo__get(nsip); in opt_set_target_ns() 330 nsinfo__put(params->nsi); in cleanup_params() 692 ret = show_available_funcs(params->target, params->nsi, in __cmd_probe() 700 params->nsi, params->uprobes); in __cmd_probe()
|