Lines Matching refs:pid
450 static int parse_vma_segs(int pid, const char *lib_path, struct elf_seg **segs, size_t *seg_cnt) in parse_vma_segs() argument
464 if (sscanf(lib_path, "/proc/%d/root%s", &tmp_pid, path) == 2 && pid == tmp_pid) in parse_vma_segs()
474 sprintf(line, "/proc/%d/maps", pid); in parse_vma_segs()
528 lib_path, path, pid); in parse_vma_segs()
578 static int collect_usdt_targets(struct usdt_manager *man, Elf *elf, const char *path, pid_t pid, in collect_usdt_targets() argument
701 if (pid < 0) { in collect_usdt_targets()
709 err = parse_vma_segs(pid, path, &vma_segs, &vma_seg_cnt); in collect_usdt_targets()
712 pid, path, err); in collect_usdt_targets()
956 pid_t pid, const char *path, in usdt_manager_attach_usdt() argument
982 if (pid < 0) in usdt_manager_attach_usdt()
983 pid = -1; in usdt_manager_attach_usdt()
984 else if (pid == 0) in usdt_manager_attach_usdt()
985 pid = getpid(); in usdt_manager_attach_usdt()
990 err = collect_usdt_targets(man, elf_fd.elf, path, pid, usdt_provider, usdt_name, in usdt_manager_attach_usdt()
1075 uprobe_link = bpf_program__attach_uprobe_opts(prog, pid, path, in usdt_manager_attach_usdt()
1098 link->multi_link = bpf_program__attach_uprobe_multi(prog, pid, path, in usdt_manager_attach_usdt()