Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751920AbcD1Efb (ORCPT ); Thu, 28 Apr 2016 00:35:31 -0400 Received: from smtprelay2.synopsys.com ([198.182.60.111]:55952 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751257AbcD1Efa (ORCPT ); Thu, 28 Apr 2016 00:35:30 -0400 Subject: Re: Misleading hint to select CONFIG_PERF_EVENTS if driver sets PERF_PMU_CAP_NO_INTERRUPT To: Lada Trimasova , "linux-perf-users@vger.kernel.org" References: <1461331523.3403.11.camel@synopsys.com> <1461770030.5970.8.camel__5728.3871378333$1461770054$gmane$org@synopsys.com> CC: "linux-kernel@vger.kernel.org" , "peterz@infradead.org" , Alexey Brodkin , "linux-snps-arc@lists.infradead.org" Newsgroups: gmane.linux.kernel,gmane.linux.kernel.arc From: Vineet Gupta Message-ID: <57219301.10505@synopsys.com> Date: Thu, 28 Apr 2016 10:05:13 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1461770030.5970.8.camel__5728.3871378333$1461770054$gmane$org@synopsys.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.12.197.158] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 907 Lines: 25 On Wednesday 27 April 2016 08:43 PM, Lada Trimasova wrote: > On Tue, 2016-04-26 at 12:42 +0000, Vineet Gupta wrote: > > On Friday 22 April 2016 06:56 PM, Lada Trimasova wrote: > I think what we have now is sufficient - but u seem to want a prettier failure output. > > Anyhow, this print is coming from util/evsel.c: perf_evsel__open_strerror() > At the very least you want another entry in switch case for ENOTSUPP and then > check if event was sampling one ( > evsel->attr.sample_period) - use that as a hint for saying sampling events not > supported. > > > > > ENOTSUPP is not visible for user programs. So it's impossible to add this entry > > to mentioned switch. > > I think that there is no good way to make error message more understandable > > without breaking existing api. I meant EOPNOTSUPP. Any errno value has to be visible to user programs otherwise there is no point defining it.