Add symbol and region entry structs
This commit is contained in:
parent
57bc0cec52
commit
88171d0d6e
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue