[added kvm devel list and Xiao who implemented the original perf-kvm as
I recall]
On 6/14/13 5:11 PM, Cody P Schafer wrote:
I am under the impression the limitations are these 2 snippets in
>arch/x86/kernel/cpu/perf_event.c:
Yep, that's disabling the in-kernel callchain generation (the in-perf
callchain code should still be an option without this). I wonder if
one could use perf_callchain_user() to find the callchain of the guest
kernel.
Does anyone know the particular changes that need to be done to
support kvm backtraces/the reasons it is specifically disabled?
It's going to require some KVM changes I would think. e.g., for the IP:
unsigned long perf_instruction_pointer(struct pt_regs *regs)
{
if (perf_guest_cbs && perf_guest_cbs->is_in_guest())
return perf_guest_cbs->get_guest_ip();
return regs->ip + code_segment_base(regs);
}
get_guest_ip comes from arch/x86/kvm/x86.c.
callchain walking starts in perf_callchain, kernel/events/callchain.c
For more context:
perf_prepare_sample()
data->callchain = perf_callchain(event, regs);
For guests you'll want regs from the guest which will need to be
supplied by kvm.
David
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html