All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Dong Hao <haodong@linux.vnet.ibm.com>
Cc: avi@redhat.com, acme@infradead.org, mtosatti@redhat.com,
	mingo@elte.hu, linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
Subject: Re: [PATCH v6 3/3] KVM: perf kvm events analysis tool
Date: Fri, 10 Aug 2012 14:37:09 -0600	[thread overview]
Message-ID: <502570F5.3080903@gmail.com> (raw)
In-Reply-To: <1344568750-5147-4-git-send-email-haodong@linux.vnet.ibm.com>

Thanks for resubmitting this; it was on my to-do list as well.

On 8/9/12 9:19 PM, Dong Hao wrote:
> +static bool kvm_events_exist(const char *event)
> +{
> +	char evt_path[MAXPATHLEN];
> +	int fd;
> +
> +	snprintf(evt_path, MAXPATHLEN, "%s/kvm/%s/id", tracing_events_path,
> +		 event);
> +
> +	fd = open(evt_path, O_RDONLY);

Use is_valid_tracepoint().

For consistency, it's worth adding a check for the other events too with 
an appropriate config message. e.g.,:
   https://lkml.org/lkml/2012/8/9/359

David

  parent reply	other threads:[~2012-08-10 20:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-10  3:19 [PATCH v6 0/3] KVM: perf: kvm events analysis tool Dong Hao
2012-08-10  3:19 ` [PATCH v6 1/3] KVM: x86: export svm/vmx exit code and vector code to userspace Dong Hao
2012-08-10  3:19 ` [PATCH v6 2/3] KVM: x86: tracemmio begin and complete Dong Hao
2012-08-10  3:19 ` [PATCH v6 3/3] KVM: perf kvm events analysis tool Dong Hao
2012-08-10 14:14   ` Arnaldo Carvalho de Melo
2012-08-14  2:08     ` Xiao Guangrong
2012-08-10 20:37   ` David Ahern [this message]
2012-08-14  2:12     ` 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=502570F5.3080903@gmail.com \
    --to=dsahern@gmail.com \
    --cc=acme@infradead.org \
    --cc=avi@redhat.com \
    --cc=haodong@linux.vnet.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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 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.