From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752214AbcEKDdR (ORCPT ); Tue, 10 May 2016 23:33:17 -0400 Received: from mail-io0-f196.google.com ([209.85.223.196]:34312 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751855AbcEKDdP (ORCPT ); Tue, 10 May 2016 23:33:15 -0400 From: Vince Weaver X-Google-Original-From: Vince Weaver Date: Tue, 10 May 2016 23:33:13 -0400 (EDT) X-X-Sender: vince@macbook-air To: Vineet Gupta cc: Vince Weaver , linux-perf-users@vger.kernel.org, peterz@infradead.org, acme@redhat.com, linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org, mingo@kernel.org Subject: Re: [RFC 2/2] perf/core: change errno for sampling event not supported in hardware In-Reply-To: <5730C79F.3060307@synopsys.com> Message-ID: References: <1462786660-2900-1-git-send-email-vgupta@synopsys.com> <1462786660-2900-3-git-send-email-vgupta@synopsys.com> <5730C79F.3060307@synopsys.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 9 May 2016, Vineet Gupta wrote: > On Monday 09 May 2016 07:24 PM, Vince Weaver wrote: > > On Mon, 9 May 2016, Vineet Gupta wrote: > > > >> This allows userspace to identify this case specifically from the > >> catch all error msg it prints currently. > >> > >> This is an ABI change > > > > An ABI change which will probably break things. > > > Right thats what I feared. But hold on, I don't think we need to change the ABI to > achieve what we want. Gosh why did I even take that path. > > Currently the errno switch case in perf_evsel__open_strerror() in doesn't handle > ENOTSUPP. So how about we add that - augmented with the same sample_period !0 > check to barf for lack of sampling support. > > Do you see anything wrong with that ? no, but it would be nice if one of the actual maintainers would chime in with an opinion. In any case if ENOTSUPP is being returned to userspace I should update the perf_event manpage to reflect that. Vince