[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <502570F5.3080903@gmail.com>
Date: Fri, 10 Aug 2012 14:37:09 -0600
From: David Ahern <dsahern@...il.com>
To: Dong Hao <haodong@...ux.vnet.ibm.com>
CC: avi@...hat.com, acme@...radead.org, mtosatti@...hat.com,
mingo@...e.hu, linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
Xiao Guangrong <xiaoguangrong@...ux.vnet.ibm.com>
Subject: Re: [PATCH v6 3/3] KVM: perf kvm events analysis tool
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists