Lines Matching refs:tool
12 #include "util/tool.h"
121 struct perf_tool tool;
2102 static int process_sample_event(struct perf_tool *tool,
2108 struct perf_script *scr = container_of(tool, struct perf_script, tool);
2152 static int process_attr(struct perf_tool *tool, union perf_event *event,
2155 struct perf_script *scr = container_of(tool, struct perf_script, tool);
2161 err = perf_event__process_attr(tool, event, pevlist);
2218 static int print_event_with_time(struct perf_tool *tool,
2224 struct perf_script *script = container_of(tool, struct perf_script, tool);
2254 static int print_event(struct perf_tool *tool, union perf_event *event,
2258 return print_event_with_time(tool, event, sample, machine, pid, tid, 0);
2261 static int process_comm_event(struct perf_tool *tool,
2266 if (perf_event__process_comm(tool, event, sample, machine) < 0)
2269 return print_event(tool, event, sample, machine, event->comm.pid,
2273 static int process_namespaces_event(struct perf_tool *tool,
2278 if (perf_event__process_namespaces(tool, event, sample, machine) < 0)
2281 return print_event(tool, event, sample, machine, event->namespaces.pid,
2285 static int process_cgroup_event(struct perf_tool *tool,
2290 if (perf_event__process_cgroup(tool, event, sample, machine) < 0)
2293 return print_event(tool, event, sample, machine, sample->pid,
2297 static int process_fork_event(struct perf_tool *tool,
2302 if (perf_event__process_fork(tool, event, sample, machine) < 0)
2305 return print_event_with_time(tool, event, sample, machine,
2309 static int process_exit_event(struct perf_tool *tool,
2315 if (print_event_with_time(tool, event, sample, machine, event->fork.pid,
2319 return perf_event__process_exit(tool, event, sample, machine);
2322 static int process_mmap_event(struct perf_tool *tool,
2327 if (perf_event__process_mmap(tool, event, sample, machine) < 0)
2330 return print_event(tool, event, sample, machine, event->mmap.pid,
2334 static int process_mmap2_event(struct perf_tool *tool,
2339 if (perf_event__process_mmap2(tool, event, sample, machine) < 0)
2342 return print_event(tool, event, sample, machine, event->mmap2.pid,
2346 static int process_switch_event(struct perf_tool *tool,
2351 struct perf_script *script = container_of(tool, struct perf_script, tool);
2353 if (perf_event__process_switch(tool, event, sample, machine) < 0)
2362 return print_event(tool, event, sample, machine, sample->pid,
2367 process_lost_event(struct perf_tool *tool,
2372 return print_event(tool, event, sample, machine, sample->pid,
2377 process_finished_round_event(struct perf_tool *tool __maybe_unused,
2387 process_bpf_events(struct perf_tool *tool __maybe_unused,
2395 return print_event(tool, event, sample, machine, sample->pid,
2399 static int process_text_poke_events(struct perf_tool *tool,
2404 if (perf_event__process_text_poke(tool, event, sample, machine) < 0)
2407 return print_event(tool, event, sample, machine, sample->pid,
2500 script->tool.comm = process_comm_event;
2501 script->tool.fork = process_fork_event;
2502 script->tool.exit = process_exit_event;
2505 script->tool.mmap = process_mmap_event;
2506 script->tool.mmap2 = process_mmap2_event;
2509 script->tool.context_switch = process_switch_event;
2511 script->tool.namespaces = process_namespaces_event;
2513 script->tool.cgroup = process_cgroup_event;
2515 script->tool.lost = process_lost_event;
2517 script->tool.ordered_events = false;
2518 script->tool.finished_round = process_finished_round_event;
2521 script->tool.ksymbol = process_bpf_events;
2522 script->tool.bpf = process_bpf_events;
2525 script->tool.ksymbol = process_bpf_events;
2526 script->tool.text_poke = process_text_poke_events;
3326 struct perf_tool *tool = session->tool;
3327 struct perf_script *script = container_of(tool, struct perf_script, tool);
3345 struct perf_tool *tool = session->tool;
3346 struct perf_script *script = container_of(tool, struct perf_script, tool);
3372 struct perf_tool *tool = session->tool;
3377 struct perf_script *script = container_of(tool, struct perf_script, tool);
3448 .tool = {
3804 session = perf_session__new(&data, false, &script.tool);
3809 script.tool.show_feat_hdr = SHOW_FEAT_HEADER;
3815 script.tool.show_feat_hdr = SHOW_FEAT_HEADER_FULL_INFO;