diff --git a/src/rvprof_context.c b/src/rvprof_context.c index c4e5864..e80d43f 100644 --- a/src/rvprof_context.c +++ b/src/rvprof_context.c @@ -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;