From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932184AbcEKTgh (ORCPT ); Wed, 11 May 2016 15:36:37 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:59225 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751360AbcEKTgf (ORCPT ); Wed, 11 May 2016 15:36:35 -0400 Date: Wed, 11 May 2016 21:36:27 +0200 From: Peter Zijlstra To: Vineet Gupta Cc: Vince Weaver , linux-perf-users@vger.kernel.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 Message-ID: <20160511193627.GH3190@twins.programming.kicks-ass.net> References: <1462786660-2900-1-git-send-email-vgupta@synopsys.com> <1462786660-2900-3-git-send-email-vgupta@synopsys.com> <5730C79F.3060307@synopsys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5730C79F.3060307@synopsys.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 09, 2016 at 10:53:43PM +0530, Vineet Gupta wrote: > 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 ? Should work I think.