Lines Matching refs:fprintf

565 		fprintf(stderr, "couldn't open %s\n", fname);  in perl_generate_script()
569 fprintf(ofp, "# perf script event handlers, " in perl_generate_script()
572 fprintf(ofp, "# Licensed under the terms of the GNU GPL" in perl_generate_script()
575 fprintf(ofp, "# The common_* event handler fields are the most useful " in perl_generate_script()
578 fprintf(ofp, "# all events. They don't necessarily correspond to " in perl_generate_script()
581 fprintf(ofp, "# in the format files. Those fields not available as " in perl_generate_script()
584 fprintf(ofp, "# be retrieved using Perl functions of the form " in perl_generate_script()
587 fprintf(ofp, "# See Context.pm for the list of available " in perl_generate_script()
590 fprintf(ofp, "use lib \"$ENV{'PERF_EXEC_PATH'}/scripts/perl/" in perl_generate_script()
593 fprintf(ofp, "use lib \"./Perf-Trace-Util/lib\";\n"); in perl_generate_script()
594 fprintf(ofp, "use Perf::Trace::Core;\n"); in perl_generate_script()
595 fprintf(ofp, "use Perf::Trace::Context;\n"); in perl_generate_script()
596 fprintf(ofp, "use Perf::Trace::Util;\n\n"); in perl_generate_script()
598 fprintf(ofp, "sub trace_begin\n{\n\t# optional\n}\n\n"); in perl_generate_script()
599 fprintf(ofp, "sub trace_end\n{\n\t# optional\n}\n"); in perl_generate_script()
602 fprintf(ofp, "\n\ in perl_generate_script()
625 fprintf(ofp, "sub %s::%s\n{\n", event->system, event->name); in perl_generate_script()
626 fprintf(ofp, "\tmy ("); in perl_generate_script()
628 fprintf(ofp, "$event_name, "); in perl_generate_script()
629 fprintf(ofp, "$context, "); in perl_generate_script()
630 fprintf(ofp, "$common_cpu, "); in perl_generate_script()
631 fprintf(ofp, "$common_secs, "); in perl_generate_script()
632 fprintf(ofp, "$common_nsecs,\n"); in perl_generate_script()
633 fprintf(ofp, "\t $common_pid, "); in perl_generate_script()
634 fprintf(ofp, "$common_comm, "); in perl_generate_script()
635 fprintf(ofp, "$common_callchain,\n\t "); in perl_generate_script()
642 fprintf(ofp, ", "); in perl_generate_script()
644 fprintf(ofp, "\n\t "); in perl_generate_script()
646 fprintf(ofp, "$%s", f->name); in perl_generate_script()
648 fprintf(ofp, ") = @_;\n\n"); in perl_generate_script()
650 fprintf(ofp, "\tprint_header($event_name, $common_cpu, " in perl_generate_script()
654 fprintf(ofp, "\tprintf(\""); in perl_generate_script()
661 fprintf(ofp, ", "); in perl_generate_script()
663 fprintf(ofp, "\".\n\t \""); in perl_generate_script()
667 fprintf(ofp, "%s=", f->name); in perl_generate_script()
671 fprintf(ofp, "%%s"); in perl_generate_script()
673 fprintf(ofp, "%%d"); in perl_generate_script()
675 fprintf(ofp, "%%u"); in perl_generate_script()
678 fprintf(ofp, "\\n\",\n\t "); in perl_generate_script()
685 fprintf(ofp, ", "); in perl_generate_script()
688 fprintf(ofp, "\n\t "); in perl_generate_script()
692 fprintf(ofp, "\n\t "); in perl_generate_script()
695 fprintf(ofp, "flag_str(\""); in perl_generate_script()
696 fprintf(ofp, "%s::%s\", ", event->system, in perl_generate_script()
698 fprintf(ofp, "\"%s\", $%s)", f->name, in perl_generate_script()
702 fprintf(ofp, "\n\t "); in perl_generate_script()
705 fprintf(ofp, "symbol_str(\""); in perl_generate_script()
706 fprintf(ofp, "%s::%s\", ", event->system, in perl_generate_script()
708 fprintf(ofp, "\"%s\", $%s)", f->name, in perl_generate_script()
711 fprintf(ofp, "$%s", f->name); in perl_generate_script()
714 fprintf(ofp, ");\n\n"); in perl_generate_script()
716 fprintf(ofp, "\tprint_backtrace($common_callchain);\n"); in perl_generate_script()
718 fprintf(ofp, "}\n\n"); in perl_generate_script()
721 fprintf(ofp, "sub trace_unhandled\n{\n\tmy ($event_name, $context, " in perl_generate_script()
725 fprintf(ofp, "\tprint_header($event_name, $common_cpu, " in perl_generate_script()
728 fprintf(ofp, "\tprint_backtrace($common_callchain);\n"); in perl_generate_script()
729 fprintf(ofp, "}\n\n"); in perl_generate_script()
731 fprintf(ofp, "sub print_header\n{\n" in perl_generate_script()
736 fprintf(ofp, in perl_generate_script()
759 fprintf(stderr, "generated Perl script: %s\n", fname); in perl_generate_script()