• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/tools/perf/util/scripting-engines/

Lines Matching refs:ofp

437 	FILE *ofp;
440 ofp = fopen(fname, "w");
441 if (ofp == NULL) {
445 fprintf(ofp, "# perf trace event handlers, "
448 fprintf(ofp, "# Licensed under the terms of the GNU GPL"
451 fprintf(ofp, "# The common_* event handler fields are the most useful "
454 fprintf(ofp, "# all events. They don't necessarily correspond to "
457 fprintf(ofp, "# in the format files. Those fields not available as "
460 fprintf(ofp, "# be retrieved using Python functions of the form "
463 fprintf(ofp, "# See the perf-trace-python Documentation for the list "
466 fprintf(ofp, "import os\n");
467 fprintf(ofp, "import sys\n\n");
469 fprintf(ofp, "sys.path.append(os.environ['PERF_EXEC_PATH'] + \\\n");
470 fprintf(ofp, "\t'/scripts/python/Perf-Trace-Util/lib/Perf/Trace')\n");
471 fprintf(ofp, "\nfrom perf_trace_context import *\n");
472 fprintf(ofp, "from Core import *\n\n\n");
474 fprintf(ofp, "def trace_begin():\n");
475 fprintf(ofp, "\tprint \"in trace_begin\"\n\n");
477 fprintf(ofp, "def trace_end():\n");
478 fprintf(ofp, "\tprint \"in trace_end\"\n\n");
481 fprintf(ofp, "def %s__%s(", event->system, event->name);
482 fprintf(ofp, "event_name, ");
483 fprintf(ofp, "context, ");
484 fprintf(ofp, "common_cpu,\n");
485 fprintf(ofp, "\tcommon_secs, ");
486 fprintf(ofp, "common_nsecs, ");
487 fprintf(ofp, "common_pid, ");
488 fprintf(ofp, "common_comm,\n\t");
495 fprintf(ofp, ", ");
497 fprintf(ofp, "\n\t");
499 fprintf(ofp, "%s", f->name);
501 fprintf(ofp, "):\n");
503 fprintf(ofp, "\t\tprint_header(event_name, common_cpu, "
507 fprintf(ofp, "\t\tprint \"");
514 fprintf(ofp, ", ");
516 fprintf(ofp, "\" \\\n\t\t\"");
520 fprintf(ofp, "%s=", f->name);
524 fprintf(ofp, "%%s");
526 fprintf(ofp, "%%d");
528 fprintf(ofp, "%%u");
531 fprintf(ofp, "\\n\" %% \\\n\t\t(");
538 fprintf(ofp, ", ");
541 fprintf(ofp, "\n\t\t");
545 fprintf(ofp, "\n\t\t");
548 fprintf(ofp, "flag_str(\"");
549 fprintf(ofp, "%s__%s\", ", event->system,
551 fprintf(ofp, "\"%s\", %s)", f->name,
555 fprintf(ofp, "\n\t\t");
558 fprintf(ofp, "symbol_str(\"");
559 fprintf(ofp, "%s__%s\", ", event->system,
561 fprintf(ofp, "\"%s\", %s)", f->name,
564 fprintf(ofp, "%s", f->name);
567 fprintf(ofp, "),\n\n");
570 fprintf(ofp, "def trace_unhandled(event_name, context, "
573 fprintf(ofp, "\t\tprint ' '.join(['%%s=%%s'%%(k,str(v))"
576 fprintf(ofp, "def print_header("
581 fclose(ofp);