Lines Matching refs:fprintf

1078 	fprintf(stderr, "Tracepoint events are not supported because "
1969 fprintf(stderr, "Error running python script %s\n", script);
1975 fprintf(stderr, "Error starting python script %s\n", script);
2033 fprintf(stderr, "couldn't open %s\n", fname);
2036 fprintf(ofp, "# perf script event handlers, "
2039 fprintf(ofp, "# Licensed under the terms of the GNU GPL"
2042 fprintf(ofp, "# The common_* event handler fields are the most useful "
2045 fprintf(ofp, "# all events. They don't necessarily correspond to "
2048 fprintf(ofp, "# in the format files. Those fields not available as "
2051 fprintf(ofp, "# be retrieved using Python functions of the form "
2054 fprintf(ofp, "# See the perf-script-python Documentation for the list "
2057 fprintf(ofp, "from __future__ import print_function\n\n");
2058 fprintf(ofp, "import os\n");
2059 fprintf(ofp, "import sys\n\n");
2061 fprintf(ofp, "sys.path.append(os.environ['PERF_EXEC_PATH'] + \\\n");
2062 fprintf(ofp, "\t'/scripts/python/Perf-Trace-Util/lib/Perf/Trace')\n");
2063 fprintf(ofp, "\nfrom perf_trace_context import *\n");
2064 fprintf(ofp, "from Core import *\n\n\n");
2066 fprintf(ofp, "def trace_begin():\n");
2067 fprintf(ofp, "\tprint(\"in trace_begin\")\n\n");
2069 fprintf(ofp, "def trace_end():\n");
2070 fprintf(ofp, "\tprint(\"in trace_end\")\n\n");
2077 fprintf(ofp, "def %s__%s(", event->system, event->name);
2078 fprintf(ofp, "event_name, ");
2079 fprintf(ofp, "context, ");
2080 fprintf(ofp, "common_cpu,\n");
2081 fprintf(ofp, "\tcommon_secs, ");
2082 fprintf(ofp, "common_nsecs, ");
2083 fprintf(ofp, "common_pid, ");
2084 fprintf(ofp, "common_comm,\n\t");
2085 fprintf(ofp, "common_callchain, ");
2092 fprintf(ofp, ", ");
2094 fprintf(ofp, "\n\t");
2096 fprintf(ofp, "%s", f->name);
2099 fprintf(ofp, ", ");
2101 fprintf(ofp, "\n\t\t");
2102 fprintf(ofp, "perf_sample_dict");
2104 fprintf(ofp, "):\n");
2106 fprintf(ofp, "\t\tprint_header(event_name, common_cpu, "
2110 fprintf(ofp, "\t\tprint(\"");
2117 fprintf(ofp, ", ");
2119 fprintf(ofp, "\" \\\n\t\t\"");
2123 fprintf(ofp, "%s=", f->name);
2128 fprintf(ofp, "%%s");
2130 fprintf(ofp, "%%d");
2132 fprintf(ofp, "%%u");
2135 fprintf(ofp, "\" %% \\\n\t\t(");
2142 fprintf(ofp, ", ");
2145 fprintf(ofp, "\n\t\t");
2149 fprintf(ofp, "\n\t\t");
2152 fprintf(ofp, "flag_str(\"");
2153 fprintf(ofp, "%s__%s\", ", event->system,
2155 fprintf(ofp, "\"%s\", %s)", f->name,
2159 fprintf(ofp, "\n\t\t");
2162 fprintf(ofp, "symbol_str(\"");
2163 fprintf(ofp, "%s__%s\", ", event->system,
2165 fprintf(ofp, "\"%s\", %s)", f->name,
2168 fprintf(ofp, "%s", f->name);
2171 fprintf(ofp, "))\n\n");
2173 fprintf(ofp, "\t\tprint('Sample: {'+"
2176 fprintf(ofp, "\t\tfor node in common_callchain:");
2177 fprintf(ofp, "\n\t\t\tif 'sym' in node:");
2178 fprintf(ofp, "\n\t\t\t\tprint(\"\t[%%x] %%s%%s%%s%%s\" %% (");
2179 fprintf(ofp, "\n\t\t\t\t\tnode['ip'], node['sym']['name'],");
2180 fprintf(ofp, "\n\t\t\t\t\t\"+0x{:x}\".format(node['sym_off']) if 'sym_off' in node else \"\",");
2181 fprintf(ofp, "\n\t\t\t\t\t\" ({})\".format(node['dso']) if 'dso' in node else \"\",");
2182 fprintf(ofp, "\n\t\t\t\t\t\" \" + node['sym_srcline'] if 'sym_srcline' in node else \"\"))");
2183 fprintf(ofp, "\n\t\t\telse:");
2184 fprintf(ofp, "\n\t\t\t\tprint(\"\t[%%x]\" %% (node['ip']))\n\n");
2185 fprintf(ofp, "\t\tprint()\n\n");
2189 fprintf(ofp, "def trace_unhandled(event_name, context, "
2192 fprintf(ofp, "\t\tprint(get_dict_as_string(event_fields_dict))\n");
2193 fprintf(ofp, "\t\tprint('Sample: {'+"
2196 fprintf(ofp, "def print_header("
2201 fprintf(ofp, "def get_dict_as_string(a_dict, delimiter=' '):\n"
2207 fprintf(stderr, "generated Python script: %s\n", fname);
2215 fprintf(stderr, "Generating Python perf-script is not supported."