Lines Matching refs:machine
7 #include "util/machine.h"
52 struct machine *machine,
65 return process(tool, event, &synth_sample, machine);
140 struct machine *machine,
149 if (machine__is_host(machine)) {
156 *tgid = machine->pid;
167 memset(event->comm.comm + size, 0, machine->id_hdr_size);
170 machine->id_hdr_size);
179 struct machine *machine)
183 if (perf_event__prepare_comm(event, pid, machine, &tgid, &ppid) != 0)
186 if (perf_tool__process_synth_event(tool, event, machine, process) != 0)
209 struct machine *machine)
219 machine->id_hdr_size));
236 machine->id_hdr_size);
238 if (perf_tool__process_synth_event(tool, event, machine, process) != 0)
248 struct machine *machine)
250 memset(&event->fork, 0, sizeof(event->fork) + machine->id_hdr_size);
269 event->fork.header.size = (sizeof(event->fork) + machine->id_hdr_size);
271 if (perf_tool__process_synth_event(tool, event, machine, process) != 0)
354 struct machine *machine,
366 if (machine__is_default_guest(machine))
370 machine->root_dir, pid, pid);
410 machine->root_dir, pid, pid);
420 if (machine__is_host(machine))
451 memset(event->mmap2.filename + size, 0, machine->id_hdr_size +
453 event->mmap2.header.size += machine->id_hdr_size;
457 if (perf_tool__process_synth_event(tool, event, machine, process) != 0) {
475 struct machine *machine)
491 event->cgroup.header.size = event_size + path_len + machine->id_hdr_size;
501 memset(event->cgroup.path + path_len, 0, machine->id_hdr_size);
503 if (perf_tool__process_synth_event(tool, event, machine, process) < 0) {
515 struct machine *machine)
523 process, machine) < 0)
548 mount_len, process, machine);
561 struct machine *machine)
580 process, machine) < 0)
588 struct machine *machine __maybe_unused)
595 struct machine *machine)
599 struct maps *maps = machine__kernel_maps(machine);
601 machine->id_hdr_size));
614 if (machine__is_host(machine))
629 memset(event->mmap.filename + size, 0, machine->id_hdr_size);
630 event->mmap.header.size += machine->id_hdr_size;
633 event->mmap.pid = machine->pid;
637 if (perf_tool__process_synth_event(tool, event, machine, process) != 0) {
652 struct perf_tool *tool, struct machine *machine, bool mmap_data)
663 process, machine);
669 tgid, process, machine) < 0)
678 process, machine, mmap_data))
684 if (machine__is_default_guest(machine))
688 machine->root_dir, pid);
705 if (perf_event__prepare_comm(comm_event, _pid, machine,
710 ppid, process, machine) < 0)
714 tgid, process, machine) < 0)
720 if (perf_tool__process_synth_event(tool, comm_event, machine, process) != 0)
727 process, machine, mmap_data);
740 struct machine *machine,
747 comm_event = malloc(sizeof(comm_event->comm) + machine->id_hdr_size);
751 mmap_event = malloc(sizeof(mmap_event->mmap2) + machine->id_hdr_size);
755 fork_event = malloc(sizeof(fork_event->fork) + machine->id_hdr_size);
761 machine->id_hdr_size);
770 process, tool, machine,
796 process, tool, machine,
816 struct machine *machine,
829 comm_event = malloc(sizeof(comm_event->comm) + machine->id_hdr_size);
833 mmap_event = malloc(sizeof(mmap_event->mmap2) + machine->id_hdr_size);
837 fork_event = malloc(sizeof(fork_event->fork) + machine->id_hdr_size);
843 machine->id_hdr_size);
861 tool, machine, mmap_data);
879 struct machine *machine;
891 args->machine, args->mmap_data,
899 struct machine *machine,
914 if (machine__is_default_guest(machine))
917 snprintf(proc_path, sizeof(proc_path), "%s/proc", machine->root_dir);
929 machine, mmap_data,
949 args[i].machine = machine;
986 struct machine *machine __maybe_unused)
993 struct machine *machine)
996 struct map *map = machine__kernel_map(machine);
1013 event = zalloc((sizeof(event->mmap) + machine->id_hdr_size));
1020 if (machine__is_host(machine)) {
1031 "%s%s", machine->mmap_name, kmap->ref_reloc_sym->name) + 1;
1035 (sizeof(event->mmap.filename) - size) + machine->id_hdr_size);
1039 event->mmap.pid = machine->pid;
1041 err = perf_tool__process_synth_event(tool, event, machine, process);
1049 struct machine *machine)
1053 err = __perf_event__synthesize_kernel_mmap(tool, process, machine);
1057 return perf_event__synthesize_extra_kmaps(tool, process, machine);
1063 struct machine *machine)
1090 err = process(tool, event, NULL, machine);
1213 struct machine *machine)
1222 err = process(tool, (union perf_event *) event, NULL, machine);
1231 struct machine *machine)
1260 err = process(tool, (union perf_event *) event, NULL, machine);
1270 struct machine *machine)
1285 return process(tool, (union perf_event *) &event, NULL, machine);
1291 struct machine *machine)
1302 return process(tool, (union perf_event *) &event, NULL, machine);
1603 struct evlist *evlist, struct machine *machine)
1636 err = process(tool, ev, NULL, machine);
1663 err = process(tool, ev, NULL, machine);
1670 int __machine__synthesize_threads(struct machine *machine, struct perf_tool *tool,
1676 return perf_event__synthesize_thread_map(tool, threads, process, machine, data_mmap);
1679 machine, data_mmap,
1685 int machine__synthesize_threads(struct machine *machine, struct target *target,
1689 return __machine__synthesize_threads(machine, NULL, target, threads,
1956 perf_event__handler_t process, struct machine *machine)
1971 ev.build_id.pid = machine->pid;
1975 return process(tool, &ev, NULL, machine);