Lines Matching defs:machine
571 struct machine *machine = kmaps->machine;
595 machine__is_default_guest(machine)) {
613 machine->root_dir, module);
619 !machine__is_default_guest(machine))
678 machine__is_default_guest(kmaps->machine)) {
1492 struct machine *machine;
1503 if (map->groups && map->groups->machine)
1504 machine = map->groups->machine;
1506 machine = NULL;
1565 if (map->groups && machine)
1566 root_dir = machine->root_dir;
1750 static int machine__set_modules_path(struct machine *machine)
1755 version = get_kernel_version(machine->root_dir);
1760 machine->root_dir, version);
1763 return map_groups__set_modules_path_dir(&machine->kmaps, modules_path);
1785 struct map *machine__new_module(struct machine *machine, u64 start,
1789 struct dso *dso = __dsos__findnew(&machine->kernel_dsos, filename);
1798 if (machine__is_host(machine))
1802 map_groups__insert(&machine->kmaps, map);
1806 static int machine__create_modules(struct machine *machine)
1815 if (machine__is_default_guest(machine))
1818 sprintf(path, "%s/proc/modules", machine->root_dir);
1857 map = machine__new_module(machine, start, name);
1860 dso__kernel_module_get_build_id(map->dso, machine->root_dir);
1866 return machine__set_modules_path(machine);
1940 * x86_86 one, on the machine where analysis is being performed, say),
2042 struct machine *machine;
2049 machine = map->groups->machine;
2051 if (machine__is_default_guest(machine)) {
2067 sprintf(path, "%s/proc/kallsyms", machine->root_dir);
2078 machine__mmap_name(machine, path, sizeof(path));
2138 struct machine *pos = rb_entry(nd, struct machine, rb_node);
2161 size_t machine__fprintf_dsos_buildid(struct machine *machine, FILE *fp,
2164 return __dsos__fprintf_buildid(&machine->kernel_dsos, fp, with_hits) +
2165 __dsos__fprintf_buildid(&machine->user_dsos, fp, with_hits);
2175 struct machine *pos = rb_entry(nd, struct machine, rb_node);
2193 static struct dso *dso__new_guest_kernel(struct machine *machine,
2197 struct dso *dso = dso__new(name ?: machine__mmap_name(machine, bf,
2207 void dso__read_running_kernel_build_id(struct dso *dso, struct machine *machine)
2211 if (machine__is_default_guest(machine))
2213 sprintf(path, "%s/sys/kernel/notes", machine->root_dir);
2219 static struct dso *machine__create_kernel(struct machine *machine)
2224 if (machine__is_host(machine)) {
2228 if (machine__is_default_guest(machine))
2230 kernel = dso__new_guest_kernel(machine, vmlinux_name);
2234 dso__read_running_kernel_build_id(kernel, machine);
2235 dsos__add(&machine->kernel_dsos, kernel);
2257 static u64 machine__get_kernel_start_addr(struct machine *machine)
2263 if (machine__is_host(machine)) {
2266 if (machine__is_default_guest(machine))
2269 sprintf(path, "%s/proc/kallsyms", machine->root_dir);
2283 int __machine__create_kernel_maps(struct machine *machine, struct dso *kernel)
2286 u64 start = machine__get_kernel_start_addr(machine);
2291 machine->vmlinux_maps[type] = map__new2(start, kernel, type);
2292 if (machine->vmlinux_maps[type] == NULL)
2295 machine->vmlinux_maps[type]->map_ip =
2296 machine->vmlinux_maps[type]->unmap_ip =
2298 kmap = map__kmap(machine->vmlinux_maps[type]);
2299 kmap->kmaps = &machine->kmaps;
2300 map_groups__insert(&machine->kmaps,
2301 machine->vmlinux_maps[type]);
2307 void machine__destroy_kernel_maps(struct machine *machine)
2314 if (machine->vmlinux_maps[type] == NULL)
2317 kmap = map__kmap(machine->vmlinux_maps[type]);
2318 map_groups__remove(&machine->kmaps,
2319 machine->vmlinux_maps[type]);
2333 map__delete(machine->vmlinux_maps[type]);
2334 machine->vmlinux_maps[type] = NULL;
2338 int machine__create_kernel_maps(struct machine *machine)
2340 struct dso *kernel = machine__create_kernel(machine);
2343 __machine__create_kernel_maps(machine, kernel) < 0)
2346 if (symbol_conf.use_modules && machine__create_modules(machine) < 0)
2351 map_groups__fixup_end(&machine->kmaps);
2415 size_t machine__fprintf_vmlinux_path(struct machine *machine, FILE *fp)
2419 struct dso *kdso = machine->vmlinux_maps[MAP__FUNCTION]->dso;
2545 struct machine *machine = machines__findnew(machines, pid);
2547 if (machine == NULL)
2550 return machine__create_kernel_maps(machine);
2642 struct machine *pos = rb_entry(next, struct machine, rb_node);
2650 int machine__load_kallsyms(struct machine *machine, const char *filename,
2653 struct map *map = machine->vmlinux_maps[type];
2663 __map_groups__fixup_end(&machine->kmaps, type);
2669 int machine__load_vmlinux_path(struct machine *machine, enum map_type type,
2672 struct map *map = machine->vmlinux_maps[type];