Re: [RFC] Unify KVM kernel-space and user-space code into a single project

Andi Kleen
2010-03-24T09:31:50Z

Avi Kivity <avi@redhat.com> writes:

> On 03/24/2010 09:38 AM, Andi Kleen wrote:
>>> If you're profiling a single guest it makes more sense to do this from
>>> inside the guest - you can profile userspace as well as the kernel.
>>>
>> I'm interested in debugging the guest without guest cooperation.
>>
>> In many cases qemu's new gdb stub works for that, but in some cases
>> I would prefer instruction/branch traces over standard gdb style
>> debugging.
>>
>
> Isn't gdb supposed to be able to use branch traces?

AFAIK not. The ptrace interface is only used by idb I believe.
I might be wrong on that.

Not sure if there is even a remote protocol command for
branch traces either.

There's a concept of "tracepoints" in the protocol, but it
doesn't quite match at.

> It makes sense to
> expose them via the gdb stub then. Not to say an external tool
> doesn't make sense.

Ok that would work for me too. As long as I can set start/stop
triggers and pipe the log somewhere it's fine for me.

-Andi

--
ak@linux.intel.com -- Speaking for myself only.