Lines Matching refs:tool
71 #include "util/tool.h"
149 struct perf_tool tool;
2654 static int process_sample_event(const struct perf_tool *tool,
2659 struct perf_script *scr = container_of(tool, struct perf_script, tool);
2739 static int process_deferred_sample_event(const struct perf_tool *tool,
2744 struct perf_script *scr = container_of(tool, struct perf_script, tool);
2831 static int process_attr(const struct perf_tool *tool, union perf_event *event,
2834 struct perf_script *scr = container_of(tool, struct perf_script, tool);
2841 err = perf_event__process_attr(tool, event, pevlist);
2899 static int print_event_with_time(const struct perf_tool *tool,
2905 struct perf_script *script = container_of(tool, struct perf_script, tool);
2942 static int print_event(const struct perf_tool *tool, union perf_event *event,
2946 return print_event_with_time(tool, event, sample, machine, pid, tid, 0);
2949 static int process_comm_event(const struct perf_tool *tool,
2954 if (perf_event__process_comm(tool, event, sample, machine) < 0)
2957 return print_event(tool, event, sample, machine, event->comm.pid,
2961 static int process_namespaces_event(const struct perf_tool *tool,
2966 if (perf_event__process_namespaces(tool, event, sample, machine) < 0)
2969 return print_event(tool, event, sample, machine, event->namespaces.pid,
2973 static int process_cgroup_event(const struct perf_tool *tool,
2978 if (perf_event__process_cgroup(tool, event, sample, machine) < 0)
2981 return print_event(tool, event, sample, machine, sample->pid,
2985 static int process_fork_event(const struct perf_tool *tool,
2990 if (perf_event__process_fork(tool, event, sample, machine) < 0)
2993 return print_event_with_time(tool, event, sample, machine,
2997 static int process_exit_event(const struct perf_tool *tool,
3003 if (print_event_with_time(tool, event, sample, machine, event->fork.pid,
3007 return perf_event__process_exit(tool, event, sample, machine);
3010 static int process_mmap_event(const struct perf_tool *tool,
3015 if (perf_event__process_mmap(tool, event, sample, machine) < 0)
3018 return print_event(tool, event, sample, machine, event->mmap.pid,
3022 static int process_mmap2_event(const struct perf_tool *tool,
3027 if (perf_event__process_mmap2(tool, event, sample, machine) < 0)
3030 return print_event(tool, event, sample, machine, event->mmap2.pid,
3034 static int process_switch_event(const struct perf_tool *tool,
3039 struct perf_script *script = container_of(tool, struct perf_script, tool);
3041 if (perf_event__process_switch(tool, event, sample, machine) < 0)
3050 return print_event(tool, event, sample, machine, sample->pid,
3054 static int process_auxtrace_error(const struct perf_tool *tool,
3063 return perf_event__process_auxtrace_error(tool, session, event);
3067 process_lost_event(const struct perf_tool *tool,
3072 return print_event(tool, event, sample, machine, sample->pid,
3077 process_throttle_event(const struct perf_tool *tool __maybe_unused,
3088 process_finished_round_event(const struct perf_tool *tool __maybe_unused,
3098 process_bpf_events(const struct perf_tool *tool __maybe_unused,
3106 return print_event(tool, event, sample, machine, sample->pid,
3111 process_bpf_metadata_event(const struct perf_tool *tool __maybe_unused,
3119 static int process_text_poke_events(const struct perf_tool *tool,
3124 if (perf_event__process_text_poke(tool, event, sample, machine) < 0)
3127 return print_event(tool, event, sample, machine, sample->pid,
3218 script->tool.comm = process_comm_event;
3219 script->tool.fork = process_fork_event;
3220 script->tool.exit = process_exit_event;
3223 script->tool.mmap = process_mmap_event;
3224 script->tool.mmap2 = process_mmap2_event;
3227 script->tool.context_switch = process_switch_event;
3229 script->tool.auxtrace_error = process_auxtrace_error;
3231 script->tool.namespaces = process_namespaces_event;
3233 script->tool.cgroup = process_cgroup_event;
3235 script->tool.lost = process_lost_event;
3237 script->tool.ordered_events = false;
3238 script->tool.finished_round = process_finished_round_event;
3241 script->tool.ksymbol = process_bpf_events;
3242 script->tool.bpf = process_bpf_events;
3243 script->tool.bpf_metadata = process_bpf_metadata_event;
3246 script->tool.ksymbol = process_bpf_events;
3247 script->tool.text_poke = process_text_poke_events;
3871 static int process_stat_round_event(const struct perf_tool *tool __maybe_unused,
3887 static int process_stat_config_event(const struct perf_tool *tool __maybe_unused,
3922 int process_thread_map_event(const struct perf_tool *tool,
3926 struct perf_script *script = container_of(tool, struct perf_script, tool);
3944 int process_cpu_map_event(const struct perf_tool *tool,
3948 struct perf_script *script = container_of(tool, struct perf_script, tool);
3965 static int perf_script__process_auxtrace_info(const struct perf_tool *tool,
3969 int ret = perf_event__process_auxtrace_info(tool, session, event);
3972 struct perf_script *script = container_of(tool, struct perf_script, tool);
4427 perf_tool__init(&script.tool, !unsorted_dump);
4428 script.tool.sample = process_sample_event;
4429 script.tool.callchain_deferred = process_deferred_sample_event;
4430 script.tool.mmap = perf_event__process_mmap;
4431 script.tool.mmap2 = perf_event__process_mmap2;
4432 script.tool.comm = perf_event__process_comm;
4433 script.tool.namespaces = perf_event__process_namespaces;
4434 script.tool.cgroup = perf_event__process_cgroup;
4435 script.tool.exit = perf_event__process_exit;
4436 script.tool.fork = perf_event__process_fork;
4437 script.tool.attr = process_attr;
4438 script.tool.event_update = perf_event__process_event_update;
4440 script.tool.tracing_data = perf_event__process_tracing_data;
4442 script.tool.feature = perf_event__process_feature;
4443 script.tool.build_id = perf_event__process_build_id;
4444 script.tool.id_index = perf_event__process_id_index;
4445 script.tool.auxtrace_info = perf_script__process_auxtrace_info;
4446 script.tool.auxtrace = perf_event__process_auxtrace;
4447 script.tool.auxtrace_error = perf_event__process_auxtrace_error;
4448 script.tool.stat = perf_event__process_stat_event;
4449 script.tool.stat_round = process_stat_round_event;
4450 script.tool.stat_config = process_stat_config_event;
4451 script.tool.thread_map = process_thread_map_event;
4452 script.tool.cpu_map = process_cpu_map_event;
4453 script.tool.throttle = process_throttle_event;
4454 script.tool.unthrottle = process_throttle_event;
4455 script.tool.ordering_requires_timestamps = true;
4456 script.tool.merge_deferred_callchains = merge_deferred_callchains;
4457 session = perf_session__new(&data, &script.tool);
4463 script.tool.show_feat_hdr = SHOW_FEAT_HEADER;
4469 script.tool.show_feat_hdr = SHOW_FEAT_HEADER_FULL_INFO;