Lines Matching defs:link
289 * Detect kernel support for uprobe multi link to be used for attaching
646 * will only ever have one of these sections in a final link and it
651 * Each probe note records the link-time address of the .stapsdt.base
805 struct bpf_link link;
815 struct bpf_link *link;
821 static int bpf_link_usdt_detach(struct bpf_link *link)
823 struct bpf_link_usdt *usdt_link = container_of(link, struct bpf_link_usdt, link);
831 /* detach underlying uprobe link */
832 bpf_link__destroy(usdt_link->uprobes[i].link);
881 static void bpf_link_usdt_dealloc(struct bpf_link *link)
883 struct bpf_link_usdt *usdt_link = container_of(link, struct bpf_link_usdt, link);
901 struct bpf_link_usdt *link, struct usdt_target *target,
916 * returned back to usdt_manager when USDT link is detached
918 new_ids = libbpf_reallocarray(link->spec_ids, link->spec_cnt + 1, sizeof(*link->spec_ids));
921 link->spec_ids = new_ids;
948 /* remember new spec ID in the link for later return back to free list on detach */
949 link->spec_ids[link->spec_cnt] = *spec_id;
950 link->spec_cnt++;
964 struct bpf_link_usdt *link = NULL;
1003 link = calloc(1, sizeof(*link));
1004 if (!link) {
1009 link->usdt_man = man;
1010 link->link.detach = &bpf_link_usdt_detach;
1011 link->link.dealloc = &bpf_link_usdt_dealloc;
1023 link->uprobes = calloc(target_cnt, sizeof(*link->uprobes));
1024 if (!link->uprobes) {
1044 err = allocate_spec_id(man, specs_hash, link, target, &spec_id, &is_new);
1084 link->uprobes[i].link = uprobe_link;
1085 link->uprobes[i].abs_ip = target->abs_ip;
1086 link->uprobe_cnt++;
1098 link->multi_link = bpf_program__attach_uprobe_multi(prog, pid, path,
1100 if (!link->multi_link) {
1115 return &link->link;
1122 if (link)
1123 bpf_link__destroy(&link->link);