diff --git a/src/rvprof_internal.h b/src/rvprof_internal.h index 1174808..767b449 100644 --- a/src/rvprof_internal.h +++ b/src/rvprof_internal.h @@ -98,6 +98,33 @@ typedef struct { char* program_name; } 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 } #endif