From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753151AbdBUOUb (ORCPT ); Tue, 21 Feb 2017 09:20:31 -0500 Received: from mail.kernel.org ([198.145.29.136]:52944 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752678AbdBUOUY (ORCPT ); Tue, 21 Feb 2017 09:20:24 -0500 Date: Tue, 21 Feb 2017 11:20:16 -0300 From: Arnaldo Carvalho de Melo To: Borislav Petkov Cc: Jiri Olsa , Jiri Olsa , David Ahern , Namhyung Kim , Peter Zijlstra , lkml , Ingo Molnar Subject: Re: [PATCHv2 4/5] perf stat: Add -a as a default target Message-ID: <20170221142016.GD5052@kernel.org> References: <20170220071300.GA12002@krava> <20170220134433.GI4109@kernel.org> <20170220203149.yxietgdzi5lxdk5n@pd.tnic> <20170220212254.GC4071@kernel.org> <20170220224716.q6r3awztsf6t3k5a@pd.tnic> <20170221075437.GB7384@krava> <20170221110451.GA16152@krava> <20170221112028.p2bznm4dn7ktpwzz@pd.tnic> <20170221133426.GD4071@kernel.org> <20170221140544.mg7dbymp5w6lq7o7@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170221140544.mg7dbymp5w6lq7o7@pd.tnic> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Feb 21, 2017 at 03:05:44PM +0100, Borislav Petkov escreveu: > On Tue, Feb 21, 2017 at 10:34:26AM -0300, Arnaldo Carvalho de Melo wrote: > > It _is_ supported by the kernel, and by the hardware, its just that it > > is not supported in system wide mode, that BTW, in the case above, the > > user doesn't even asked for (-a wasn't in the command line). > > Well, that warning is issued for a bunch of errno's. Lumping them all > together is probably not what you want. > > Also, EINVAL for example, as I noted earlier, can be issued for a > variety of conditions... That is well understood, but it doesn't prevents us from trying to, with the context in mind, disambiguate that value into meaningful messages, that ends up being possible to a great degree, see, for instance: perf_evsel__open_strerror() It will take the errno and internal evsel state to try to provide a better error message. So, if it is a uncore event and it the error when trying to open it is EINVAL and it evsel->system_wide is not set... - Arnaldo