Lines Matching refs:tool

26 #include "tool.h"
105 struct perf_tool *tool,
189 session->tool, event->file_offset,
195 struct perf_tool *tool)
204 session->tool = tool;
267 if ((!data || !data->is_pipe) && tool && tool->ordering_requires_timestamps &&
268 tool->ordered_events && !evlist__sample_id_all(session->evlist)) {
270 tool->ordered_events = false;
326 static int process_event_synth_attr_stub(struct perf_tool *tool __maybe_unused,
335 static int process_event_synth_event_update_stub(struct perf_tool *tool __maybe_unused,
347 static int process_event_sample_stub(struct perf_tool *tool __maybe_unused,
357 static int process_event_stub(struct perf_tool *tool __maybe_unused,
366 static int process_finished_round_stub(struct perf_tool *tool __maybe_unused,
478 void perf_tool__fill_defaults(struct perf_tool *tool)
480 if (tool->sample == NULL)
481 tool->sample = process_event_sample_stub;
482 if (tool->mmap == NULL)
483 tool->mmap = process_event_stub;
484 if (tool->mmap2 == NULL)
485 tool->mmap2 = process_event_stub;
486 if (tool->comm == NULL)
487 tool->comm = process_event_stub;
488 if (tool->namespaces == NULL)
489 tool->namespaces = process_event_stub;
490 if (tool->cgroup == NULL)
491 tool->cgroup = process_event_stub;
492 if (tool->fork == NULL)
493 tool->fork = process_event_stub;
494 if (tool->exit == NULL)
495 tool->exit = process_event_stub;
496 if (tool->lost == NULL)
497 tool->lost = perf_event__process_lost;
498 if (tool->lost_samples == NULL)
499 tool->lost_samples = perf_event__process_lost_samples;
500 if (tool->aux == NULL)
501 tool->aux = perf_event__process_aux;
502 if (tool->itrace_start == NULL)
503 tool->itrace_start = perf_event__process_itrace_start;
504 if (tool->context_switch == NULL)
505 tool->context_switch = perf_event__process_switch;
506 if (tool->ksymbol == NULL)
507 tool->ksymbol = perf_event__process_ksymbol;
508 if (tool->bpf == NULL)
509 tool->bpf = perf_event__process_bpf;
510 if (tool->text_poke == NULL)
511 tool->text_poke = perf_event__process_text_poke;
512 if (tool->aux_output_hw_id == NULL)
513 tool->aux_output_hw_id = perf_event__process_aux_output_hw_id;
514 if (tool->read == NULL)
515 tool->read = process_event_sample_stub;
516 if (tool->throttle == NULL)
517 tool->throttle = process_event_stub;
518 if (tool->unthrottle == NULL)
519 tool->unthrottle = process_event_stub;
520 if (tool->attr == NULL)
521 tool->attr = process_event_synth_attr_stub;
522 if (tool->event_update == NULL)
523 tool->event_update = process_event_synth_event_update_stub;
524 if (tool->tracing_data == NULL)
525 tool->tracing_data = process_event_synth_tracing_data_stub;
526 if (tool->build_id == NULL)
527 tool->build_id = process_event_op2_stub;
528 if (tool->finished_round == NULL) {
529 if (tool->ordered_events)
530 tool->finished_round = perf_event__process_finished_round;
532 tool->finished_round = process_finished_round_stub;
534 if (tool->id_index == NULL)
535 tool->id_index = process_event_op2_stub;
536 if (tool->auxtrace_info == NULL)
537 tool->auxtrace_info = process_event_op2_stub;
538 if (tool->auxtrace == NULL)
539 tool->auxtrace = process_event_auxtrace_stub;
540 if (tool->auxtrace_error == NULL)
541 tool->auxtrace_error = process_event_op2_stub;
542 if (tool->thread_map == NULL)
543 tool->thread_map = process_event_thread_map_stub;
544 if (tool->cpu_map == NULL)
545 tool->cpu_map = process_event_cpu_map_stub;
546 if (tool->stat_config == NULL)
547 tool->stat_config = process_event_stat_config_stub;
548 if (tool->stat == NULL)
549 tool->stat = process_stat_stub;
550 if (tool->stat_round == NULL)
551 tool->stat_round = process_stat_round_stub;
552 if (tool->time_conv == NULL)
553 tool->time_conv = process_event_time_conv_stub;
554 if (tool->feature == NULL)
555 tool->feature = process_event_op2_stub;
556 if (tool->compressed == NULL)
557 tool->compressed = perf_session__process_compressed_event;
558 if (tool->finished_init == NULL)
559 tool->finished_init = process_event_op2_stub;
1074 int perf_event__process_finished_round(struct perf_tool *tool __maybe_unused,
1457 struct perf_tool *tool,
1485 return tool->sample(tool, event, sample, evsel, machine);
1489 struct perf_tool *tool,
1499 ret = deliver_sample_value(evlist, tool, event, sample, v,
1508 static int evlist__deliver_sample(struct evlist *evlist, struct perf_tool *tool,
1518 return tool->sample(tool, event, sample, evsel, machine);
1522 return deliver_sample_group(evlist, tool, event, sample,
1525 return deliver_sample_value(evlist, tool, event, sample,
1533 struct perf_tool *tool, u64 file_offset,
1557 return evlist__deliver_sample(evlist, tool, event, sample, evsel, machine);
1559 return tool->mmap(tool, event, sample, machine);
1563 return tool->mmap2(tool, event, sample, machine);
1565 return tool->comm(tool, event, sample, machine);
1567 return tool->namespaces(tool, event, sample, machine);
1569 return tool->cgroup(tool, event, sample, machine);
1571 return tool->fork(tool, event, sample, machine);
1573 return tool->exit(tool, event, sample, machine);
1575 if (tool->lost == perf_event__process_lost)
1577 return tool->lost(tool, event, sample, machine);
1579 if (tool->lost_samples == perf_event__process_lost_samples &&
1582 return tool->lost_samples(tool, event, sample, machine);
1585 return tool->read(tool, event, sample, evsel, machine);
1587 return tool->throttle(tool, event, sample, machine);
1589 return tool->unthrottle(tool, event, sample, machine);
1591 if (tool->aux == perf_event__process_aux) {
1599 return tool->aux(tool, event, sample, machine);
1601 return tool->itrace_start(tool, event, sample, machine);
1604 return tool->context_switch(tool, event, sample, machine);
1606 return tool->ksymbol(tool, event, sample, machine);
1608 return tool->bpf(tool, event, sample, machine);
1610 return tool->text_poke(tool, event, sample, machine);
1612 return tool->aux_output_hw_id(tool, event, sample, machine);
1621 struct perf_tool *tool,
1633 ret = auxtrace__process_event(session, event, &sample, tool);
1640 event, &sample, tool, file_offset, file_path);
1654 struct perf_tool *tool = session->tool;
1660 tool->compressed == perf_session__process_compressed_event_stub)
1666 err = tool->attr(tool, event, &session->evlist);
1673 return tool->event_update(tool, event, &session->evlist);
1688 return tool->tracing_data(session, event);
1690 return tool->build_id(session, event);
1692 return tool->finished_round(tool, event, oe);
1694 return tool->id_index(session, event);
1696 return tool->auxtrace_info(session, event);
1705 return tool->auxtrace(session, event);
1708 return tool->auxtrace_error(session, event);
1710 return tool->thread_map(session, event);
1712 return tool->cpu_map(session, event);
1714 return tool->stat_config(session, event);
1716 return tool->stat(session, event);
1718 return tool->stat_round(session, event);
1721 return tool->time_conv(session, event);
1723 return tool->feature(session, event);
1725 err = tool->compressed(session, event, file_offset, file_path);
1730 return tool->finished_init(session, event);
1741 struct perf_tool *tool = session->tool;
1748 return machines__deliver_event(&session->machines, evlist, event, sample, tool, 0, NULL);
1849 struct perf_tool *tool = session->tool;
1863 if (tool->ordered_events) {
1875 return perf_session__deliver_event(session, event, tool, file_offset, file_path);
1921 if (session->tool->lost == perf_event__process_lost &&
1929 if (session->tool->lost_samples == perf_event__process_lost_samples) {
1941 if (session->tool->aux == perf_event__process_aux &&
1948 if (session->tool->aux == perf_event__process_aux &&
1965 if (session->tool->aux == perf_event__process_aux &&
1974 "Is this an older tool processing a perf.data "
1975 "file generated by a more recent tool?\n\n"
2036 struct perf_tool *tool = session->tool;
2045 perf_tool__fill_defaults(tool);
2125 err = auxtrace__flush_events(session, tool);
2131 if (!tool->no_warn)
2450 struct perf_tool *tool = session->tool;
2454 perf_tool__fill_defaults(tool);
2468 err = auxtrace__flush_events(session, tool);
2474 if (!tool->no_warn)
2502 struct perf_tool *tool = session->tool;
2508 perf_tool__fill_defaults(tool);
2597 if (!tool->no_warn)