• 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

405 	FILE *ofp;
408 ofp = fopen(fname, "w");
409 if (ofp == NULL) {
414 fprintf(ofp, "# perf trace event handlers, "
417 fprintf(ofp, "# Licensed under the terms of the GNU GPL"
420 fprintf(ofp, "# The common_* event handler fields are the most useful "
423 fprintf(ofp, "# all events. They don't necessarily correspond to "
426 fprintf(ofp, "# in the format files. Those fields not available as "
429 fprintf(ofp, "# be retrieved using Perl functions of the form "
432 fprintf(ofp, "# See Context.pm for the list of available "
435 fprintf(ofp, "use lib \"$ENV{'PERF_EXEC_PATH'}/scripts/perl/"
438 fprintf(ofp, "use lib \"./Perf-Trace-Util/lib\";\n");
439 fprintf(ofp, "use Perf::Trace::Core;\n");
440 fprintf(ofp, "use Perf::Trace::Context;\n");
441 fprintf(ofp, "use Perf::Trace::Util;\n\n");
443 fprintf(ofp, "sub trace_begin\n{\n\t# optional\n}\n\n");
444 fprintf(ofp, "sub trace_end\n{\n\t# optional\n}\n\n");
447 fprintf(ofp, "sub %s::%s\n{\n", event->system, event->name);
448 fprintf(ofp, "\tmy (");
450 fprintf(ofp, "$event_name, ");
451 fprintf(ofp, "$context, ");
452 fprintf(ofp, "$common_cpu, ");
453 fprintf(ofp, "$common_secs, ");
454 fprintf(ofp, "$common_nsecs,\n");
455 fprintf(ofp, "\t $common_pid, ");
456 fprintf(ofp, "$common_comm,\n\t ");
463 fprintf(ofp, ", ");
465 fprintf(ofp, "\n\t ");
467 fprintf(ofp, "$%s", f->name);
469 fprintf(ofp, ") = @_;\n\n");
471 fprintf(ofp, "\tprint_header($event_name, $common_cpu, "
475 fprintf(ofp, "\tprintf(\"");
482 fprintf(ofp, ", ");
484 fprintf(ofp, "\".\n\t \"");
488 fprintf(ofp, "%s=", f->name);
492 fprintf(ofp, "%%s");
494 fprintf(ofp, "%%d");
496 fprintf(ofp, "%%u");
499 fprintf(ofp, "\\n\",\n\t ");
506 fprintf(ofp, ", ");
509 fprintf(ofp, "\n\t ");
513 fprintf(ofp, "\n\t ");
516 fprintf(ofp, "flag_str(\"");
517 fprintf(ofp, "%s::%s\", ", event->system,
519 fprintf(ofp, "\"%s\", $%s)", f->name,
523 fprintf(ofp, "\n\t ");
526 fprintf(ofp, "symbol_str(\"");
527 fprintf(ofp, "%s::%s\", ", event->system,
529 fprintf(ofp, "\"%s\", $%s)", f->name,
532 fprintf(ofp, "$%s", f->name);
535 fprintf(ofp, ");\n");
536 fprintf(ofp, "}\n\n");
539 fprintf(ofp, "sub trace_unhandled\n{\n\tmy ($event_name, $context, "
543 fprintf(ofp, "\tprint_header($event_name, $common_cpu, "
547 fprintf(ofp, "sub print_header\n{\n"
552 fclose(ofp);