Lines Matching refs:c
124 struct convert_json *c = container_of(tool, struct convert_json, tool); in output_sample_callchain_entry() local
125 FILE *out = c->out; in output_sample_callchain_entry()
155 struct convert_json *c = container_of(tool, struct convert_json, tool); in process_sample_event() local
156 FILE *out = c->out; in process_sample_event()
168 ++c->events_count; in process_sample_event()
170 if (c->first) in process_sample_event()
171 c->first = false; in process_sample_event()
257 static void output_headers(struct perf_session *session, struct convert_json *c) in output_headers() argument
265 FILE *out = c->out; in output_headers()
309 output_json_string(c->out, env->cmdline_argv[i]); in output_headers()
320 struct convert_json c = { in bt_convert__perf2json() local
330 perf_tool__init(&c.tool, /*ordered_events=*/true); in bt_convert__perf2json()
331 c.tool.sample = process_sample_event; in bt_convert__perf2json()
332 c.tool.mmap = perf_event__process_mmap; in bt_convert__perf2json()
333 c.tool.mmap2 = perf_event__process_mmap2; in bt_convert__perf2json()
334 c.tool.comm = perf_event__process_comm; in bt_convert__perf2json()
335 c.tool.namespaces = perf_event__process_namespaces; in bt_convert__perf2json()
336 c.tool.cgroup = perf_event__process_cgroup; in bt_convert__perf2json()
337 c.tool.exit = perf_event__process_exit; in bt_convert__perf2json()
338 c.tool.fork = perf_event__process_fork; in bt_convert__perf2json()
339 c.tool.lost = perf_event__process_lost; in bt_convert__perf2json()
341 c.tool.tracing_data = perf_event__process_tracing_data; in bt_convert__perf2json()
343 c.tool.build_id = perf_event__process_build_id; in bt_convert__perf2json()
344 c.tool.id_index = perf_event__process_id_index; in bt_convert__perf2json()
345 c.tool.auxtrace_info = perf_event__process_auxtrace_info; in bt_convert__perf2json()
346 c.tool.auxtrace = perf_event__process_auxtrace; in bt_convert__perf2json()
347 c.tool.event_update = perf_event__process_event_update; in bt_convert__perf2json()
348 c.tool.ordering_requires_timestamps = true; in bt_convert__perf2json()
368 c.out = fdopen(fd, "w"); in bt_convert__perf2json()
369 if (!c.out) { in bt_convert__perf2json()
375 session = perf_session__new(&data, &c.tool); in bt_convert__perf2json()
387 fputc('{', c.out); in bt_convert__perf2json()
392 output_json_format(c.out, false, 1, "\"linux-perf-json-version\": 1"); in bt_convert__perf2json()
395 output_json_format(c.out, true, 1, "\"headers\": {"); in bt_convert__perf2json()
396 output_headers(session, &c); in bt_convert__perf2json()
397 output_json_format(c.out, false, 1, "}"); in bt_convert__perf2json()
400 output_json_format(c.out, true, 1, "\"samples\": ["); in bt_convert__perf2json()
402 output_json_format(c.out, false, 1, "]"); in bt_convert__perf2json()
403 output_json_format(c.out, false, 0, "}"); in bt_convert__perf2json()
404 fputc('\n', c.out); in bt_convert__perf2json()
412 (ftell(c.out)) / 1024.0 / 1024.0, c.events_count); in bt_convert__perf2json()
418 fclose(c.out); in bt_convert__perf2json()