Add symbol and region entry structs

This commit is contained in:
Patrick Lipka 2025-08-07 15:50:29 +02:00
parent 57bc0cec52
commit 88171d0d6e
1 changed files with 21 additions and 1 deletions

View File

@ -30,7 +30,27 @@ typedef enum {
RVPROF_ERROR_INVALID_STATE = -4, RVPROF_ERROR_INVALID_STATE = -4,
RVPROF_ERROR_STACK_OVERFLOW = -5, RVPROF_ERROR_STACK_OVERFLOW = -5,
RVPROF_ERROR_STACK_UNDERFLOW = -6 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 #ifdef __cplusplus