public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@qumranet.com>
To: "Liu, Eric E" <eric.e.liu@intel.com>
Cc: kvm-devel <kvm-devel@lists.sourceforge.net>
Subject: Re: [PATCH RFC 1/4]Porting Xentrace to kvm
Date: Sun, 16 Mar 2008 17:43:17 +0200	[thread overview]
Message-ID: <47DD4015.9020600@qumranet.com> (raw)
In-Reply-To: <9D7649D18729DE4BB2BD7B494F7FEDC201084D2E@pdsmsx415.ccr.corp.intel.com>

Liu, Eric E wrote:
> >From 0d7f1ee470fe907e00ac6246bfa11e5322bc64fb Mon Sep 17 00:00:00 2001
> From: Feng (Eric) Liu <eric.e.liu@intel.com>
> Date: Sat, 15 Mar 2008 06:07:33 -0400
> Subject: [PATCH] KVM: Add some trace entries in current code, when the
> KVM_TRACE
> compilation option is enabled, it outputs the data info thrace
> buffer. Define some interfaces for userspace tools to use the
> buffer and analyze the trace data.
>   

>  
> +#ifdef CONFIG_KVM_TRACE
> +#define KVMTRACE_ND(evt, vcpu, cycles, count, d1, d2, d3, d4)
> \
> + do {
> \
> +	if (unlikely(kvm_trace_enable_flag)) {
> \
> +		if (KVM_TRC_##evt == KVM_TRC_VMEXIT ||
> \
> +			KVM_TRC_##evt == KVM_TRC_PAGE_FAULT) {
> \
> +			struct {
> \
> +				u32 pid:16, vid:16;
>   

pids can be 32-bit, I think...

> \
> +				u32 data1;
> \
> +				unsigned long data2;
> \
> +			} _d;
> \
> +			_d.pid  = (u16)current->tgid;
> \
> +			_d.vid  = (vcpu)->vcpu_id;
> \
> +			_d.data1 = d1;
> \
> +			_d.data2 = d2;
> \
> +			kvm_trace_var(KVM_TRC_ ## evt, cycles,
> \
> +				sizeof(_d), (unsigned char *)&_d);
> \
> +		} else {
> \
>   

This special-casing of exits and page faults is probably unnecessary.  
Zeroing a couple of variables in a developer-only environment isn't 
worth it.


-- 
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

  reply	other threads:[~2008-03-16 15:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-14  5:13 [PATCH RFC 1/4]Porting Xentrace to kvm Liu, Eric E
2008-03-16 15:43 ` Avi Kivity [this message]
2008-03-17  5:00 ` Chris Wright

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=47DD4015.9020600@qumranet.com \
    --to=avi@qumranet.com \
    --cc=eric.e.liu@intel.com \
    --cc=kvm-devel@lists.sourceforge.net \
    /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