add missinng context initialization
This commit is contained in:
parent
41a7eccad3
commit
d1442c7655
|
@ -1,5 +1,23 @@
|
|||
#include "rvprof_internal.h"
|
||||
|
||||
// initialize with basic defaults - environment variables will override these
|
||||
rvprof_context_t g_rvprof = {
|
||||
.config = {
|
||||
.enable_hooks = 1, // Default: enable hooks
|
||||
.merge_regions = 1, // Default: merge regions
|
||||
.output_filename = NULL, // Auto-generate
|
||||
.program_name = NULL // Auto-detect
|
||||
},
|
||||
.use_cycles = 1, // Try cycle counter first
|
||||
.stack_ptr = -1, // No active regions
|
||||
.initialized = 0, // Not initialized
|
||||
.auto_initialized = 0, // Not auto-initialized
|
||||
.symbols_loaded = 0, // No symbols loaded
|
||||
.total_program_time = 0,
|
||||
.total_program_cycles = 0,
|
||||
.total_memory_allocated = 0
|
||||
};
|
||||
|
||||
void rvprof_context_cleanup(void){
|
||||
if (!g_rvprof.initialized) {
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue