Re: perf: record segfaults for cycles event when collecting dataon a VM

From: David Ahern
Date: Thu Feb 09 2012 - 09:43:22 EST


On 02/09/2012 06:34 AM, Ingo Molnar wrote:
>
> * Joerg Roedel <joerg.roedel@xxxxxxx> wrote:
>
>> On Thu, Feb 09, 2012 at 08:30:24AM +0100, Ingo Molnar wrote:
>>>
>>> * Joerg Roedel <joerg.roedel@xxxxxxx> wrote:
>>>
>>>>> which makes sense. It forces
>>>>> perf_session__find_machine_for_cpumode() to return the host
>>>>> machine always.
>>>>
>>>> Great, thanks. I will send two patches tomorrow to fix Jason's
>>>> problem and change the default for perf_guest.
>>>
>>> Well, if the crash is fixed then the the default can stay,
>>> right?
>>
>> David's crash is fixed by changing the default back to its
>> original value :)
>
> Then that's the wrong fix really.

You can't enable perf_guest unless guest info has been configured as
done with perf-kvm.

The problem is triggered in perf_session__find_machine_for_cpumode(). If
perf_session__find_machine() is changed to
perf_session__findnew_machine() you get into machines__findnew() which
shows the root cause: the event is for a VM but symbol_conf.guestmount
is not set.

So, really perf_guest cannot be enabled unless guest info has been given.

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/