Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755791Ab0DNOzf (ORCPT ); Wed, 14 Apr 2010 10:55:35 -0400 Received: from mail-pw0-f46.google.com ([209.85.160.46]:48367 "EHLO mail-pw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754426Ab0DNOzd (ORCPT ); Wed, 14 Apr 2010 10:55:33 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; b=QhpAodogKYCgbrMc+WSIGmKg0m3Ebz3GbnXdGOCsbz7ZoYnbnWUl3B33CBKzM9gFaw vERuf0QuU13D5XFD3SQVX8jPfd5/vDHy7iBlRbRn5Z1F7V6hLdFt4JLN2RqErkclk2ow MELL73YECeWtHuRAIslYTzfUCY1dl0l+hMA9U= Date: Wed, 14 Apr 2010 16:55:28 +0200 From: Frederic Weisbecker To: Arnaldo Carvalho de Melo Cc: LKML , Peter Zijlstra , Paul Mackerras , Ingo Molnar Subject: Re: [PATCH] perf: Fix accidentally preprocessed snprintf callback Message-ID: <20100414145526.GC5142@nowhere> References: <1271205468-8202-1-git-send-regression-fweisbec@gmail.com> <20100414004115.GI5602@nowhere> <20100414022800.GE25649@ghostprotocols.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20100414022800.GE25649@ghostprotocols.net> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1898 Lines: 49 On Tue, Apr 13, 2010 at 11:28:00PM -0300, Arnaldo Carvalho de Melo wrote: > Em Wed, Apr 14, 2010 at 02:41:16AM +0200, Frederic Weisbecker escreveu: > > On Wed, Apr 14, 2010 at 02:37:48AM +0200, Frederic Weisbecker wrote: > > > struct sort_entry has a callback named snprintf that turns an > > > entry into a string result. > > > > > > But there are glibc versions that implement snprintf through a > > > macro. The following expression is then going to get the snprintf > > > call preprocessed: > > > > > > ent->snprintf(...) > > > > > > to finally end up in a build error: > > > > > > util/hist.c: Dans la fonction ?hist_entry__snprintf? : > > > util/hist.c:539: erreur: ?struct sort_entry? has no member named ?__builtin___snprintf_chk? > > > > > > To fix this, rename struct sort_entry::snprintf() callback to > > > to_string(), assuming at least Java methods naming won't ever > > > conflict with perf. > > > > > > Note I'm not entirely happy with this to_string() renaming. > > May be append_string() would have been better. I don't know. > > snprintf() was just too good. > > If you think about something else, don't hesistate to change, > > or I can change it myself if you want. > > psnprintf() I guess, the intent was exactly to mean that it is indeed > similar to snprintf... dammit, there is already a psnprintf out there > :-\ > > Perhaps just do it as ->he_snprintf and have the other methods as well > prefixed with he as a shorthand for hist_entry, that is what the methods > operate, besides the string, ok? Sure, I'll resend. This is going to be se_sprintf() though, as it's about sort_entry, not hist_entry :) Thanks. -- 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/