Lines Matching full:event

42 						  union perf_event *event, u64 file_offset,  in perf_session__process_compressed_event()  argument
74 src = (void *)event + sizeof(struct perf_record_compressed); in perf_session__process_compressed_event()
75 src_size = event->pack.header.size - sizeof(struct perf_record_compressed); in perf_session__process_compressed_event()
103 union perf_event *event,
182 struct ordered_event *event) in ordered_events__deliver_event() argument
187 return perf_session__deliver_event(session, event->event, in ordered_events__deliver_event()
188 session->tool, event->file_offset, in ordered_events__deliver_event()
189 event->file_path); in ordered_events__deliver_event()
256 * kernel MMAP event, in perf_event__process_mmap(). in __perf_session__new()
322 union perf_event *event in process_event_synth_tracing_data_stub()
330 union perf_event *event __maybe_unused, in process_event_synth_attr_stub()
339 union perf_event *event __maybe_unused, in process_event_synth_event_update_stub()
344 perf_event__fprintf_event_update(event, stdout); in process_event_synth_event_update_stub()
351 union perf_event *event __maybe_unused, in process_event_sample_stub()
361 union perf_event *event __maybe_unused, in process_event_stub()
370 union perf_event *event __maybe_unused, in process_finished_round_stub()
393 union perf_event *event) in process_event_auxtrace_stub() argument
397 skipn(perf_data__fd(session->data), event->auxtrace.size); in process_event_auxtrace_stub()
398 return event->auxtrace.size; in process_event_auxtrace_stub()
402 union perf_event *event __maybe_unused) in process_event_op2_stub()
411 union perf_event *event __maybe_unused) in process_event_thread_map_stub()
414 perf_event__fprintf_thread_map(event, stdout); in process_event_thread_map_stub()
422 union perf_event *event __maybe_unused) in process_event_cpu_map_stub()
425 perf_event__fprintf_cpu_map(event, stdout); in process_event_cpu_map_stub()
433 union perf_event *event __maybe_unused) in process_event_stat_config_stub()
436 perf_event__fprintf_stat_config(event, stdout); in process_event_stat_config_stub()
443 union perf_event *event) in process_stat_stub() argument
446 perf_event__fprintf_stat(event, stdout); in process_stat_stub()
453 union perf_event *event) in process_stat_round_stub() argument
456 perf_event__fprintf_stat_round(event, stdout); in process_stat_round_stub()
463 union perf_event *event) in process_event_time_conv_stub() argument
466 perf_event__fprintf_time_conv(event, stdout); in process_event_time_conv_stub()
473 union perf_event *event __maybe_unused, in perf_session__process_compressed_event_stub()
565 static void swap_sample_id_all(union perf_event *event, void *data) in swap_sample_id_all() argument
567 void *end = (void *) event + event->header.size; in swap_sample_id_all()
574 static void perf_event__all64_swap(union perf_event *event, in perf_event__all64_swap() argument
577 struct perf_event_header *hdr = &event->header; in perf_event__all64_swap()
578 mem_bswap_64(hdr + 1, event->header.size - sizeof(*hdr)); in perf_event__all64_swap()
581 static void perf_event__comm_swap(union perf_event *event, bool sample_id_all) in perf_event__comm_swap() argument
583 event->comm.pid = bswap_32(event->comm.pid); in perf_event__comm_swap()
584 event->comm.tid = bswap_32(event->comm.tid); in perf_event__comm_swap()
587 void *data = &event->comm.comm; in perf_event__comm_swap()
590 swap_sample_id_all(event, data); in perf_event__comm_swap()
594 static void perf_event__mmap_swap(union perf_event *event, in perf_event__mmap_swap() argument
597 event->mmap.pid = bswap_32(event->mmap.pid); in perf_event__mmap_swap()
598 event->mmap.tid = bswap_32(event->mmap.tid); in perf_event__mmap_swap()
599 event->mmap.start = bswap_64(event->mmap.start); in perf_event__mmap_swap()
600 event->mmap.len = bswap_64(event->mmap.len); in perf_event__mmap_swap()
601 event->mmap.pgoff = bswap_64(event->mmap.pgoff); in perf_event__mmap_swap()
604 void *data = &event->mmap.filename; in perf_event__mmap_swap()
607 swap_sample_id_all(event, data); in perf_event__mmap_swap()
611 static void perf_event__mmap2_swap(union perf_event *event, in perf_event__mmap2_swap() argument
614 event->mmap2.pid = bswap_32(event->mmap2.pid); in perf_event__mmap2_swap()
615 event->mmap2.tid = bswap_32(event->mmap2.tid); in perf_event__mmap2_swap()
616 event->mmap2.start = bswap_64(event->mmap2.start); in perf_event__mmap2_swap()
617 event->mmap2.len = bswap_64(event->mmap2.len); in perf_event__mmap2_swap()
618 event->mmap2.pgoff = bswap_64(event->mmap2.pgoff); in perf_event__mmap2_swap()
620 if (!(event->header.misc & PERF_RECORD_MISC_MMAP_BUILD_ID)) { in perf_event__mmap2_swap()
621 event->mmap2.maj = bswap_32(event->mmap2.maj); in perf_event__mmap2_swap()
622 event->mmap2.min = bswap_32(event->mmap2.min); in perf_event__mmap2_swap()
623 event->mmap2.ino = bswap_64(event->mmap2.ino); in perf_event__mmap2_swap()
624 event->mmap2.ino_generation = bswap_64(event->mmap2.ino_generation); in perf_event__mmap2_swap()
628 void *data = &event->mmap2.filename; in perf_event__mmap2_swap()
631 swap_sample_id_all(event, data); in perf_event__mmap2_swap()
634 static void perf_event__task_swap(union perf_event *event, bool sample_id_all) in perf_event__task_swap() argument
636 event->fork.pid = bswap_32(event->fork.pid); in perf_event__task_swap()
637 event->fork.tid = bswap_32(event->fork.tid); in perf_event__task_swap()
638 event->fork.ppid = bswap_32(event->fork.ppid); in perf_event__task_swap()
639 event->fork.ptid = bswap_32(event->fork.ptid); in perf_event__task_swap()
640 event->fork.time = bswap_64(event->fork.time); in perf_event__task_swap()
643 swap_sample_id_all(event, &event->fork + 1); in perf_event__task_swap()
646 static void perf_event__read_swap(union perf_event *event, bool sample_id_all) in perf_event__read_swap() argument
648 event->read.pid = bswap_32(event->read.pid); in perf_event__read_swap()
649 event->read.tid = bswap_32(event->read.tid); in perf_event__read_swap()
650 event->read.value = bswap_64(event->read.value); in perf_event__read_swap()
651 event->read.time_enabled = bswap_64(event->read.time_enabled); in perf_event__read_swap()
652 event->read.time_running = bswap_64(event->read.time_running); in perf_event__read_swap()
653 event->read.id = bswap_64(event->read.id); in perf_event__read_swap()
656 swap_sample_id_all(event, &event->read + 1); in perf_event__read_swap()
659 static void perf_event__aux_swap(union perf_event *event, bool sample_id_all) in perf_event__aux_swap() argument
661 event->aux.aux_offset = bswap_64(event->aux.aux_offset); in perf_event__aux_swap()
662 event->aux.aux_size = bswap_64(event->aux.aux_size); in perf_event__aux_swap()
663 event->aux.flags = bswap_64(event->aux.flags); in perf_event__aux_swap()
666 swap_sample_id_all(event, &event->aux + 1); in perf_event__aux_swap()
669 static void perf_event__itrace_start_swap(union perf_event *event, in perf_event__itrace_start_swap() argument
672 event->itrace_start.pid = bswap_32(event->itrace_start.pid); in perf_event__itrace_start_swap()
673 event->itrace_start.tid = bswap_32(event->itrace_start.tid); in perf_event__itrace_start_swap()
676 swap_sample_id_all(event, &event->itrace_start + 1); in perf_event__itrace_start_swap()
679 static void perf_event__switch_swap(union perf_event *event, bool sample_id_all) in perf_event__switch_swap() argument
681 if (event->header.type == PERF_RECORD_SWITCH_CPU_WIDE) { in perf_event__switch_swap()
682 event->context_switch.next_prev_pid = in perf_event__switch_swap()
683 bswap_32(event->context_switch.next_prev_pid); in perf_event__switch_swap()
684 event->context_switch.next_prev_tid = in perf_event__switch_swap()
685 bswap_32(event->context_switch.next_prev_tid); in perf_event__switch_swap()
689 swap_sample_id_all(event, &event->context_switch + 1); in perf_event__switch_swap()
692 static void perf_event__text_poke_swap(union perf_event *event, bool sample_id_all) in perf_event__text_poke_swap() argument
694 event->text_poke.addr = bswap_64(event->text_poke.addr); in perf_event__text_poke_swap()
695 event->text_poke.old_len = bswap_16(event->text_poke.old_len); in perf_event__text_poke_swap()
696 event->text_poke.new_len = bswap_16(event->text_poke.new_len); in perf_event__text_poke_swap()
699 size_t len = sizeof(event->text_poke.old_len) + in perf_event__text_poke_swap()
700 sizeof(event->text_poke.new_len) + in perf_event__text_poke_swap()
701 event->text_poke.old_len + in perf_event__text_poke_swap()
702 event->text_poke.new_len; in perf_event__text_poke_swap()
703 void *data = &event->text_poke.old_len; in perf_event__text_poke_swap()
706 swap_sample_id_all(event, data); in perf_event__text_poke_swap()
710 static void perf_event__throttle_swap(union perf_event *event, in perf_event__throttle_swap() argument
713 event->throttle.time = bswap_64(event->throttle.time); in perf_event__throttle_swap()
714 event->throttle.id = bswap_64(event->throttle.id); in perf_event__throttle_swap()
715 event->throttle.stream_id = bswap_64(event->throttle.stream_id); in perf_event__throttle_swap()
718 swap_sample_id_all(event, &event->throttle + 1); in perf_event__throttle_swap()
721 static void perf_event__namespaces_swap(union perf_event *event, in perf_event__namespaces_swap() argument
726 event->namespaces.pid = bswap_32(event->namespaces.pid); in perf_event__namespaces_swap()
727 event->namespaces.tid = bswap_32(event->namespaces.tid); in perf_event__namespaces_swap()
728 event->namespaces.nr_namespaces = bswap_64(event->namespaces.nr_namespaces); in perf_event__namespaces_swap()
730 for (i = 0; i < event->namespaces.nr_namespaces; i++) { in perf_event__namespaces_swap()
731 struct perf_ns_link_info *ns = &event->namespaces.link_info[i]; in perf_event__namespaces_swap()
738 swap_sample_id_all(event, &event->namespaces.link_info[i]); in perf_event__namespaces_swap()
741 static void perf_event__cgroup_swap(union perf_event *event, bool sample_id_all) in perf_event__cgroup_swap() argument
743 event->cgroup.id = bswap_64(event->cgroup.id); in perf_event__cgroup_swap()
746 void *data = &event->cgroup.path; in perf_event__cgroup_swap()
749 swap_sample_id_all(event, data); in perf_event__cgroup_swap()
831 static void perf_event__hdr_attr_swap(union perf_event *event, in perf_event__hdr_attr_swap() argument
836 perf_event__attr_swap(&event->attr.attr); in perf_event__hdr_attr_swap()
838 size = event->header.size; in perf_event__hdr_attr_swap()
839 size -= (void *)&event->attr.id - (void *)event; in perf_event__hdr_attr_swap()
840 mem_bswap_64(event->attr.id, size); in perf_event__hdr_attr_swap()
843 static void perf_event__event_update_swap(union perf_event *event, in perf_event__event_update_swap() argument
846 event->event_update.type = bswap_64(event->event_update.type); in perf_event__event_update_swap()
847 event->event_update.id = bswap_64(event->event_update.id); in perf_event__event_update_swap()
850 static void perf_event__event_type_swap(union perf_event *event, in perf_event__event_type_swap() argument
853 event->event_type.event_type.event_id = in perf_event__event_type_swap()
854 bswap_64(event->event_type.event_type.event_id); in perf_event__event_type_swap()
857 static void perf_event__tracing_data_swap(union perf_event *event, in perf_event__tracing_data_swap() argument
860 event->tracing_data.size = bswap_32(event->tracing_data.size); in perf_event__tracing_data_swap()
863 static void perf_event__auxtrace_info_swap(union perf_event *event, in perf_event__auxtrace_info_swap() argument
868 event->auxtrace_info.type = bswap_32(event->auxtrace_info.type); in perf_event__auxtrace_info_swap()
870 size = event->header.size; in perf_event__auxtrace_info_swap()
871 size -= (void *)&event->auxtrace_info.priv - (void *)event; in perf_event__auxtrace_info_swap()
872 mem_bswap_64(event->auxtrace_info.priv, size); in perf_event__auxtrace_info_swap()
875 static void perf_event__auxtrace_swap(union perf_event *event, in perf_event__auxtrace_swap() argument
878 event->auxtrace.size = bswap_64(event->auxtrace.size); in perf_event__auxtrace_swap()
879 event->auxtrace.offset = bswap_64(event->auxtrace.offset); in perf_event__auxtrace_swap()
880 event->auxtrace.reference = bswap_64(event->auxtrace.reference); in perf_event__auxtrace_swap()
881 event->auxtrace.idx = bswap_32(event->auxtrace.idx); in perf_event__auxtrace_swap()
882 event->auxtrace.tid = bswap_32(event->auxtrace.tid); in perf_event__auxtrace_swap()
883 event->auxtrace.cpu = bswap_32(event->auxtrace.cpu); in perf_event__auxtrace_swap()
886 static void perf_event__auxtrace_error_swap(union perf_event *event, in perf_event__auxtrace_error_swap() argument
889 event->auxtrace_error.type = bswap_32(event->auxtrace_error.type); in perf_event__auxtrace_error_swap()
890 event->auxtrace_error.code = bswap_32(event->auxtrace_error.code); in perf_event__auxtrace_error_swap()
891 event->auxtrace_error.cpu = bswap_32(event->auxtrace_error.cpu); in perf_event__auxtrace_error_swap()
892 event->auxtrace_error.pid = bswap_32(event->auxtrace_error.pid); in perf_event__auxtrace_error_swap()
893 event->auxtrace_error.tid = bswap_32(event->auxtrace_error.tid); in perf_event__auxtrace_error_swap()
894 event->auxtrace_error.fmt = bswap_32(event->auxtrace_error.fmt); in perf_event__auxtrace_error_swap()
895 event->auxtrace_error.ip = bswap_64(event->auxtrace_error.ip); in perf_event__auxtrace_error_swap()
896 if (event->auxtrace_error.fmt) in perf_event__auxtrace_error_swap()
897 event->auxtrace_error.time = bswap_64(event->auxtrace_error.time); in perf_event__auxtrace_error_swap()
898 if (event->auxtrace_error.fmt >= 2) { in perf_event__auxtrace_error_swap()
899 event->auxtrace_error.machine_pid = bswap_32(event->auxtrace_error.machine_pid); in perf_event__auxtrace_error_swap()
900 event->auxtrace_error.vcpu = bswap_32(event->auxtrace_error.vcpu); in perf_event__auxtrace_error_swap()
904 static void perf_event__thread_map_swap(union perf_event *event, in perf_event__thread_map_swap() argument
909 event->thread_map.nr = bswap_64(event->thread_map.nr); in perf_event__thread_map_swap()
911 for (i = 0; i < event->thread_map.nr; i++) in perf_event__thread_map_swap()
912 event->thread_map.entries[i].pid = bswap_64(event->thread_map.entries[i].pid); in perf_event__thread_map_swap()
915 static void perf_event__cpu_map_swap(union perf_event *event, in perf_event__cpu_map_swap() argument
918 struct perf_record_cpu_map_data *data = &event->cpu_map.data; in perf_event__cpu_map_swap()
956 static void perf_event__stat_config_swap(union perf_event *event, in perf_event__stat_config_swap() argument
961 size = bswap_64(event->stat_config.nr) * sizeof(event->stat_config.data[0]); in perf_event__stat_config_swap()
963 mem_bswap_64(&event->stat_config.nr, size); in perf_event__stat_config_swap()
966 static void perf_event__stat_swap(union perf_event *event, in perf_event__stat_swap() argument
969 event->stat.id = bswap_64(event->stat.id); in perf_event__stat_swap()
970 event->stat.thread = bswap_32(event->stat.thread); in perf_event__stat_swap()
971 event->stat.cpu = bswap_32(event->stat.cpu); in perf_event__stat_swap()
972 event->stat.val = bswap_64(event->stat.val); in perf_event__stat_swap()
973 event->stat.ena = bswap_64(event->stat.ena); in perf_event__stat_swap()
974 event->stat.run = bswap_64(event->stat.run); in perf_event__stat_swap()
977 static void perf_event__stat_round_swap(union perf_event *event, in perf_event__stat_round_swap() argument
980 event->stat_round.type = bswap_64(event->stat_round.type); in perf_event__stat_round_swap()
981 event->stat_round.time = bswap_64(event->stat_round.time); in perf_event__stat_round_swap()
984 static void perf_event__time_conv_swap(union perf_event *event, in perf_event__time_conv_swap() argument
987 event->time_conv.time_shift = bswap_64(event->time_conv.time_shift); in perf_event__time_conv_swap()
988 event->time_conv.time_mult = bswap_64(event->time_conv.time_mult); in perf_event__time_conv_swap()
989 event->time_conv.time_zero = bswap_64(event->time_conv.time_zero); in perf_event__time_conv_swap()
991 if (event_contains(event->time_conv, time_cycles)) { in perf_event__time_conv_swap()
992 event->time_conv.time_cycles = bswap_64(event->time_conv.time_cycles); in perf_event__time_conv_swap()
993 event->time_conv.time_mask = bswap_64(event->time_conv.time_mask); in perf_event__time_conv_swap()
997 typedef void (*perf_event__swap_op)(union perf_event *event,
1040 * event.
1078 union perf_event *event __maybe_unused, in perf_event__process_finished_round()
1086 int perf_session__queue_event(struct perf_session *s, union perf_event *event, in perf_session__queue_event() argument
1089 return ordered_events__queue(&s->ordered_events, event, timestamp, file_offset, file_path); in perf_session__queue_event()
1261 static void evlist__print_tstamp(struct evlist *evlist, union perf_event *event, struct perf_sample… in evlist__print_tstamp() argument
1265 if (event->header.type != PERF_RECORD_SAMPLE && in evlist__print_tstamp()
1312 static void dump_event(struct evlist *evlist, union perf_event *event, in dump_event() argument
1319 printf("\n%#" PRIx64 "@%s [%#x]: event: %d\n", in dump_event()
1320 file_offset, file_path, event->header.size, event->header.type); in dump_event()
1322 trace_event(event); in dump_event()
1323 if (event->header.type == PERF_RECORD_SAMPLE && evlist->trace_event_sample_raw) in dump_event()
1324 evlist->trace_event_sample_raw(evlist, event, sample); in dump_event()
1327 evlist__print_tstamp(evlist, event, sample); in dump_event()
1330 event->header.size, perf_event__name(event->header.type)); in dump_event()
1341 static void dump_sample(struct evsel *evsel, union perf_event *event, in dump_sample() argument
1351 event->header.misc, sample->pid, sample->tid, sample->ip, in dump_sample()
1399 static void dump_read(struct evsel *evsel, union perf_event *event) in dump_read() argument
1401 struct perf_record_read *read_event = &event->read; in dump_read()
1407 printf(": %d %d %s %" PRI_lu64 "\n", event->read.pid, event->read.tid, in dump_read()
1408 evsel__name(evsel), event->read.value); in dump_read()
1429 union perf_event *event, in machines__find_for_cpumode() argument
1439 else if (event->header.type == PERF_RECORD_MMAP in machines__find_for_cpumode()
1440 || event->header.type == PERF_RECORD_MMAP2) in machines__find_for_cpumode()
1441 pid = event->mmap.pid; in machines__find_for_cpumode()
1460 union perf_event *event, in deliver_sample_value() argument
1487 return tool->sample(tool, event, sample, evsel, machine); in deliver_sample_value()
1492 union perf_event *event, in deliver_sample_group() argument
1501 ret = deliver_sample_value(evlist, tool, event, sample, v, in deliver_sample_group()
1511 union perf_event *event, struct perf_sample *sample, in evlist__deliver_sample() argument
1520 return tool->sample(tool, event, sample, evsel, machine); in evlist__deliver_sample()
1524 return deliver_sample_group(evlist, tool, event, sample, in evlist__deliver_sample()
1527 return deliver_sample_value(evlist, tool, event, sample, in evlist__deliver_sample()
1533 union perf_event *event, in machines__deliver_event() argument
1541 dump_event(evlist, event, file_offset, sample, file_path); in machines__deliver_event()
1545 machine = machines__find_for_cpumode(machines, event, sample); in machines__deliver_event()
1547 switch (event->header.type) { in machines__deliver_event()
1555 dump_sample(evsel, event, sample, perf_env__arch(NULL)); in machines__deliver_event()
1558 dump_sample(evsel, event, sample, perf_env__arch(machine->env)); in machines__deliver_event()
1559 return evlist__deliver_sample(evlist, tool, event, sample, evsel, machine); in machines__deliver_event()
1561 return tool->mmap(tool, event, sample, machine); in machines__deliver_event()
1563 if (event->header.misc & PERF_RECORD_MISC_PROC_MAP_PARSE_TIMEOUT) in machines__deliver_event()
1565 return tool->mmap2(tool, event, sample, machine); in machines__deliver_event()
1567 return tool->comm(tool, event, sample, machine); in machines__deliver_event()
1569 return tool->namespaces(tool, event, sample, machine); in machines__deliver_event()
1571 return tool->cgroup(tool, event, sample, machine); in machines__deliver_event()
1573 return tool->fork(tool, event, sample, machine); in machines__deliver_event()
1575 return tool->exit(tool, event, sample, machine); in machines__deliver_event()
1578 evlist->stats.total_lost += event->lost.lost; in machines__deliver_event()
1579 return tool->lost(tool, event, sample, machine); in machines__deliver_event()
1582 evlist->stats.total_lost_samples += event->lost_samples.lost; in machines__deliver_event()
1583 return tool->lost_samples(tool, event, sample, machine); in machines__deliver_event()
1585 dump_read(evsel, event); in machines__deliver_event()
1586 return tool->read(tool, event, sample, evsel, machine); in machines__deliver_event()
1588 return tool->throttle(tool, event, sample, machine); in machines__deliver_event()
1590 return tool->unthrottle(tool, event, sample, machine); in machines__deliver_event()
1593 if (event->aux.flags & PERF_AUX_FLAG_TRUNCATED) in machines__deliver_event()
1595 if (event->aux.flags & PERF_AUX_FLAG_PARTIAL) in machines__deliver_event()
1597 if (event->aux.flags & PERF_AUX_FLAG_COLLISION) in machines__deliver_event()
1600 return tool->aux(tool, event, sample, machine); in machines__deliver_event()
1602 return tool->itrace_start(tool, event, sample, machine); in machines__deliver_event()
1605 return tool->context_switch(tool, event, sample, machine); in machines__deliver_event()
1607 return tool->ksymbol(tool, event, sample, machine); in machines__deliver_event()
1609 return tool->bpf(tool, event, sample, machine); in machines__deliver_event()
1611 return tool->text_poke(tool, event, sample, machine); in machines__deliver_event()
1613 return tool->aux_output_hw_id(tool, event, sample, machine); in machines__deliver_event()
1621 union perf_event *event, in perf_session__deliver_event() argument
1627 int ret = evlist__parse_sample(session->evlist, event, &sample); in perf_session__deliver_event()
1634 ret = auxtrace__process_event(session, event, &sample, tool); in perf_session__deliver_event()
1641 event, &sample, tool, file_offset, file_path); in perf_session__deliver_event()
1650 union perf_event *event, in perf_session__process_user_event() argument
1660 if (event->header.type != PERF_RECORD_COMPRESSED || in perf_session__process_user_event()
1662 dump_event(session->evlist, event, file_offset, &sample, file_path); in perf_session__process_user_event()
1665 switch (event->header.type) { in perf_session__process_user_event()
1667 err = tool->attr(tool, event, &session->evlist); in perf_session__process_user_event()
1674 return tool->event_update(tool, event, &session->evlist); in perf_session__process_user_event()
1689 return tool->tracing_data(session, event); in perf_session__process_user_event()
1691 return tool->build_id(session, event); in perf_session__process_user_event()
1693 return tool->finished_round(tool, event, oe); in perf_session__process_user_event()
1695 return tool->id_index(session, event); in perf_session__process_user_event()
1697 return tool->auxtrace_info(session, event); in perf_session__process_user_event()
1700 lseek(fd, file_offset + event->header.size, SEEK_SET); in perf_session__process_user_event()
1701 return tool->auxtrace(session, event); in perf_session__process_user_event()
1703 perf_session__auxtrace_error_inc(session, event); in perf_session__process_user_event()
1704 return tool->auxtrace_error(session, event); in perf_session__process_user_event()
1706 return tool->thread_map(session, event); in perf_session__process_user_event()
1708 return tool->cpu_map(session, event); in perf_session__process_user_event()
1710 return tool->stat_config(session, event); in perf_session__process_user_event()
1712 return tool->stat(session, event); in perf_session__process_user_event()
1714 return tool->stat_round(session, event); in perf_session__process_user_event()
1716 session->time_conv = event->time_conv; in perf_session__process_user_event()
1717 return tool->time_conv(session, event); in perf_session__process_user_event()
1719 return tool->feature(session, event); in perf_session__process_user_event()
1721 err = tool->compressed(session, event, file_offset, file_path); in perf_session__process_user_event()
1723 dump_event(session->evlist, event, file_offset, &sample, file_path); in perf_session__process_user_event()
1726 return tool->finished_init(session, event); in perf_session__process_user_event()
1733 union perf_event *event, in perf_session__deliver_synth_event() argument
1739 events_stats__inc(&evlist->stats, event->header.type); in perf_session__deliver_synth_event()
1741 if (event->header.type >= PERF_RECORD_USER_TYPE_START) in perf_session__deliver_synth_event()
1742 return perf_session__process_user_event(session, event, 0, NULL); in perf_session__deliver_synth_event()
1744 return machines__deliver_event(&session->machines, evlist, event, sample, tool, 0, NULL); in perf_session__deliver_synth_event()
1747 static void event_swap(union perf_event *event, bool sample_id_all) in event_swap() argument
1751 swap = perf_event__swap_ops[event->header.type]; in event_swap()
1753 swap(event, sample_id_all); in event_swap()
1761 union perf_event *event; in perf_session__peek_event() local
1766 event = file_offset - session->one_mmap_offset + in perf_session__peek_event()
1784 event = (union perf_event *)buf; in perf_session__peek_event()
1787 perf_event_header__bswap(&event->header); in perf_session__peek_event()
1789 if (event->header.size < hdr_sz || event->header.size > buf_sz) in perf_session__peek_event()
1793 rest = event->header.size - hdr_sz; in perf_session__peek_event()
1799 event_swap(event, evlist__sample_id_all(session->evlist)); in perf_session__peek_event()
1803 if (sample && event->header.type < PERF_RECORD_USER_TYPE_START && in perf_session__peek_event()
1804 evlist__parse_sample(session->evlist, event, sample)) in perf_session__peek_event()
1807 *event_ptr = event; in perf_session__peek_event()
1817 union perf_event *event; in perf_session__peek_events() local
1822 PERF_SAMPLE_MAX_SIZE, &event, in perf_session__peek_events()
1827 err = cb(session, event, offset, data); in perf_session__peek_events()
1831 offset += event->header.size; in perf_session__peek_events()
1832 if (event->header.type == PERF_RECORD_AUXTRACE) in perf_session__peek_events()
1833 offset += event->auxtrace.size; in perf_session__peek_events()
1841 union perf_event *event, u64 file_offset, in perf_session__process_event() argument
1849 event_swap(event, evlist__sample_id_all(evlist)); in perf_session__process_event()
1851 if (event->header.type >= PERF_RECORD_HEADER_MAX) in perf_session__process_event()
1854 events_stats__inc(&evlist->stats, event->header.type); in perf_session__process_event()
1856 if (event->header.type >= PERF_RECORD_USER_TYPE_START) in perf_session__process_event()
1857 return perf_session__process_user_event(session, event, file_offset, file_path); in perf_session__process_event()
1862 ret = evlist__parse_sample_timestamp(evlist, event, &timestamp); in perf_session__process_event()
1866 ret = perf_session__queue_event(session, event, timestamp, file_offset, file_path); in perf_session__process_event()
1871 return perf_session__deliver_event(session, event, tool, file_offset, file_path); in perf_session__process_event()
2033 union perf_event *event; in __perf_session__process_pipe_events() local
2051 event = buf; in __perf_session__process_pipe_events()
2052 err = perf_data__read(session->data, event, in __perf_session__process_pipe_events()
2058 pr_err("failed to read event header\n"); in __perf_session__process_pipe_events()
2063 perf_event_header__bswap(&event->header); in __perf_session__process_pipe_events()
2065 size = event->header.size; in __perf_session__process_pipe_events()
2067 pr_err("bad event header size\n"); in __perf_session__process_pipe_events()
2074 pr_err("failed to allocate memory to read event\n"); in __perf_session__process_pipe_events()
2079 event = buf; in __perf_session__process_pipe_events()
2081 p = event; in __perf_session__process_pipe_events()
2089 pr_err("unexpected end of event stream\n"); in __perf_session__process_pipe_events()
2093 pr_err("failed to read event data\n"); in __perf_session__process_pipe_events()
2098 if ((skip = perf_session__process_event(session, event, head, "pipe")) < 0) { in __perf_session__process_pipe_events()
2100 head, event->header.size, event->header.type); in __perf_session__process_pipe_events()
2138 union perf_event *event; in prefetch_event() local
2143 * the size of the event in the headers. in prefetch_event()
2145 if (head + sizeof(event->header) > mmap_size) in prefetch_event()
2148 event = (union perf_event *)(buf + head); in prefetch_event()
2150 perf_event_header__bswap(&event->header); in prefetch_event()
2152 event_size = event->header.size; in prefetch_event()
2154 return event; in prefetch_event()
2156 /* We're not fetching the event so swap back again */ in prefetch_event()
2158 perf_event_header__bswap(&event->header); in prefetch_event()
2160 /* Check if the event fits into the next mmapped buf. */ in prefetch_event()
2166 /* Invalid input. Event size should never exceed mmap_size. */ in prefetch_event()
2167 pr_debug("%s: head=%#" PRIx64 " event->header.size=%#x, mmap_size=%#zx:" in prefetch_event()
2195 union perf_event *event = fetch_decomp_event(decomp->head, decomp->size, decomp->data, in __perf_session__process_decomp_events() local
2198 if (!event) in __perf_session__process_decomp_events()
2201 size = event->header.size; in __perf_session__process_decomp_events()
2204 (skip = perf_session__process_event(session, event, decomp->file_pos, in __perf_session__process_decomp_events()
2207 decomp->file_pos + decomp->head, event->header.size, event->header.type); in __perf_session__process_decomp_events()
2235 union perf_event *event,
2345 union perf_event *event; in reader__read_event() local
2348 event = fetch_mmaped_event(rd->head, rd->mmap_size, rd->mmap_cur, in reader__read_event()
2350 if (IS_ERR(event)) in reader__read_event()
2351 return PTR_ERR(event); in reader__read_event()
2353 if (!event) in reader__read_event()
2356 size = event->header.size; in reader__read_event()
2361 (skip = rd->process(session, event, rd->file_pos, rd->path)) < 0) { in reader__read_event()
2363 rd->file_offset + rd->head, event->header.size, in reader__read_event()
2364 event->header.type, strerror(-skip)); in reader__read_event()
2428 union perf_event *event, in process_simple() argument
2432 return perf_session__process_event(session, event, file_offset, file_path); in process_simple()
2807 union perf_event *event) in perf_event__process_id_index() argument
2810 struct perf_record_id_index *ie = &event->id_index; in perf_event__process_id_index()