Lines Matching refs:refs
34 struct obj_refs *refs; in add_ref() local
40 refs = entry->value; 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()
82 err = hashmap__append(map, u32_as_hash_field(e->id), refs); in add_ref()
184 struct obj_refs *refs = entry->value; in delete_obj_refs_table() local
186 free(refs->refs); in delete_obj_refs_table()
187 free(refs); in delete_obj_refs_table()
202 struct obj_refs *refs = entry->value; in emit_obj_refs_json() local
205 if (refs->ref_cnt == 0) in emit_obj_refs_json()
210 for (i = 0; i < refs->ref_cnt; i++) { in emit_obj_refs_json()
211 struct obj_ref *ref = &refs->refs[i]; in emit_obj_refs_json()
231 struct obj_refs *refs = entry->value; in emit_obj_refs_plain() local
234 if (refs->ref_cnt == 0) in emit_obj_refs_plain()
238 for (i = 0; i < refs->ref_cnt; i++) { in emit_obj_refs_plain()
239 struct obj_ref *ref = &refs->refs[i]; in emit_obj_refs_plain()