Lines Matching refs:records

69 static records_t records;  variable
139 records.buffer = record_buffer; in heap_trace_init_standalone()
140 records.capacity = num_records; in heap_trace_init_standalone()
156 if (records.buffer == NULL || records.capacity == 0) { in heap_trace_start()
166 memset(records.buffer, 0, sizeof(heap_trace_record_t) * records.capacity); in heap_trace_start()
177 records.count = 0; in heap_trace_start()
178 records.has_overflowed = false; in heap_trace_start()
208 return records.count; in heap_trace_get_count()
221 if (index >= records.count) { in heap_trace_get()
237 r_get = TAILQ_FIRST(&records.list); in heap_trace_get()
270 summary->count = records.count; in heap_trace_summary()
271 summary->capacity = records.capacity; in heap_trace_summary()
272 summary->high_water_mark = records.high_water_mark; in heap_trace_summary()
273 summary->has_overflowed = records.has_overflowed; in heap_trace_summary()
297 size_t start_count = records.count; in heap_trace_dump_base()
300 records.count, records.capacity); in heap_trace_dump_base()
304 heap_trace_record_t *r_cur = TAILQ_FIRST(&records.list); in heap_trace_dump_base()
306 for (int i = 0; i < records.count; i++) { in heap_trace_dump_base()
365 records.count, records.capacity, records.high_water_mark); in heap_trace_dump_base()
375 if (start_count != records.count) { // only a problem if trace isn't stopped before dumping in heap_trace_dump_base()
378 if (records.has_overflowed) { in heap_trace_dump_base()
398 if (records.count == records.capacity) { in record_allocation()
400 records.has_overflowed = true; in record_allocation()
402 heap_trace_record_t *r_first = TAILQ_FIRST(&records.list); in record_allocation()
432 if (records.count == 0) { in record_free()
462 TAILQ_INIT(&records.list); in list_setup()
463 TAILQ_INIT(&records.unused); in list_setup()
465 for (int i = 0; i < records.capacity; i++) { in list_setup()
467 heap_trace_record_t *r_cur = &records.buffer[i]; in list_setup()
469 TAILQ_INSERT_TAIL(&records.unused, r_cur, tailq_list); in list_setup()
477 assert(records.count > 0); in list_remove()
484 TAILQ_REMOVE(&records.list, r_remove, tailq_list); in list_remove()
491 TAILQ_INSERT_HEAD(&records.unused, r_remove, tailq_list); in list_remove()
494 records.count--; in list_remove()
502 if (records.count >= records.capacity) { in list_pop_unused()
507 heap_trace_record_t *r_unused = TAILQ_FIRST(&records.unused); in list_pop_unused()
512 TAILQ_REMOVE(&records.unused, r_unused, tailq_list); in list_pop_unused()
532 if (records.count < records.capacity) { in list_add()
545 TAILQ_INSERT_TAIL(&records.list, r_dest, tailq_list); in list_add()
548 records.count++; in list_add()
551 if (records.count > records.high_water_mark) { in list_add()
552 records.high_water_mark = records.count; in list_add()
562 records.has_overflowed = true; in list_add()
584 TAILQ_FOREACH(r_cur, &records.list, tailq_list) { in list_find_address_reverse()