void frm_spatial_report_config_read(struct config_t *config) { char *section; char *file_name; /*Nothing if section or config is not present */ section = frm_spatial_report_section_name; if (!config_section_exists(config, section)) { /*no spatial profiling */ return; } /* Spatial reports are active */ frm_spatial_report_active = 1; /* Interval */ config_var_enforce(config, section, "Interval"); spatial_profiling_interval = config_read_int(config, section, "Interval", spatial_profiling_interval); /* File name */ config_var_enforce(config, section, "File"); file_name = config_read_string(config, section, "File", NULL); if (!file_name || !*file_name) fatal("%s: %s: invalid or missing value for 'File'", frm_spatial_report_section_name, section); spatial_report_filename = str_set(NULL, file_name); spatial_report_file = file_open_for_write(spatial_report_filename); if (!spatial_report_file) fatal("%s: could not open spatial report file", spatial_report_filename); }
void evg_spatial_report_config_read(struct config_t *config) { char *section; /* Nothing if section or config is not present */ section = evg_spatial_report_section_name; if (!config_section_exists(config, section)) { /*no spatial profiling */ return; } /* Spatial reports are active */ evg_spatial_report_active = 1; /* Interval */ config_var_enforce(config, section, "Interval"); spatial_profiling_interval = config_read_int(config, section, "Interval", spatial_profiling_interval); spatial_report_file = file_open_for_write(spatial_report_filename); if (!spatial_report_file) fatal("%s: could not open spatial report file", spatial_report_filename); // FILE *f = spatial_report_file ; /*fprintf(f,"CU,CFInst,MemAcc,TEXInstn,ALUInstn,Cycles\n");*/ }