kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Marcelo Tosatti <mtosatti@redhat.com>,
	Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Cc: Avi Kivity <avi@redhat.com>, LKML <linux-kernel@vger.kernel.org>,
	KVM <kvm@vger.kernel.org>
Subject: Re: [PATCH 2/3] KVM: improve trace events of vmexit/mmio/ioport
Date: Tue, 17 Jan 2012 10:31:57 -0700	[thread overview]
Message-ID: <4F15B08D.5090000@gmail.com> (raw)
In-Reply-To: <20120117115558.GB17420@amt.cnet>

On 01/17/2012 04:55 AM, Marcelo Tosatti wrote:
> On Tue, Jan 17, 2012 at 10:28:11AM +0800, Xiao Guangrong wrote:
>> On 01/16/2012 05:38 PM, Avi Kivity wrote:
>>
>>> On 01/16/2012 11:32 AM, Xiao Guangrong wrote:
>>>> - trace vcpu_id for these events
>>>
>>> We can infer the vcpu id from the kvm_entry tracepoints, no?
>>>
>>
>>
>> Thanks for your review, Avi!
>>
>> Hmm. i think it is hard to do since the vcpu thread can be scheduled
>> anytime, one example is as follow:
>>
>> CPU 0
>>
>> kvm_entry vcpu 0
>> ......
>> kvm_entry vcpu 1
>> ......
>> event1 occurs
>> ......
>> event2 occurs
>>
>> It is hard to know the event belong to which kvm_entry?
>>
>>>> - add kvm_mmio_done to trace the time when mmio/ioport emulation is completed
>>>
>>> ditto?
>>>
>>
>>
>> I think is ok to get the event end time by using kvm_entry.
>>
>>>
>>> Relying on the existing tracepoints will make the tool work on older
>>> kernels.
>>>
>>
>>
>> We can drop all new events, but unfortunately, the information of the origin
>> tracepoints is not enough, at least vcpu_id need be traced in theses events
>> to match its events. Yes?
> 
> Yes, and if you don't add completed events, you'll have to use kvm_entry 
> whose collection adds a lot of overhead.


vcpus run as threads and hence have their own tid which is available in
the perf samples.

There is an ongoing 'discussion' about modifying existing tracepoints
which your proposed patch violates. This is the start of it:

https://lkml.org/lkml/2012/1/16/41

David

  reply	other threads:[~2012-01-17 17:31 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-16  9:30 [RFC][PATCH] KVM: perf: a smart tool to analyse kvm events Xiao Guangrong
2012-01-16  9:31 ` [PATCH 1/3] KVM: trace mmio read event properly Xiao Guangrong
2012-01-16 10:18   ` Avi Kivity
2012-01-17  2:36     ` Xiao Guangrong
2012-01-16  9:32 ` [PATCH 2/3] KVM: improve trace events of vmexit/mmio/ioport Xiao Guangrong
2012-01-16  9:38   ` Avi Kivity
2012-01-17  2:28     ` Xiao Guangrong
2012-01-17 11:55       ` Marcelo Tosatti
2012-01-17 17:31         ` David Ahern [this message]
2012-01-18  2:32           ` Xiao Guangrong
2012-01-18  5:34             ` David Ahern
2012-01-24 12:44       ` Avi Kivity
2012-01-16  9:32 ` [PATCH 3/3] KVM: perf: kvm events analysis tool Xiao Guangrong
2012-01-16 10:04   ` Avi Kivity
2012-01-17  2:30     ` Xiao Guangrong
2012-01-24 12:49       ` Avi Kivity
2012-01-16 10:08   ` Stefan Hajnoczi
2012-01-17  2:37     ` Xiao Guangrong
2012-01-17 11:59     ` Marcelo Tosatti
2012-01-24 12:51       ` Avi Kivity
2012-01-16 10:11 ` [RFC][PATCH] KVM: perf: a smart tool to analyse kvm events Avi Kivity
2012-01-17  2:30   ` Xiao Guangrong
2012-01-16 22:53 ` David Ahern
2012-01-17  2:41   ` Xiao Guangrong
2012-01-17  4:49     ` David Ahern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F15B08D.5090000@gmail.com \
    --to=dsahern@gmail.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=xiaoguangrong@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).