add missing function metadata stats

This commit is contained in:
Patrick Lipka 2025-08-18 18:42:43 +02:00
parent 9f0fc2bf3f
commit 79c2696637
1 changed files with 13 additions and 0 deletions

View File

@ -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");
}
}