All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH] perf: Fix accidentally preprocessed snprintf callback
Date: Wed, 14 Apr 2010 16:55:28 +0200	[thread overview]
Message-ID: <20100414145526.GC5142@nowhere> (raw)
In-Reply-To: <20100414022800.GE25649@ghostprotocols.net>

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.


  reply	other threads:[~2010-04-14 14:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-14  0:37 [PATCH] perf: Fix accidentally preprocessed snprintf callback Frederic Weisbecker
2010-04-14  0:41 ` Frederic Weisbecker
2010-04-14  2:28   ` Arnaldo Carvalho de Melo
2010-04-14 14:55     ` Frederic Weisbecker [this message]
2010-04-14 17:09     ` [PATCH v2] struct sort_entry has a callback named snprintf that turns an entry into a string result Frederic Weisbecker
2010-04-14 17:11 ` [PATCH v3] perf: Fix accidentally preprocessed snprintf callback Frederic Weisbecker
2010-04-14 17:31   ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100414145526.GC5142@nowhere \
    --to=fweisbec@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@ghostprotocols.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.