Re: perf kvm segfaults while reporting events

From: David Ahern
Date: Sun Jun 24 2012 - 23:38:03 EST


On 6/20/12 12:14 AM, Pradeep Kumar Surisetty wrote:

Ahhh perf kvm works fine if we record guest events for enough time.
above patch works better, if some one doesnt record for adequate time.

Dumb luck. The extra time allows a sample that hits within a guest module and causes the build id for it to be added to the header.

I added some pr_debug's to the synthesize_modules. e.g.,

perf_event__synthesize_modules: host modules, pid -1, file /lib/modules/3.4.0/kernel/arch/x86/crypto/crc32c-intel.ko

perf_event__synthesize_modules: guest modules, pid 0, file /lib/modules/3.4.0/kernel/drivers/block/virtio_blk.ko

which is just wrong for the guest. It's a Fedora 17 VM where the kernel version is 3.4.0-1.fc17.x86_64 and even more important perf is not told where to find the modules (dso name in the event), so the dso path is based on the host OS.

Which comes back to my earlier comment: the 'default' guest options (--guestmodules here) for perf-kvm are busted. You really need to use the --guestmount option until perf-kvm gets some rework.

I will submit a patch to at least keep perf from segfaulting.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/