• Home
  • Raw
  • Download

Lines Matching refs:ofp

549 	FILE *ofp;  in python_generate_script()  local
552 ofp = fopen(fname, "w"); in python_generate_script()
553 if (ofp == NULL) { in python_generate_script()
557 fprintf(ofp, "# perf script event handlers, " in python_generate_script()
560 fprintf(ofp, "# Licensed under the terms of the GNU GPL" in python_generate_script()
563 fprintf(ofp, "# The common_* event handler fields are the most useful " in python_generate_script()
566 fprintf(ofp, "# all events. They don't necessarily correspond to " in python_generate_script()
569 fprintf(ofp, "# in the format files. Those fields not available as " in python_generate_script()
572 fprintf(ofp, "# be retrieved using Python functions of the form " in python_generate_script()
575 fprintf(ofp, "# See the perf-trace-python Documentation for the list " in python_generate_script()
578 fprintf(ofp, "import os\n"); in python_generate_script()
579 fprintf(ofp, "import sys\n\n"); in python_generate_script()
581 fprintf(ofp, "sys.path.append(os.environ['PERF_EXEC_PATH'] + \\\n"); in python_generate_script()
582 fprintf(ofp, "\t'/scripts/python/Perf-Trace-Util/lib/Perf/Trace')\n"); in python_generate_script()
583 fprintf(ofp, "\nfrom perf_trace_context import *\n"); in python_generate_script()
584 fprintf(ofp, "from Core import *\n\n\n"); in python_generate_script()
586 fprintf(ofp, "def trace_begin():\n"); in python_generate_script()
587 fprintf(ofp, "\tprint \"in trace_begin\"\n\n"); in python_generate_script()
589 fprintf(ofp, "def trace_end():\n"); in python_generate_script()
590 fprintf(ofp, "\tprint \"in trace_end\"\n\n"); in python_generate_script()
593 fprintf(ofp, "def %s__%s(", event->system, event->name); in python_generate_script()
594 fprintf(ofp, "event_name, "); in python_generate_script()
595 fprintf(ofp, "context, "); in python_generate_script()
596 fprintf(ofp, "common_cpu,\n"); in python_generate_script()
597 fprintf(ofp, "\tcommon_secs, "); in python_generate_script()
598 fprintf(ofp, "common_nsecs, "); in python_generate_script()
599 fprintf(ofp, "common_pid, "); in python_generate_script()
600 fprintf(ofp, "common_comm,\n\t"); in python_generate_script()
607 fprintf(ofp, ", "); in python_generate_script()
609 fprintf(ofp, "\n\t"); in python_generate_script()
611 fprintf(ofp, "%s", f->name); in python_generate_script()
613 fprintf(ofp, "):\n"); in python_generate_script()
615 fprintf(ofp, "\t\tprint_header(event_name, common_cpu, " in python_generate_script()
619 fprintf(ofp, "\t\tprint \""); in python_generate_script()
626 fprintf(ofp, ", "); in python_generate_script()
628 fprintf(ofp, "\" \\\n\t\t\""); in python_generate_script()
632 fprintf(ofp, "%s=", f->name); in python_generate_script()
636 fprintf(ofp, "%%s"); in python_generate_script()
638 fprintf(ofp, "%%d"); in python_generate_script()
640 fprintf(ofp, "%%u"); in python_generate_script()
643 fprintf(ofp, "\\n\" %% \\\n\t\t("); in python_generate_script()
650 fprintf(ofp, ", "); in python_generate_script()
653 fprintf(ofp, "\n\t\t"); in python_generate_script()
657 fprintf(ofp, "\n\t\t"); in python_generate_script()
660 fprintf(ofp, "flag_str(\""); in python_generate_script()
661 fprintf(ofp, "%s__%s\", ", event->system, in python_generate_script()
663 fprintf(ofp, "\"%s\", %s)", f->name, in python_generate_script()
667 fprintf(ofp, "\n\t\t"); in python_generate_script()
670 fprintf(ofp, "symbol_str(\""); in python_generate_script()
671 fprintf(ofp, "%s__%s\", ", event->system, in python_generate_script()
673 fprintf(ofp, "\"%s\", %s)", f->name, in python_generate_script()
676 fprintf(ofp, "%s", f->name); in python_generate_script()
679 fprintf(ofp, "),\n\n"); in python_generate_script()
682 fprintf(ofp, "def trace_unhandled(event_name, context, " in python_generate_script()
685 fprintf(ofp, "\t\tprint ' '.join(['%%s=%%s'%%(k,str(v))" in python_generate_script()
688 fprintf(ofp, "def print_header(" in python_generate_script()
693 fclose(ofp); in python_generate_script()