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()
58 refs->ref_cnt++; in add_ref()
64 refs = calloc(1, sizeof(*refs)); in add_ref()
65 if (!refs) { in add_ref()
71 refs->refs = malloc(sizeof(*refs->refs)); in add_ref()
72 if (!refs->refs) { in add_ref()
73 free(refs); in add_ref()
78 ref = &refs->refs[0]; in add_ref()
82 refs->ref_cnt = 1; in add_ref()
83 refs->has_bpf_cookie = e->has_bpf_cookie; in add_ref()
84 refs->bpf_cookie = e->bpf_cookie; in add_ref()
86 err = hashmap__append(map, e->id, refs); in add_ref()
193 struct obj_refs *refs = entry->pvalue; in delete_obj_refs_table() local
195 free(refs->refs); in delete_obj_refs_table()
196 free(refs); in delete_obj_refs_table()
211 struct obj_refs *refs = entry->pvalue; in emit_obj_refs_json() local
214 if (refs->ref_cnt == 0) in emit_obj_refs_json()
217 if (refs->has_bpf_cookie) in emit_obj_refs_json()
218 jsonw_lluint_field(json_writer, "bpf_cookie", refs->bpf_cookie); in emit_obj_refs_json()
222 for (i = 0; i < refs->ref_cnt; i++) { in emit_obj_refs_json()
223 struct obj_ref *ref = &refs->refs[i]; in emit_obj_refs_json()
243 struct obj_refs *refs = entry->pvalue; in emit_obj_refs_plain() local
246 if (refs->ref_cnt == 0) in emit_obj_refs_plain()
249 if (refs->has_bpf_cookie) in emit_obj_refs_plain()
250 printf("\n\tbpf_cookie %llu", (unsigned long long) refs->bpf_cookie); in emit_obj_refs_plain()
253 for (i = 0; i < refs->ref_cnt; i++) { in emit_obj_refs_plain()
254 struct obj_ref *ref = &refs->refs[i]; in emit_obj_refs_plain()