From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: Re: [PATCH v6 3/3] KVM: perf kvm events analysis tool Date: Tue, 14 Aug 2012 10:12:57 +0800 Message-ID: <5029B429.2070901@linux.vnet.ibm.com> References: <1344568750-5147-1-git-send-email-haodong@linux.vnet.ibm.com> <1344568750-5147-4-git-send-email-haodong@linux.vnet.ibm.com> <502570F5.3080903@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Dong Hao , avi@redhat.com, acme@infradead.org, mtosatti@redhat.com, mingo@elte.hu, linux-kernel@vger.kernel.org, kvm@vger.kernel.org To: David Ahern Return-path: In-Reply-To: <502570F5.3080903@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 08/11/2012 04:37 AM, David Ahern wrote: > Thanks for resubmitting this; it was on my to-do list as well. Thanks for you liking it and your precious comments, David! :) > > 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(). Fine to us, will do it in the next version.