From 88ce871058163d12411ed6f0c6bf4d4df6d861d3 Mon Sep 17 00:00:00 2001 From: Patrick Lipka Date: Thu, 7 Aug 2025 15:55:37 +0200 Subject: [PATCH] Add function stats struct --- src/rvprof_internal.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/rvprof_internal.h b/src/rvprof_internal.h index 7681045..c8457ff 100644 --- a/src/rvprof_internal.h +++ b/src/rvprof_internal.h @@ -52,6 +52,24 @@ typedef struct { void* func_addr; } region_t; +// function stats +typedef struct { + char name [MAX_NAME_LEN]; + char caller [MAX_NAME_LEN]; + uint64_t total_inclusive_time; + uint64_t total_exclusive_time; + uint64_t total_inclusive_cycles; + uint64_t total_exclusive_cycles; + uint64_t call_count; + int* stack_ids; + int num_stack_ids; + int max_stack_ids; + char** callers; + int num_callers; + int max_callers; + double exclusive_percent; + double inclusive_percent; +} function_stats_t; #ifdef __cplusplus }