All of lore.kernel.org
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@gnu.org>
To: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org, Paul Mackerras <paulus@samba.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH 3/5] perf tools: Add GCC optimization to memory allocating functions
Date: Mon, 29 Nov 2010 09:54:09 -0300	[thread overview]
Message-ID: <1291035249.2189.20.camel@cowboy> (raw)
In-Reply-To: <20101127003040.GB17400@ghostprotocols.net>

On Fri, 2010-11-26 at 22:30 -0200, Arnaldo Carvalho de Melo wrote:
> Em Fri, Nov 26, 2010 at 07:47:19PM -0200, Arnaldo Carvalho de Melo escreveu:
> > From: Davidlohr Bueso <dave@gnu.org>
> > 
> > We can benefit from the alloc_size attribute in xrealloc and zalloc.
> > 
> > Quoting from http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html:
> > 
> > "The alloc_size attribute is used to tell the compiler that the function return
> > value points to memory, where the size is given by one or two of the functions
> > parameters. GCC uses this information to improve the correctness of
> > __builtin_object_size."
> 
> Ingo, please don't pull this, it breaks the build with older GCCs...
> 

Sorry about that. This attribute was added for the 4.2 series in early
2007 (http://gcc.gnu.org/ml/gcc-patches/2007-04/msg01649.html)

> util/util.h:185: warning: ‘alloc_size’ attribute directive ignored
> util/util.h:190: warning: ‘alloc_size’ attribute directive ignored
> make: *** [/home/acme/git/build/perf/builtin-annotate.o] Error 1
> make: Leaving directory `/home/acme/git/linux-2.6-tip/tools/perf'
> [acme@mica linux-2.6-tip]$ gcc -v
> Using built-in specs.
> Target: x86_64-redhat-linux
> Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
> --infodir=/usr/share/info --enable-shared --enable-threads=posix
> --enable-checking=release --with-system-zlib --enable-__cxa_atexit
> --disable-libunwind-exceptions --enable-libgcj-multifile
> --enable-languages=c,c++,objc,obj-c++,java,fortran,ada
> --enable-java-awt=gtk --disable-dssi --enable-plugin
> --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre
> --with-cpu=generic --host=x86_64-redhat-linux
> Thread model: posix
> gcc version 4.1.2 20071124 (Red Hat 4.1.2-42)
> 
> I'll reorg this using compiler.h tricks probably, for now I'll just
> remove it from my perf/core branch.
> 
> - Arnaldo
> 



  reply	other threads:[~2010-11-29 12:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-26 21:47 [GIT PULL 0/5] perf/core improvements and fixes Arnaldo Carvalho de Melo
2010-11-26 21:47 ` [PATCH 1/5] perf record: Add option to disable collecting build-ids Arnaldo Carvalho de Melo
2010-11-26 21:47 ` [PATCH 2/5] perf events: Default to using event__process_lost Arnaldo Carvalho de Melo
2010-11-26 23:55   ` Thomas Gleixner
2010-11-27  0:18     ` Arnaldo Carvalho de Melo
2010-11-26 21:47 ` [PATCH 3/5] perf tools: Add GCC optimization to memory allocating functions Arnaldo Carvalho de Melo
2010-11-27  0:30   ` Arnaldo Carvalho de Melo
2010-11-29 12:54     ` Davidlohr Bueso [this message]
2010-11-26 21:47 ` [PATCH 4/5] perf symbols: Correct final kernel map guesses Arnaldo Carvalho de Melo
2010-11-26 21:47 ` [PATCH 5/5] perf trace: Handle DT_UNKNOWN on filesystems that don't support d_type 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=1291035249.2189.20.camel@cowboy \
    --to=dave@gnu.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --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.