lkml.org 
[lkml]   [2012]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [BUG PATCH] perf: kvm - finding struct machine fails for PERF_RECORD_MMAP
On 4/9/12 9:40 PM, Nikunj A Dadhania wrote:
> I can think of two places where it can happen:
>
> 1) perf_event__synthesize_kernel_mmap
>
> [...]
> mmap_name = machine__mmap_name(machine, name_buff, sizeof(name_buff));
> if (machine__is_host(machine)) {
> ...
> } else {
> event->header.misc = PERF_RECORD_MISC_GUEST_KERNEL;
> if (machine__is_default_guest(machine))
> filename = (char *) symbol_conf.default_guest_kallsyms;
> else {
> sprintf(path, "%s/proc/kallsyms", machine->root_dir);
> filename = path;
> }
> }
> [...]
> event->mmap.header.type = PERF_RECORD_MMAP;
> [...]
> event->mmap.pid = machine->pid;
>
> 2) perf_event__synthesize_modules
>
> [...]
> if (machine__is_host(machine))
> event->header.misc = PERF_RECORD_MISC_KERNEL;
> else
> event->header.misc = PERF_RECORD_MISC_GUEST_KERNEL;
> [...]
> event->mmap.header.type = PERF_RECORD_MMAP;
> [...]
> event->mmap.pid = machine->pid;
>
> BTW, i am testing this on latest -tip(498c911).
>
> In my case, I am able to recreate this everytime. And have verified that
> the event->header.type that I hit here is of type PERF_RECORD_MMAP.

I was thinking runtime, not initialization. Adding -o direct_io to the
sshfs mount did the trick. Reading guest /proc files exposes the segfault.

David


\
 
 \ /
  Last update: 2012-04-10 17:17    [W:3.211 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site