Lines Matching refs:refs
33 struct obj_refs *refs; in add_ref() local
39 refs = entry->value; in add_ref()
41 for (i = 0; i < refs->ref_cnt; i++) { in add_ref()
42 if (refs->refs[i].pid == e->pid) in add_ref()
46 tmp = realloc(refs->refs, (refs->ref_cnt + 1) * sizeof(*ref)); in add_ref()
52 refs->refs = tmp; in add_ref()
53 ref = &refs->refs[refs->ref_cnt]; in add_ref()
56 refs->ref_cnt++; in add_ref()
62 refs = calloc(1, sizeof(*refs)); in add_ref()
63 if (!refs) { in add_ref()
69 refs->refs = malloc(sizeof(*refs->refs)); in add_ref()
70 if (!refs->refs) { in add_ref()
71 free(refs); in add_ref()
76 ref = &refs->refs[0]; in add_ref()
79 refs->ref_cnt = 1; in add_ref()
81 err = hashmap__append(map, u32_as_hash_field(e->id), refs); in add_ref()
183 struct obj_refs *refs = entry->value; in delete_obj_refs_table() local
185 free(refs->refs); in delete_obj_refs_table()
186 free(refs); in delete_obj_refs_table()
201 struct obj_refs *refs = entry->value; in emit_obj_refs_json() local
204 if (refs->ref_cnt == 0) in emit_obj_refs_json()
209 for (i = 0; i < refs->ref_cnt; i++) { in emit_obj_refs_json()
210 struct obj_ref *ref = &refs->refs[i]; in emit_obj_refs_json()
230 struct obj_refs *refs = entry->value; in emit_obj_refs_plain() local
233 if (refs->ref_cnt == 0) in emit_obj_refs_plain()
237 for (i = 0; i < refs->ref_cnt; i++) { in emit_obj_refs_plain()
238 struct obj_ref *ref = &refs->refs[i]; in emit_obj_refs_plain()