Lines Matching defs:machine
9 #include "util/machine.h"
52 struct machine *machine,
65 return process(tool, event, &synth_sample, machine);
154 struct machine *machine,
163 if (machine__is_host(machine)) {
170 *tgid = machine->pid;
181 memset(event->comm.comm + size, 0, machine->id_hdr_size);
184 machine->id_hdr_size);
193 struct machine *machine)
198 if (perf_event__prepare_comm(event, 0, pid, machine, &tgid, &ppid,
202 if (perf_tool__process_synth_event(tool, event, machine, process) != 0)
225 struct machine *machine)
235 machine->id_hdr_size));
252 machine->id_hdr_size);
254 if (perf_tool__process_synth_event(tool, event, machine, process) != 0)
264 struct machine *machine)
266 memset(&event->fork, 0, sizeof(event->fork) + machine->id_hdr_size);
285 event->fork.header.size = (sizeof(event->fork) + machine->id_hdr_size);
287 if (perf_tool__process_synth_event(tool, event, machine, process) != 0)
367 struct machine *machine,
387 dso = dsos__findnew_id(&machine->dsos, event->filename, &id);
425 struct machine *machine,
437 if (machine__is_default_guest(machine))
441 machine->root_dir, pid, pid);
481 machine->root_dir, pid, pid);
491 if (machine__is_host(machine))
522 memset(event->mmap2.filename + size, 0, machine->id_hdr_size +
524 event->mmap2.header.size += machine->id_hdr_size;
529 perf_record_mmap2__read_build_id(&event->mmap2, machine, false);
531 if (perf_tool__process_synth_event(tool, event, machine, process) != 0) {
549 struct machine *machine)
565 event->cgroup.header.size = event_size + path_len + machine->id_hdr_size;
575 memset(event->cgroup.path + path_len, 0, machine->id_hdr_size);
577 if (perf_tool__process_synth_event(tool, event, machine, process) < 0) {
589 struct machine *machine)
597 process, machine) < 0)
622 mount_len, process, machine);
635 struct machine *machine)
654 process, machine) < 0)
662 struct machine *machine __maybe_unused)
669 struct machine *machine)
673 struct maps *maps = machine__kernel_maps(machine);
678 event = zalloc(size + machine->id_hdr_size);
689 if (machine__is_host(machine))
707 memset(event->mmap2.filename + size, 0, machine->id_hdr_size);
708 event->mmap2.header.size += machine->id_hdr_size;
711 event->mmap2.pid = machine->pid;
715 perf_record_mmap2__read_build_id(&event->mmap2, machine, false);
721 memset(event->mmap.filename + size, 0, machine->id_hdr_size);
722 event->mmap.header.size += machine->id_hdr_size;
725 event->mmap.pid = machine->pid;
730 if (perf_tool__process_synth_event(tool, event, machine, process) != 0) {
750 struct perf_tool *tool, struct machine *machine,
762 process, machine);
768 tgid, process, machine) < 0)
777 process, machine, mmap_data))
783 if (machine__is_default_guest(machine))
787 machine->root_dir, pid);
803 if (perf_event__prepare_comm(comm_event, pid, _pid, machine,
809 ppid, process, machine) < 0)
813 tgid, process, machine) < 0)
819 if (perf_tool__process_synth_event(tool, comm_event, machine, process) != 0)
826 process, machine, mmap_data);
842 struct machine *machine,
849 comm_event = malloc(sizeof(comm_event->comm) + machine->id_hdr_size);
853 mmap_event = malloc(sizeof(mmap_event->mmap2) + machine->id_hdr_size);
857 fork_event = malloc(sizeof(fork_event->fork) + machine->id_hdr_size);
863 machine->id_hdr_size);
872 process, tool, machine,
898 process, tool, machine,
918 struct machine *machine,
932 comm_event = malloc(sizeof(comm_event->comm) + machine->id_hdr_size);
936 mmap_event = malloc(sizeof(mmap_event->mmap2) + machine->id_hdr_size);
940 fork_event = malloc(sizeof(fork_event->fork) + machine->id_hdr_size);
946 machine->id_hdr_size);
964 tool, machine, needs_mmap, mmap_data);
982 struct machine *machine;
995 args->machine,
1004 struct machine *machine,
1019 if (machine__is_default_guest(machine))
1022 snprintf(proc_path, sizeof(proc_path), "%s/proc", machine->root_dir);
1034 machine,
1055 args[i].machine = machine;
1093 struct machine *machine __maybe_unused)
1100 struct machine *machine)
1105 struct map *map = machine__kernel_map(machine);
1121 event = zalloc(size + machine->id_hdr_size);
1128 if (machine__is_host(machine)) {
1140 "%s%s", machine->mmap_name, kmap->ref_reloc_sym->name) + 1;
1144 (sizeof(event->mmap2.filename) - size) + machine->id_hdr_size);
1148 event->mmap2.pid = machine->pid;
1150 perf_record_mmap2__read_build_id(&event->mmap2, machine, true);
1153 "%s%s", machine->mmap_name, kmap->ref_reloc_sym->name) + 1;
1157 (sizeof(event->mmap.filename) - size) + machine->id_hdr_size);
1161 event->mmap.pid = machine->pid;
1164 err = perf_tool__process_synth_event(tool, event, machine, process);
1172 struct machine *machine)
1176 err = __perf_event__synthesize_kernel_mmap(tool, process, machine);
1180 return perf_event__synthesize_extra_kmaps(tool, process, machine);
1186 struct machine *machine)
1213 err = process(tool, event, NULL, machine);
1336 struct machine *machine)
1345 err = process(tool, (union perf_event *) event, NULL, machine);
1354 struct machine *machine)
1384 err = process(tool, (union perf_event *) event, NULL, machine);
1394 struct machine *machine)
1409 return process(tool, (union perf_event *) &event, NULL, machine);
1415 struct machine *machine)
1426 return process(tool, (union perf_event *) &event, NULL, machine);
1814 struct evlist *evlist, struct machine *machine, size_t from)
1863 err = process(tool, ev, NULL, machine);
1898 err = process(tool, ev, NULL, machine);
1906 struct evlist *evlist, struct machine *machine)
1908 return __perf_event__synthesize_id_index(tool, process, evlist, machine, 0);
1911 int __machine__synthesize_threads(struct machine *machine, struct perf_tool *tool,
1936 return perf_event__synthesize_thread_map(tool, threads, process, machine,
1939 return perf_event__synthesize_threads(tool, process, machine,
1946 int machine__synthesize_threads(struct machine *machine, struct target *target,
1950 return __machine__synthesize_threads(machine, NULL, target, threads,
2213 perf_event__handler_t process, struct machine *machine)
2229 ev.build_id.pid = machine->pid;
2233 return process(tool, &ev, NULL, machine);