From 88171d0d6eda5ac05c1e205659f10ef72c5c3947 Mon Sep 17 00:00:00 2001 From: Patrick Lipka Date: Thu, 7 Aug 2025 15:50:29 +0200 Subject: [PATCH] Add symbol and region entry structs --- src/rvprof_internal.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/rvprof_internal.h b/src/rvprof_internal.h index af6dde0..75d4971 100644 --- a/src/rvprof_internal.h +++ b/src/rvprof_internal.h @@ -30,7 +30,27 @@ typedef enum { RVPROF_ERROR_INVALID_STATE = -4, RVPROF_ERROR_STACK_OVERFLOW = -5, RVPROF_ERROR_STACK_UNDERFLOW = -6 -} rvprof_error_t +} rvprof_error_t; + +// symbol table entry +typedef struct{ + uintptr_t addr; + char name[MAX_NAME_LEN]; + size_t size; +} symbol_entry_t; + +// region stack entry +typedef struct { + char name[MAX_NAME_LEN]; + uint64_t start_cycles; + uint64_t start_time_ns; + int depth; + int function_id; + int stack_id; + uint64_t child_time; + uint64_t child_cycles; + void* func_addr +} region_t; #ifdef __cplusplus