All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>, kvm <kvm@vger.kernel.org>
Subject: Re: kvm mmu tracing quirks
Date: Wed, 13 Apr 2011 19:12:35 +0300	[thread overview]
Message-ID: <4DA5CB73.3050202@redhat.com> (raw)
In-Reply-To: <4DA5AEAB.6020203@siemens.com>

On 04/13/2011 05:09 PM, Jan Kiszka wrote:
> Hi Xiao,
>
> while tracing a guest with all events enabled, I notices some issues
> with kvm mmu instrumentations. A critical one:
>
> TRACE_EVENT(
> 	kvm_mmu_audit,
> 	TP_PROTO(struct kvm_vcpu *vcpu, int audit_point),
> 	TP_ARGS(vcpu, audit_point),
>
> 	TP_STRUCT__entry(
> 		__field(struct kvm_vcpu *, vcpu)
> 		__field(int, audit_point)
> 	),
>
> 	TP_fast_assign(
> 		__entry->vcpu = vcpu;
> 		__entry->audit_point = audit_point;
> 	),
>
> 	TP_printk("vcpu:%d %s", __entry->vcpu->cpu,
> 		  audit_point_name[__entry->audit_point])
> );
>
> Saving the vcpu reference to the trace buffer can break on dump if the
> vcpu was destroyed in the meantime. I was about to fix that by saving
> vcpu->cpu instead, but then I wondered what kind of information you
> actually need here. The triggering host cpu is automatically recorded by
> ftrace anyway. Can you comment on this / clean it up? Also, it would be
> nice to use __print_symbolic for translating audit_point to a string as
> that would also work for trace-cmd/kernelshark.
>

IIRC the audit trace is only used to get a low cost invocation for the 
audit machinery; it's not actually useful as a user tracepoint.

We should probably switch to static_branch() instead 
(https://lwn.net/Articles/429447/).

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


  reply	other threads:[~2011-04-13 16:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-13 14:09 kvm mmu tracing quirks Jan Kiszka
2011-04-13 16:12 ` Avi Kivity [this message]
2011-04-14  3:47   ` Xiao Guangrong

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=4DA5CB73.3050202@redhat.com \
    --to=avi@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    --cc=xiaoguangrong@cn.fujitsu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.