From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752787AbbC0WoP (ORCPT ); Fri, 27 Mar 2015 18:44:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43820 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751624AbbC0WoN (ORCPT ); Fri, 27 Mar 2015 18:44:13 -0400 Date: Fri, 27 Mar 2015 17:15:34 -0300 From: Arnaldo Carvalho de Melo To: David Ahern Cc: Peter Zijlstra , tglx@linutronix.de, jolsa@redhat.com, eranian@google.com, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, john.stultz@linaro.org, hpa@zytor.com, akpm@linux-foundation.org, mingo@kernel.org Subject: Re: [PATCH] perf, record: Add clockid parameter Message-ID: <20150327201534.GD6291@redhat.com> References: <20150327143201.GG21418@twins.programming.kicks-ass.net> <55158F25.9040100@gmail.com> <20150327172059.GK23123@twins.programming.kicks-ass.net> <551594DD.7050705@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <551594DD.7050705@gmail.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.20 (2009-12-10) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Fri, Mar 27, 2015 at 11:35:25AM -0600, David Ahern escreveu: > On 3/27/15 11:20 AM, Peter Zijlstra wrote: > >>This is a new feature which means use_clockid on older kernels will fail. So > >>need to catch that and throw an error -- perhaps yet another probe function. > >How does that work? What do I grep to find an example? I figured if the > >kernel didn't support the syscall will fail and we'll terminate > >someplace. > Look at __perf_evsel__open(). In this case you probably do not want > to fallback but tell the user the clock id option is not supported. > The problem is deciphering the failure is due to the clock id versus > all the other failure reasons. I.e. we're back to the sys_perf_event_open() error reporting suckz rockz thing, this time with PeterZ trying to find a way to avoid getting back to that discussion... /me runz... ;-P - Arnaldo