Lines Matching refs: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()
186 struct obj_refs *refs = entry->pvalue; in delete_obj_refs_table() local
188 free(refs->refs); in delete_obj_refs_table()
189 free(refs); in delete_obj_refs_table()
204 struct obj_refs *refs = entry->pvalue; in emit_obj_refs_json() local
207 if (refs->ref_cnt == 0) in emit_obj_refs_json()
210 if (refs->has_bpf_cookie) in emit_obj_refs_json()
211 jsonw_lluint_field(json_writer, "bpf_cookie", refs->bpf_cookie); in emit_obj_refs_json()
215 for (i = 0; i < refs->ref_cnt; i++) { in emit_obj_refs_json()
216 struct obj_ref *ref = &refs->refs[i]; in emit_obj_refs_json()
236 struct obj_refs *refs = entry->pvalue; in emit_obj_refs_plain() local
239 if (refs->ref_cnt == 0) in emit_obj_refs_plain()
242 if (refs->has_bpf_cookie) in emit_obj_refs_plain()
243 printf("\n\tbpf_cookie %llu", (unsigned long long) refs->bpf_cookie); in emit_obj_refs_plain()
246 for (i = 0; i < refs->ref_cnt; i++) { in emit_obj_refs_plain()
247 struct obj_ref *ref = &refs->refs[i]; in emit_obj_refs_plain()