Lines Matching refs:outfp
326 FILE *outfp; member
341 FILE *outfp = pd->outfp; in print_events_table_entry() local
348 fprintf(outfp, "{\n"); in print_events_table_entry()
351 fprintf(outfp, "\t.name = \"%s\",\n", je->name); in print_events_table_entry()
353 fprintf(outfp, "\t.event = \"%s\",\n", je->event); in print_events_table_entry()
354 fprintf(outfp, "\t.desc = \"%s\",\n", je->desc); in print_events_table_entry()
356 fprintf(outfp, "\t.compat = \"%s\",\n", je->compat); in print_events_table_entry()
357 fprintf(outfp, "\t.topic = \"%s\",\n", topic_local); in print_events_table_entry()
359 fprintf(outfp, "\t.long_desc = \"%s\",\n", je->long_desc); in print_events_table_entry()
361 fprintf(outfp, "\t.pmu = \"%s\",\n", je->pmu); in print_events_table_entry()
363 fprintf(outfp, "\t.unit = \"%s\",\n", je->unit); in print_events_table_entry()
365 fprintf(outfp, "\t.perpkg = \"%s\",\n", je->perpkg); in print_events_table_entry()
367 fprintf(outfp, "\t.aggr_mode = \"%d\",\n", convert(je->aggr_mode)); in print_events_table_entry()
369 fprintf(outfp, "\t.metric_expr = \"%s\",\n", je->metric_expr); in print_events_table_entry()
371 fprintf(outfp, "\t.metric_name = \"%s\",\n", je->metric_name); in print_events_table_entry()
373 fprintf(outfp, "\t.metric_group = \"%s\",\n", je->metric_group); in print_events_table_entry()
375 fprintf(outfp, "\t.deprecated = \"%s\",\n", je->deprecated); in print_events_table_entry()
377 fprintf(outfp, "\t.metric_constraint = \"%s\",\n", je->metric_constraint); in print_events_table_entry()
378 fprintf(outfp, "},\n"); in print_events_table_entry()
460 static void print_events_table_suffix(FILE *outfp) in print_events_table_suffix() argument
462 fprintf(outfp, "{\n"); in print_events_table_suffix()
464 fprintf(outfp, "\t.name = 0,\n"); in print_events_table_suffix()
465 fprintf(outfp, "\t.event = 0,\n"); in print_events_table_suffix()
466 fprintf(outfp, "\t.desc = 0,\n"); in print_events_table_suffix()
468 fprintf(outfp, "},\n"); in print_events_table_suffix()
469 fprintf(outfp, "};\n"); in print_events_table_suffix()
816 static void print_mapping_table_prefix(FILE *outfp) in print_mapping_table_prefix() argument
818 fprintf(outfp, "const struct pmu_events_map pmu_events_map[] = {\n"); in print_mapping_table_prefix()
821 static void print_mapping_table_suffix(FILE *outfp) in print_mapping_table_suffix() argument
826 fprintf(outfp, "{\n"); in print_mapping_table_suffix()
827 fprintf(outfp, "\t.cpuid = 0,\n"); in print_mapping_table_suffix()
828 fprintf(outfp, "\t.version = 0,\n"); in print_mapping_table_suffix()
829 fprintf(outfp, "\t.type = 0,\n"); in print_mapping_table_suffix()
830 fprintf(outfp, "\t.table = 0,\n"); in print_mapping_table_suffix()
831 fprintf(outfp, "},\n"); in print_mapping_table_suffix()
834 fprintf(outfp, "};\n"); in print_mapping_table_suffix()
837 static void print_mapping_test_table(FILE *outfp) in print_mapping_test_table() argument
842 fprintf(outfp, "{\n"); in print_mapping_test_table()
843 fprintf(outfp, "\t.cpuid = \"testcpu\",\n"); in print_mapping_test_table()
844 fprintf(outfp, "\t.version = \"v1\",\n"); in print_mapping_test_table()
845 fprintf(outfp, "\t.type = \"core\",\n"); in print_mapping_test_table()
846 fprintf(outfp, "\t.table = pme_test_soc_cpu,\n"); in print_mapping_test_table()
847 fprintf(outfp, "},\n"); in print_mapping_test_table()
850 static void print_system_event_mapping_table_prefix(FILE *outfp) in print_system_event_mapping_table_prefix() argument
852 fprintf(outfp, "\nconst struct pmu_sys_events pmu_sys_event_tables[] = {"); in print_system_event_mapping_table_prefix()
855 static void print_system_event_mapping_table_suffix(FILE *outfp) in print_system_event_mapping_table_suffix() argument
857 fprintf(outfp, "\n\t{\n\t\t.table = 0\n\t},"); in print_system_event_mapping_table_suffix()
858 fprintf(outfp, "\n};\n"); in print_system_event_mapping_table_suffix()
861 static int process_system_event_tables(FILE *outfp) in process_system_event_tables() argument
865 print_system_event_mapping_table_prefix(outfp); in process_system_event_tables()
868 fprintf(outfp, "\n\t{\n\t\t.table = %s,\n\t\t.name = \"%s\",\n\t},", in process_system_event_tables()
873 print_system_event_mapping_table_suffix(outfp); in process_system_event_tables()
878 static int process_mapfile(FILE *outfp, char *fpath) in process_mapfile() argument
902 print_mapping_table_prefix(outfp); in process_mapfile()
936 fprintf(outfp, "{\n"); in process_mapfile()
937 fprintf(outfp, "\t.cpuid = \"%s\",\n", cpuid); in process_mapfile()
938 fprintf(outfp, "\t.version = \"%s\",\n", version); in process_mapfile()
939 fprintf(outfp, "\t.type = \"%s\",\n", type); in process_mapfile()
950 fprintf(outfp, "\t.table = %s\n", tblname); in process_mapfile()
951 fprintf(outfp, "},\n"); in process_mapfile()
955 print_mapping_test_table(outfp); in process_mapfile()
956 print_mapping_table_suffix(outfp); in process_mapfile()
969 FILE *outfp; in create_empty_mapping() local
974 outfp = fopen(output_file, "w"); in create_empty_mapping()
975 if (!outfp) { in create_empty_mapping()
980 fprintf(outfp, "#include \"pmu-events/pmu-events.h\"\n"); in create_empty_mapping()
981 print_mapping_table_prefix(outfp); in create_empty_mapping()
982 print_mapping_table_suffix(outfp); in create_empty_mapping()
983 print_system_event_mapping_table_prefix(outfp); in create_empty_mapping()
984 print_system_event_mapping_table_suffix(outfp); in create_empty_mapping()
985 fclose(outfp); in create_empty_mapping()
1193 .outfp = eventsfp, in process_one_file()