| /linux/tools/perf/util/ |
| H A D | tool.c | 91 static int process_event_synth_attr_stub(const struct perf_tool *tool __maybe_unused, in process_event_synth_attr_stub() 100 static int process_event_synth_event_update_stub(const struct perf_tool *tool __maybe_unused, in process_event_synth_event_update_stub() 112 int process_event_sample_stub(const struct perf_tool *tool __maybe_unused, in process_event_sample_stub() 122 static int process_event_stub(const struct perf_tool *tool __maybe_unused, in process_event_stub() 131 static int process_finished_round_stub(const struct perf_tool *tool __maybe_unused, in process_finished_round_stub() 253 void perf_tool__init(struct perf_tool *tool, bool ordered_events) in perf_tool__init() argument 255 tool->ordered_events = ordered_events; in perf_tool__init() 256 tool->ordering_requires_timestamps = false; in perf_tool__init() 257 tool->namespace_events = false; in perf_tool__init() 258 tool->cgroup_events = false; in perf_tool__init() [all …]
|
| H A D | synthetic-events.h | 44 typedef int (*perf_event__handler_t)(const struct perf_tool *tool, union perf_event *event, 47 int perf_event__synthesize_attrs(const struct perf_tool *tool, struct evlist *evlist, perf_event__h… 48 int perf_event__synthesize_attr(const struct perf_tool *tool, struct perf_event_attr *attr, u32 ids… 49 int perf_event__synthesize_build_id(const struct perf_tool *tool, 57 int perf_event__synthesize_mmap2_build_id(const struct perf_tool *tool, 68 int perf_event__synthesize_cpu_map(const struct perf_tool *tool, const struct perf_cpu_map *cpus, p… 69 int perf_event__synthesize_event_update_cpus(const struct perf_tool *tool, struct evsel *evsel, per… 70 int perf_event__synthesize_event_update_name(const struct perf_tool *tool, struct evsel *evsel, per… 71 int perf_event__synthesize_event_update_scale(const struct perf_tool *tool, struct evsel *evsel, pe… 72 int perf_event__synthesize_event_update_unit(const struct perf_tool *tool, struct evsel *evsel, per… [all …]
|
| H A D | data-convert-json.c | 35 struct perf_tool tool; member 121 static void output_sample_callchain_entry(const struct perf_tool *tool, in output_sample_callchain_entry() argument 124 struct convert_json *c = container_of(tool, struct convert_json, tool); in output_sample_callchain_entry() 149 static int process_sample_event(const struct perf_tool *tool, in process_sample_event() argument 155 struct convert_json *c = container_of(tool, struct convert_json, tool); in process_sample_event() 223 output_sample_callchain_entry(tool, ip, ok ? &tal : NULL); in process_sample_event() 227 output_sample_callchain_entry(tool, sample->ip, &al); in process_sample_event() 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() [all …]
|
| H A D | synthetic-events.c | 51 int perf_tool__process_synth_event(const struct perf_tool *tool, in perf_tool__process_synth_event() argument 66 return process(tool, event, &synth_sample, machine); in perf_tool__process_synth_event() 191 pid_t perf_event__synthesize_comm(const struct perf_tool *tool, in perf_event__synthesize_comm() argument 203 if (perf_tool__process_synth_event(tool, event, machine, process) != 0) in perf_event__synthesize_comm() 222 int perf_event__synthesize_namespaces(const struct perf_tool *tool, in perf_event__synthesize_namespaces() argument 231 if (!tool || !tool->namespace_events) in perf_event__synthesize_namespaces() 255 if (perf_tool__process_synth_event(tool, event, machine, process) != 0) in perf_event__synthesize_namespaces() 261 static int perf_event__synthesize_fork(const struct perf_tool *tool, in perf_event__synthesize_fork() argument 288 if (perf_tool__process_synth_event(tool, event, machine, process) != 0) in perf_event__synthesize_fork() 428 int perf_event__synthesize_mmap_events(const struct perf_tool *tool, in perf_event__synthesize_mmap_events() argument [all …]
|
| H A D | session.c | 46 const struct perf_tool *tool, 135 session->tool, event->file_offset, in ordered_events__deliver_event() 140 struct perf_tool *tool, in __perf_session__new() argument 151 session->tool = tool; in __perf_session__new() 217 if ((!data || !data->is_pipe) && tool && tool->ordering_requires_timestamps && in __perf_session__new() 218 tool->ordered_events && !evlist__sample_id_all(session->evlist)) { in __perf_session__new() 220 tool->ordered_events = false; in __perf_session__new() 780 int perf_event__process_finished_round(const struct perf_tool *tool __maybe_unused, in perf_event__process_finished_round() 1186 const struct perf_tool *tool, in deliver_sample_value() argument 1220 return tool->sample(tool, event, sample, evsel, machine); in deliver_sample_value() [all …]
|
| H A D | event.h | 301 int perf_event__process_comm(const struct perf_tool *tool, 305 int perf_event__process_lost(const struct perf_tool *tool, 309 int perf_event__process_lost_samples(const struct perf_tool *tool, 313 int perf_event__process_aux(const struct perf_tool *tool, 317 int perf_event__process_itrace_start(const struct perf_tool *tool, 321 int perf_event__process_aux_output_hw_id(const struct perf_tool *tool, 325 int perf_event__process_switch(const struct perf_tool *tool, 329 int perf_event__process_namespaces(const struct perf_tool *tool, 333 int perf_event__process_cgroup(const struct perf_tool *tool, 337 int perf_event__process_mmap(const struct perf_tool *tool, [all …]
|
| H A D | tool.h | 18 typedef int (*event_sample)(const struct perf_tool *tool, union perf_event *event, 22 typedef int (*event_op)(const struct perf_tool *tool, union perf_event *event, 25 typedef int (*event_attr_op)(const struct perf_tool *tool, 34 typedef int (*event_oe)(const struct perf_tool *tool, union perf_event *event, 93 void perf_tool__init(struct perf_tool *tool, bool ordered_events); 95 bool perf_tool__compressed_is_stub(const struct perf_tool *tool); 97 int process_event_sample_stub(const struct perf_tool *tool,
|
| /linux/tools/tracing/rtla/src/ |
| H A D | common.c | 44 common_apply_config(struct osnoise_tool *tool, struct common_params *params) in common_apply_config() argument 51 retval = osnoise_set_cpus(tool->context, params->cpus ? params->cpus : "all"); in common_apply_config() 85 retval = osnoise_set_workload(tool->context, params->kernel_workload); in common_apply_config() 102 struct osnoise_tool *tool; in run_tool() local 110 tool = ops->init_tool(params); in run_tool() 111 if (!tool) { in run_tool() 115 tool->ops = ops; in run_tool() 116 tool->params = params; in run_tool() 123 trace_inst = &tool->trace; in run_tool() 125 retval = ops->apply_config(tool); in run_tool() [all …]
|
| H A D | timerlat.c | 29 timerlat_apply_config(struct osnoise_tool *tool, struct timerlat_params *params) in timerlat_apply_config() argument 40 } else if (!tep_find_event_by_name(tool->trace.tep, "osnoise", "timerlat_sample")) { in timerlat_apply_config() 56 retval = osnoise_set_stop_us(tool->context, params->common.stop_us); in timerlat_apply_config() 62 retval = osnoise_set_stop_total_us(tool->context, params->common.stop_total_us); in timerlat_apply_config() 70 retval = osnoise_set_timerlat_period_us(tool->context, in timerlat_apply_config() 80 retval = osnoise_set_print_stack(tool->context, params->print_stack); in timerlat_apply_config() 102 return common_apply_config(tool, ¶ms->common); in timerlat_apply_config() 108 int timerlat_enable(struct osnoise_tool *tool) in timerlat_enable() argument 110 struct timerlat_params *params = to_timerlat_params(tool->params); in timerlat_enable() 144 tool->aa = osnoise_init_tool("timerlat_aa"); in timerlat_enable() [all …]
|
| H A D | osnoise_hist.c | 57 static void osnoise_free_hist_tool(struct osnoise_tool *tool) in osnoise_free_hist_tool() argument 59 osnoise_free_histogram(tool->data); in osnoise_free_hist_tool() 100 static void osnoise_hist_update_multiple(struct osnoise_tool *tool, int cpu, in osnoise_hist_update_multiple() argument 103 struct osnoise_params *params = to_osnoise_params(tool->params); in osnoise_hist_update_multiple() 104 struct osnoise_hist_data *data = tool->data; in osnoise_hist_update_multiple() 132 static void osnoise_destroy_trace_hist(struct osnoise_tool *tool) in osnoise_destroy_trace_hist() argument 134 struct osnoise_hist_data *data = tool->data; in osnoise_destroy_trace_hist() 136 tracefs_hist_pause(tool->trace.inst, data->trace_hist); in osnoise_destroy_trace_hist() 137 tracefs_hist_destroy(tool->trace.inst, data->trace_hist); in osnoise_destroy_trace_hist() 143 static int osnoise_init_trace_hist(struct osnoise_tool *tool) in osnoise_init_trace_hist() argument [all …]
|
| H A D | timerlat_aa.c | 115 struct osnoise_tool *tool; member 494 function = tep_find_function(taa_ctx->tool->trace.tep, caller[i]); in timerlat_aa_stack_handler() 706 struct trace_instance *trace = &taa_ctx->tool->trace; in timerlat_auto_analysis_collect_trace() 771 tep = taa_ctx->tool->trace.tep; in timerlat_auto_analysis() 896 static void timerlat_aa_unregister_events(struct osnoise_tool *tool, int dump_tasks) in timerlat_aa_unregister_events() argument 899 tep_unregister_event_handler(tool->trace.tep, -1, "ftrace", "timerlat", in timerlat_aa_unregister_events() 900 timerlat_aa_handler, tool); in timerlat_aa_unregister_events() 902 tracefs_event_disable(tool->trace.inst, "osnoise", NULL); in timerlat_aa_unregister_events() 904 tep_unregister_event_handler(tool->trace.tep, -1, "osnoise", "nmi_noise", in timerlat_aa_unregister_events() 905 timerlat_aa_nmi_handler, tool); in timerlat_aa_unregister_events() [all …]
|
| H A D | common.h | 134 int (*apply_config)(struct osnoise_tool *tool); 135 int (*enable)(struct osnoise_tool *tool); 136 int (*main)(struct osnoise_tool *tool); 137 void (*print_stats)(struct osnoise_tool *tool); 138 void (*analyze)(struct osnoise_tool *tool, bool stopped); 139 void (*free)(struct osnoise_tool *tool); 150 bool osnoise_trace_is_off(struct osnoise_tool *tool, struct osnoise_tool *record); 152 int common_apply_config(struct osnoise_tool *tool, struct common_params *params); 153 int top_main_loop(struct osnoise_tool *tool); 154 int hist_main_loop(struct osnoise_tool *tool);
|
| H A D | osnoise_top.c | 46 static void osnoise_free_top_tool(struct osnoise_tool *tool) in osnoise_free_top_tool() argument 48 osnoise_free_top(tool->data); in osnoise_free_top_tool() 84 struct osnoise_tool *tool; in osnoise_top_handler() local 90 tool = container_of(trace, struct osnoise_tool, trace); in osnoise_top_handler() 92 data = tool->data; in osnoise_top_handler() 189 static void osnoise_top_print(struct osnoise_tool *tool, int cpu) in osnoise_top_print() argument 191 struct osnoise_params *params = to_osnoise_params(tool->params); in osnoise_top_print() 192 struct trace_seq *s = tool->trace.seq; in osnoise_top_print() 198 data = tool->data; in osnoise_top_print() 554 osnoise_top_apply_config(struct osnoise_tool *tool) in osnoise_top_apply_config() argument [all …]
|
| H A D | timerlat_hist.c | 76 static void timerlat_free_histogram_tool(struct osnoise_tool *tool) in timerlat_free_histogram_tool() argument 78 timerlat_free_histogram(tool->data); in timerlat_free_histogram_tool() 79 timerlat_free(tool); in timerlat_free_histogram_tool() 137 timerlat_hist_update(struct osnoise_tool *tool, int cpu, in timerlat_hist_update() argument 141 struct timerlat_params *params = to_timerlat_params(tool->params); in timerlat_hist_update() 142 struct timerlat_hist_data *data = tool->data; in timerlat_hist_update() 187 struct osnoise_tool *tool; in timerlat_hist_handler() local 190 tool = container_of(trace, struct osnoise_tool, trace); in timerlat_hist_handler() 195 timerlat_hist_update(tool, cpu, context, latency); in timerlat_hist_handler() 203 static int timerlat_hist_bpf_pull_data(struct osnoise_tool *tool) in timerlat_hist_bpf_pull_data() argument [all …]
|
| H A D | osnoise.c | 1070 bool osnoise_trace_is_off(struct osnoise_tool *tool, struct osnoise_tool *record) in osnoise_trace_is_off() argument 1076 if (!tracefs_trace_is_on(tool->trace.inst)) in osnoise_trace_is_off() 1091 osnoise_report_missed_events(struct osnoise_tool *tool) in osnoise_report_missed_events() argument 1095 if (tool->trace.missed_events == UINT64_MAX) in osnoise_report_missed_events() 1097 else if (tool->trace.missed_events > 0) { in osnoise_report_missed_events() 1098 total_events = tool->trace.processed_events + tool->trace.missed_events; in osnoise_report_missed_events() 1101 tool->trace.missed_events, in osnoise_report_missed_events() 1102 (double) tool->trace.missed_events / total_events * 100.0); in osnoise_report_missed_events() 1110 osnoise_apply_config(struct osnoise_tool *tool, struct osnoise_params *params) in osnoise_apply_config() argument 1117 retval = osnoise_set_runtime_period(tool->context, in osnoise_apply_config() [all …]
|
| H A D | timerlat.h | 34 int timerlat_apply_config(struct osnoise_tool *tool, struct timerlat_params *params); 36 int timerlat_enable(struct osnoise_tool *tool); 37 void timerlat_analyze(struct osnoise_tool *tool, bool stopped); 38 void timerlat_free(struct osnoise_tool *tool);
|
| H A D | timerlat_top.c | 57 static void timerlat_free_top_tool(struct osnoise_tool *tool) in timerlat_free_top_tool() argument 59 timerlat_free_top(tool->data); in timerlat_free_top_tool() 60 timerlat_free(tool); in timerlat_free_top_tool() 106 timerlat_top_update_sum(struct osnoise_tool *tool, int cpu, struct timerlat_top_cpu *sum) in timerlat_top_update_sum() argument 108 struct timerlat_top_data *data = tool->data; in timerlat_top_update_sum() 131 timerlat_top_update(struct osnoise_tool *tool, int cpu, in timerlat_top_update() argument 135 struct timerlat_params *params = to_timerlat_params(tool->params); in timerlat_top_update() 136 struct timerlat_top_data *data = tool->data; in timerlat_top_update() 190 static int timerlat_top_bpf_pull_data(struct osnoise_tool *tool) in timerlat_top_bpf_pull_data() argument 192 struct timerlat_top_data *data = tool->data; in timerlat_top_bpf_pull_data() [all …]
|
| /linux/tools/perf/ |
| H A D | builtin-inject.c | 81 struct perf_tool tool; member 115 struct perf_tool tool; member 144 static int tool__inject_build_id(const struct perf_tool *tool, 151 static int tool__inject_mmap2_build_id(const struct perf_tool *tool, 174 static int perf_event__repipe_synth(const struct perf_tool *tool, in perf_event__repipe_synth() argument 178 struct perf_inject *inject = container_of(tool, struct perf_inject, in perf_event__repipe_synth() 179 tool); in perf_event__repipe_synth() 184 static int perf_event__repipe_oe_synth(const struct perf_tool *tool, in perf_event__repipe_oe_synth() argument 188 return perf_event__repipe_synth(tool, event); in perf_event__repipe_oe_synth() 192 static int perf_event__drop_oe(const struct perf_tool *tool __maybe_unused, in perf_event__drop_oe() [all …]
|
| H A D | builtin-mem.c | 32 struct perf_tool tool; member 180 dump_raw_samples(const struct perf_tool *tool, in dump_raw_samples() argument 185 struct perf_mem *mem = container_of(tool, struct perf_mem, tool); in dump_raw_samples() 254 static int process_sample_event(const struct perf_tool *tool, in process_sample_event() argument 260 return dump_raw_samples(tool, event, sample, machine); in process_sample_event() 279 perf_tool__init(&mem->tool, /*ordered_events=*/true); in report_raw_events() 280 mem->tool.sample = process_sample_event; in report_raw_events() 281 mem->tool.mmap = perf_event__process_mmap; in report_raw_events() 282 mem->tool.mmap2 = perf_event__process_mmap2; in report_raw_events() 283 mem->tool.comm = perf_event__process_comm; in report_raw_events() [all …]
|
| H A D | builtin-report.c | 77 struct perf_tool tool; member 246 struct report *rep = container_of(session->tool, struct report, tool); in process_feature_event() 268 static int process_sample_event(const struct perf_tool *tool, in process_sample_event() argument 274 struct report *rep = container_of(tool, struct report, tool); in process_sample_event() 348 static int process_read_event(const struct perf_tool *tool, in process_read_event() argument 354 struct report *rep = container_of(tool, struct report, tool); in process_read_event() 783 static int count_sample_event(const struct perf_tool *tool __maybe_unused, in count_sample_event() 795 static int count_lost_samples_event(const struct perf_tool *tool, in count_lost_samples_event() argument 800 struct report *rep = container_of(tool, struct report, tool); in count_lost_samples_event() 816 static int process_attr(const struct perf_tool *tool __maybe_unused, [all …]
|
| H A D | builtin-script.c | 146 struct perf_tool tool; member 2431 static int process_sample_event(const struct perf_tool *tool, in process_sample_event() argument 2437 struct perf_script *scr = container_of(tool, struct perf_script, tool); in process_sample_event() 2518 static int process_attr(const struct perf_tool *tool, union perf_event *event, in process_attr() argument 2521 struct perf_script *scr = container_of(tool, struct perf_script, tool); in process_attr() 2527 err = perf_event__process_attr(tool, event, pevlist); in process_attr() 2584 static int print_event_with_time(const struct perf_tool *tool, in print_event_with_time() argument 2590 struct perf_script *script = container_of(tool, struct perf_script, tool); in print_event_with_time() 2620 static int print_event(const struct perf_tool *tool, union perf_event *event, in print_event() argument 2624 return print_event_with_time(tool, event, sample, machine, pid, tid, 0); in print_event() [all …]
|
| H A D | builtin-evlist.c | 38 struct perf_tool tool; in __cmd_evlist() local 41 perf_tool__init(&tool, /*ordered_events=*/false); in __cmd_evlist() 43 tool.attr = perf_event__process_attr; in __cmd_evlist() 44 tool.feature = process_header_feature; in __cmd_evlist() 45 session = perf_session__new(&data, &tool); in __cmd_evlist()
|
| H A D | builtin-annotate.c | 50 struct perf_tool tool; member 284 static int process_sample_event(const struct perf_tool *tool, in process_sample_event() argument 290 struct perf_annotate *ann = container_of(tool, struct perf_annotate, tool); in process_sample_event() 862 perf_tool__init(&annotate.tool, /*ordered_events=*/true); in cmd_annotate() 863 annotate.tool.sample = process_sample_event; in cmd_annotate() 864 annotate.tool.mmap = perf_event__process_mmap; in cmd_annotate() 865 annotate.tool.mmap2 = perf_event__process_mmap2; in cmd_annotate() 866 annotate.tool.comm = perf_event__process_comm; in cmd_annotate() 867 annotate.tool.exit = perf_event__process_exit; in cmd_annotate() 868 annotate.tool.fork = perf_event__process_fork; in cmd_annotate() [all …]
|
| /linux/tools/perf/tests/ |
| H A D | event_update.c | 15 static int process_event_unit(const struct perf_tool *tool __maybe_unused, in process_event_unit() 28 static int process_event_scale(const struct perf_tool *tool __maybe_unused, in process_event_scale() 42 struct perf_tool tool; member 46 static int process_event_name(const struct perf_tool *tool, in process_event_name() argument 51 struct event_name *tmp = container_of(tool, struct event_name, tool); in process_event_name() 60 static int process_event_cpus(const struct perf_tool *tool __maybe_unused, in process_event_cpus() 106 perf_tool__init(&tmp.tool, /*ordered_events=*/false); in test__event_update() 110 !perf_event__synthesize_event_update_name(&tmp.tool, evsel, process_event_name)); in test__event_update() 116 !perf_event__synthesize_event_update_cpus(&tmp.tool, evsel, process_event_cpus)); in test__event_update()
|
| /linux/Documentation/tools/rtla/ |
| H A D | rtla-hwnoise.rst | 3 .. |tool| replace:: hwnoise substdef 27 The tool also allows the configurations of the *osnoise* tracer and the 40 In the example below, the **rtla hwnoise** tool is set to run on CPUs *1-7* 43 The tool is set to detect any noise higher than *one microsecond*, 61 *Periods* the tool ran during the session. The *Runtime* is the time 62 the tool effectively runs on the CPU. The *Noise* column is the sum of 63 all noise that the tool observed, and the *% CPU Aval* is the relation 66 The *Max Noise* column is the maximum hardware noise the tool detected in a 70 occurrence observed by the tool. 80 The tool should report *0* hardware-related noise in the ideal situation.
|