Lines Matching defs:outfp

332 	FILE *outfp;
347 FILE *outfp = pd->outfp;
354 fprintf(outfp, "{\n");
357 fprintf(outfp, "\t.name = \"%s\",\n", je->name);
359 fprintf(outfp, "\t.event = \"%s\",\n", je->event);
360 fprintf(outfp, "\t.desc = \"%s\",\n", je->desc);
362 fprintf(outfp, "\t.compat = \"%s\",\n", je->compat);
363 fprintf(outfp, "\t.topic = \"%s\",\n", topic_local);
365 fprintf(outfp, "\t.long_desc = \"%s\",\n", je->long_desc);
367 fprintf(outfp, "\t.pmu = \"%s\",\n", je->pmu);
369 fprintf(outfp, "\t.unit = \"%s\",\n", je->unit);
371 fprintf(outfp, "\t.perpkg = \"%s\",\n", je->perpkg);
373 fprintf(outfp, "\t.aggr_mode = \"%d\",\n", convert(je->aggr_mode));
375 fprintf(outfp, "\t.metric_expr = \"%s\",\n", je->metric_expr);
377 fprintf(outfp, "\t.metric_name = \"%s\",\n", je->metric_name);
379 fprintf(outfp, "\t.metric_group = \"%s\",\n", je->metric_group);
381 fprintf(outfp, "\t.deprecated = \"%s\",\n", je->deprecated);
383 fprintf(outfp, "\t.metric_constraint = \"%s\",\n", je->metric_constraint);
384 fprintf(outfp, "},\n");
466 static void print_events_table_suffix(FILE *outfp)
468 fprintf(outfp, "{\n");
470 fprintf(outfp, "\t.name = 0,\n");
471 fprintf(outfp, "\t.event = 0,\n");
472 fprintf(outfp, "\t.desc = 0,\n");
474 fprintf(outfp, "},\n");
475 fprintf(outfp, "};\n");
824 static void print_mapping_table_prefix(FILE *outfp)
826 fprintf(outfp, "const struct pmu_events_map pmu_events_map[] = {\n");
829 static void print_mapping_table_suffix(FILE *outfp)
834 fprintf(outfp, "{\n");
835 fprintf(outfp, "\t.cpuid = 0,\n");
836 fprintf(outfp, "\t.version = 0,\n");
837 fprintf(outfp, "\t.type = 0,\n");
838 fprintf(outfp, "\t.table = 0,\n");
839 fprintf(outfp, "},\n");
842 fprintf(outfp, "};\n");
845 static void print_mapping_test_table(FILE *outfp)
850 fprintf(outfp, "{\n");
851 fprintf(outfp, "\t.cpuid = \"testcpu\",\n");
852 fprintf(outfp, "\t.version = \"v1\",\n");
853 fprintf(outfp, "\t.type = \"core\",\n");
854 fprintf(outfp, "\t.table = pme_test_soc_cpu,\n");
855 fprintf(outfp, "},\n");
858 static void print_system_event_mapping_table_prefix(FILE *outfp)
860 fprintf(outfp, "\nconst struct pmu_sys_events pmu_sys_event_tables[] = {");
863 static void print_system_event_mapping_table_suffix(FILE *outfp)
865 fprintf(outfp, "\n\t{\n\t\t.table = 0\n\t},");
866 fprintf(outfp, "\n};\n");
869 static int process_system_event_tables(FILE *outfp)
873 print_system_event_mapping_table_prefix(outfp);
876 fprintf(outfp, "\n\t{\n\t\t.table = %s,\n\t\t.name = \"%s\",\n\t},",
881 print_system_event_mapping_table_suffix(outfp);
886 static int process_mapfile(FILE *outfp, char *fpath)
910 print_mapping_table_prefix(outfp);
944 fprintf(outfp, "{\n");
945 fprintf(outfp, "\t.cpuid = \"%s\",\n", cpuid);
946 fprintf(outfp, "\t.version = \"%s\",\n", version);
947 fprintf(outfp, "\t.type = \"%s\",\n", type);
958 fprintf(outfp, "\t.table = %s\n", tblname);
959 fprintf(outfp, "},\n");
963 print_mapping_test_table(outfp);
964 print_mapping_table_suffix(outfp);
977 FILE *outfp;
982 outfp = fopen(output_file, "w");
983 if (!outfp) {
988 fprintf(outfp, "#include \"pmu-events/pmu-events.h\"\n");
989 print_mapping_table_prefix(outfp);
990 print_mapping_table_suffix(outfp);
991 print_system_event_mapping_table_prefix(outfp);
992 print_system_event_mapping_table_suffix(outfp);
993 fclose(outfp);
1204 .outfp = eventsfp,