Lines Matching full:refs
34 struct obj_refs *refs; in add_ref() local
40 refs = entry->pvalue; in add_ref()
42 for (i = 0; i < refs->ref_cnt; i++) { in add_ref()
43 if (refs->refs[i].pid == e->pid) in add_ref()
47 tmp = realloc(refs->refs, (refs->ref_cnt + 1) * sizeof(*ref)); in add_ref()
53 refs->refs = tmp; in add_ref()
54 ref = &refs->refs[refs->ref_cnt]; in add_ref()
57 refs->ref_cnt++; in add_ref()
63 refs = calloc(1, sizeof(*refs)); in add_ref()
64 if (!refs) { in add_ref()
70 refs->refs = malloc(sizeof(*refs->refs)); in add_ref()
71 if (!refs->refs) { in add_ref()
72 free(refs); in add_ref()
77 ref = &refs->refs[0]; in add_ref()
80 refs->ref_cnt = 1; in add_ref()
81 refs->has_bpf_cookie = e->has_bpf_cookie; in add_ref()
82 refs->bpf_cookie = e->bpf_cookie; in add_ref()
84 err = hashmap__append(map, e->id, refs); in add_ref()
191 struct obj_refs *refs = entry->pvalue; in delete_obj_refs_table() local
193 free(refs->refs); in delete_obj_refs_table()
194 free(refs); in delete_obj_refs_table()
209 struct obj_refs *refs = entry->pvalue; in emit_obj_refs_json() local
212 if (refs->ref_cnt == 0) in emit_obj_refs_json()
215 if (refs->has_bpf_cookie) in emit_obj_refs_json()
216 jsonw_lluint_field(json_writer, "bpf_cookie", refs->bpf_cookie); in emit_obj_refs_json()
220 for (i = 0; i < refs->ref_cnt; i++) { in emit_obj_refs_json()
221 struct obj_ref *ref = &refs->refs[i]; in emit_obj_refs_json()
241 struct obj_refs *refs = entry->pvalue; in emit_obj_refs_plain() local
244 if (refs->ref_cnt == 0) in emit_obj_refs_plain()
247 if (refs->has_bpf_cookie) in emit_obj_refs_plain()
248 printf("\n\tbpf_cookie %llu", (unsigned long long) refs->bpf_cookie); in emit_obj_refs_plain()
251 for (i = 0; i < refs->ref_cnt; i++) { in emit_obj_refs_plain()
252 struct obj_ref *ref = &refs->refs[i]; in emit_obj_refs_plain()