From 79c2696637be9ef4b8090767853d743cfc0cfbda Mon Sep 17 00:00:00 2001 From: Patrick Lipka Date: Mon, 18 Aug 2025 18:42:43 +0200 Subject: [PATCH] add missing function metadata stats --- src/rvprof_stats.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/rvprof_stats.c b/src/rvprof_stats.c index 9126f40..cb89c20 100644 --- a/src/rvprof_stats.c +++ b/src/rvprof_stats.c @@ -70,4 +70,17 @@ int rvprof_stats_get_or_create_stack_id(void) { g_rvprof.stacks.size++; return stack_id; +} + +// function metadata +void rvprof_stats_add_stack_id_to_function(int func_id, int stack_id) { + if (rvprof_memory_add_stack_id_to_function(func_id, stack_id) != RVPROF_SUCCESS) { + fprintf(stderr, "rvprof: Failed to add stack ID to function\n"); + } +} + +void rvprof_stats_add_caller_to_function(int func_id, const char* caller) { + if (rvprof_memory_add_caller_to_function(func_id, caller) != RVPROF_SUCCESS) { + fprintf(stderr, "rvprof: Failed to add caller to function\n"); + } } \ No newline at end of file