add global context struct
This commit is contained in:
parent
add6bd5fc8
commit
f858647ad1
|
@ -98,6 +98,33 @@ typedef struct {
|
||||||
char* program_name;
|
char* program_name;
|
||||||
} rvprof_config_t;
|
} rvprof_config_t;
|
||||||
|
|
||||||
|
// global context
|
||||||
|
typedef struct{
|
||||||
|
rvprof_config_t config;
|
||||||
|
|
||||||
|
// cycle counter info
|
||||||
|
int use_cycles;
|
||||||
|
int cycles_avaiable;
|
||||||
|
|
||||||
|
// dynamic arrays
|
||||||
|
region_array_t regions;
|
||||||
|
stack_info_array_t stacks;
|
||||||
|
symbol_array_t symbols;
|
||||||
|
|
||||||
|
// state
|
||||||
|
int initialized;
|
||||||
|
int auto_initialized;
|
||||||
|
int symbols_loaded;
|
||||||
|
int stack_ptr;
|
||||||
|
FILE* output_file;
|
||||||
|
|
||||||
|
// statistics
|
||||||
|
uint64_t total_program_tiem;
|
||||||
|
uint64_t total_program_cycles;
|
||||||
|
size_t total_memory_allocated;
|
||||||
|
|
||||||
|
} rvprof_context_t;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue