Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753014AbaKJOOP (ORCPT ); Mon, 10 Nov 2014 09:14:15 -0500 Received: from mail-pa0-f52.google.com ([209.85.220.52]:44461 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751928AbaKJOON (ORCPT ); Mon, 10 Nov 2014 09:14:13 -0500 Message-ID: <5460C83B.5050905@gmail.com> Date: Mon, 10 Nov 2014 07:14:19 -0700 From: David Ahern User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Ingo Molnar , Arnaldo Carvalho de Melo CC: Peter Zijlstra , Vince Weaver , Stephane Eranian , Jiri Olsa , Andy Lutomirski , Thomas Gleixner , LKML Subject: Re: [RFD] perf syscall error handling 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> <20141110102725.GA19309@gmail.com> <20141110121527.GQ18464@kernel.org> <20141110122446.GA21503@gmail.com> In-Reply-To: <20141110122446.GA21503@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/10/14, 5:24 AM, Ingo Molnar wrote: > Programmatic use in user-spaec is very simple - go with my > initial example, tooling can either just display the error string > and bail out, or do: > > if (unlikely(error)) { > if (!strcmp(attr->error_str, "x86/bts: BTS not supported by this CPU architecture")) { > fprintf(stderr, "x86/BTS: No hardware support falling back to branch sampling\n"); > activate_x86_bts_fallback_code(); > goto out; > } That makes the exact string content part of the ABI. As I recall ftrace had a problem with format strings changing and tooling then limiting the ability to change it. David -- 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/