Lines Matching refs:ofp

1922 	FILE *ofp;  in python_generate_script()  local
1925 ofp = fopen(fname, "w"); in python_generate_script()
1926 if (ofp == NULL) { in python_generate_script()
1930 fprintf(ofp, "# perf script event handlers, " in python_generate_script()
1933 fprintf(ofp, "# Licensed under the terms of the GNU GPL" in python_generate_script()
1936 fprintf(ofp, "# The common_* event handler fields are the most useful " in python_generate_script()
1939 fprintf(ofp, "# all events. They don't necessarily correspond to " in python_generate_script()
1942 fprintf(ofp, "# in the format files. Those fields not available as " in python_generate_script()
1945 fprintf(ofp, "# be retrieved using Python functions of the form " in python_generate_script()
1948 fprintf(ofp, "# See the perf-script-python Documentation for the list " in python_generate_script()
1951 fprintf(ofp, "from __future__ import print_function\n\n"); in python_generate_script()
1952 fprintf(ofp, "import os\n"); in python_generate_script()
1953 fprintf(ofp, "import sys\n\n"); in python_generate_script()
1955 fprintf(ofp, "sys.path.append(os.environ['PERF_EXEC_PATH'] + \\\n"); in python_generate_script()
1956 fprintf(ofp, "\t'/scripts/python/Perf-Trace-Util/lib/Perf/Trace')\n"); in python_generate_script()
1957 fprintf(ofp, "\nfrom perf_trace_context import *\n"); in python_generate_script()
1958 fprintf(ofp, "from Core import *\n\n\n"); in python_generate_script()
1960 fprintf(ofp, "def trace_begin():\n"); in python_generate_script()
1961 fprintf(ofp, "\tprint(\"in trace_begin\")\n\n"); in python_generate_script()
1963 fprintf(ofp, "def trace_end():\n"); in python_generate_script()
1964 fprintf(ofp, "\tprint(\"in trace_end\")\n\n"); in python_generate_script()
1971 fprintf(ofp, "def %s__%s(", event->system, event->name); in python_generate_script()
1972 fprintf(ofp, "event_name, "); in python_generate_script()
1973 fprintf(ofp, "context, "); in python_generate_script()
1974 fprintf(ofp, "common_cpu,\n"); in python_generate_script()
1975 fprintf(ofp, "\tcommon_secs, "); in python_generate_script()
1976 fprintf(ofp, "common_nsecs, "); in python_generate_script()
1977 fprintf(ofp, "common_pid, "); in python_generate_script()
1978 fprintf(ofp, "common_comm,\n\t"); in python_generate_script()
1979 fprintf(ofp, "common_callchain, "); in python_generate_script()
1986 fprintf(ofp, ", "); in python_generate_script()
1988 fprintf(ofp, "\n\t"); in python_generate_script()
1990 fprintf(ofp, "%s", f->name); in python_generate_script()
1993 fprintf(ofp, ", "); in python_generate_script()
1995 fprintf(ofp, "\n\t\t"); in python_generate_script()
1996 fprintf(ofp, "perf_sample_dict"); in python_generate_script()
1998 fprintf(ofp, "):\n"); in python_generate_script()
2000 fprintf(ofp, "\t\tprint_header(event_name, common_cpu, " in python_generate_script()
2004 fprintf(ofp, "\t\tprint(\""); in python_generate_script()
2011 fprintf(ofp, ", "); in python_generate_script()
2013 fprintf(ofp, "\" \\\n\t\t\""); in python_generate_script()
2017 fprintf(ofp, "%s=", f->name); in python_generate_script()
2022 fprintf(ofp, "%%s"); in python_generate_script()
2024 fprintf(ofp, "%%d"); in python_generate_script()
2026 fprintf(ofp, "%%u"); in python_generate_script()
2029 fprintf(ofp, "\" %% \\\n\t\t("); in python_generate_script()
2036 fprintf(ofp, ", "); in python_generate_script()
2039 fprintf(ofp, "\n\t\t"); in python_generate_script()
2043 fprintf(ofp, "\n\t\t"); in python_generate_script()
2046 fprintf(ofp, "flag_str(\""); in python_generate_script()
2047 fprintf(ofp, "%s__%s\", ", event->system, in python_generate_script()
2049 fprintf(ofp, "\"%s\", %s)", f->name, in python_generate_script()
2053 fprintf(ofp, "\n\t\t"); in python_generate_script()
2056 fprintf(ofp, "symbol_str(\""); in python_generate_script()
2057 fprintf(ofp, "%s__%s\", ", event->system, in python_generate_script()
2059 fprintf(ofp, "\"%s\", %s)", f->name, in python_generate_script()
2062 fprintf(ofp, "%s", f->name); in python_generate_script()
2065 fprintf(ofp, "))\n\n"); in python_generate_script()
2067 fprintf(ofp, "\t\tprint('Sample: {'+" in python_generate_script()
2070 fprintf(ofp, "\t\tfor node in common_callchain:"); in python_generate_script()
2071 fprintf(ofp, "\n\t\t\tif 'sym' in node:"); in python_generate_script()
2072 fprintf(ofp, "\n\t\t\t\tprint(\"\\t[%%x] %%s\" %% (node['ip'], node['sym']['name']))"); in python_generate_script()
2073 fprintf(ofp, "\n\t\t\telse:"); in python_generate_script()
2074 fprintf(ofp, "\n\t\t\t\tprint(\"\t[%%x]\" %% (node['ip']))\n\n"); in python_generate_script()
2075 fprintf(ofp, "\t\tprint()\n\n"); in python_generate_script()
2079 fprintf(ofp, "def trace_unhandled(event_name, context, " in python_generate_script()
2082 fprintf(ofp, "\t\tprint(get_dict_as_string(event_fields_dict))\n"); in python_generate_script()
2083 fprintf(ofp, "\t\tprint('Sample: {'+" in python_generate_script()
2086 fprintf(ofp, "def print_header(" in python_generate_script()
2091 fprintf(ofp, "def get_dict_as_string(a_dict, delimiter=' '):\n" in python_generate_script()
2095 fclose(ofp); in python_generate_script()