Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753120AbaKCRjT (ORCPT ); Mon, 3 Nov 2014 12:39:19 -0500 Received: from casper.infradead.org ([85.118.1.10]:58465 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752144AbaKCRjS (ORCPT ); Mon, 3 Nov 2014 12:39:18 -0500 Date: Mon, 3 Nov 2014 18:39:14 +0100 From: Peter Zijlstra To: Vince Weaver Cc: Arnaldo Carvalho de Melo , Stephane Eranian , Ingo Molnar , Jiri Olsa , Andy Lutomirski , Thomas Gleixner , LKML Subject: Re: [RFD] perf syscall error handling Message-ID: <20141103173914.GZ10501@worktop.programming.kicks-ass.net> References: <20141031072109.GD12706@worktop.programming.kicks-ass.net> <20141031092713.GA23124@gmail.com> <20141031122824.GZ12020@console-pimps.org> <20141103162548.GB18464@kernel.org> <20141103165019.GY10501@worktop.programming.kicks-ass.net> <20141103170059.GC18464@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 03, 2014 at 12:12:18PM -0500, Vince Weaver wrote: > I don't know if having an offset/mask helps much. Knowing your EINVAL > comes from ->config is nice to know, but if there's 30 different ways > to get an EINVAL from an improper config then you still can waste a lot > of time narrowing things down. > > The string solution might be nice, but it is going to take major changes > to the code and increase the size a bit. For example: > > $ cat arch/x86/kernel/cpu/perf* kernel/events/* | grep EINVAL | wc -l > 100 > > And some of the code is passing the return values back through various > long callchains (and overloaded pointers via casts) where it's not clear > how you could also pass a string value. Yes, nobody said this would be a quick and easy exercise. But I figure something needs to happen. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/