2 #include <linux/types.h> 3 #include <linux/string.h> 5 #include "../../util/machine.h" 6 #include "../../util/tool.h" 7 #include "../../util/map.h" 8 #include "../../util/util.h" 9 #include "../../util/debug.h" 11 #if defined(__x86_64__) 25 pr_debug(
"Not enough memory synthesizing mmap event " 26 "for extra kernel maps\n");
39 size =
sizeof(
event->mmap) -
sizeof(
event->mmap.filename) +
40 PERF_ALIGN(strlen(kmap->
name) + 1,
sizeof(u64)) +
45 event->mmap.header.type = PERF_RECORD_MMAP;
52 event->header.misc = PERF_RECORD_MISC_KERNEL;
54 event->header.misc = PERF_RECORD_MISC_GUEST_KERNEL;
56 event->mmap.header.size =
size;
58 event->mmap.start = pos->
start;
59 event->mmap.len = pos->
end - pos->
start;
60 event->mmap.pgoff = pos->
pgoff;
61 event->mmap.pid = machine->
pid;
int(* perf_event__handler_t)(struct perf_tool *tool, union perf_event *event, struct perf_sample *sample, struct machine *machine)
struct kmap * map__kmap(struct map *map)
static bool machine__is_host(struct machine *machine)
int __weak perf_event__synthesize_extra_kmaps(struct perf_tool *tool __maybe_unused, perf_event__handler_t process __maybe_unused, struct machine *machine __maybe_unused)
x86 movsq based memset() in arch/x86/lib/memset_64.S") MEMSET_FN(memset_erms
bool __map__is_extra_kernel_map(const struct map *map)
struct map * maps__first(struct maps *maps)
#define pr_debug(fmt,...)
struct map * map__next(struct map *map)
static struct perf_tool tool
int perf_tool__process_synth_event(struct perf_tool *tool, union perf_event *event, struct machine *machine, perf_event__handler_t process)
void static void * zalloc(size_t size)