From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11954 invoked by alias); 18 Mar 2009 19:24:14 -0000 Received: (qmail 11941 invoked by uid 22791); 18 Mar 2009 19:24:13 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_31,MIME_QP_LONG_LINE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: sourceware.org Received: from c60.cesmail.net (HELO c60.cesmail.net) (216.154.195.49) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 18 Mar 2009 19:24:04 +0000 Received: from unknown (HELO webmail2) ([192.168.1.183]) by c60.cesmail.net with ESMTP; 18 Mar 2009 15:24:03 -0400 Received: from 83-244-211-66.cust-83.exponential-e.net (83-244-211-66.cust-83.exponential-e.net [83.244.211.66]) by webmail.spamcop.net (Horde MIME library) with HTTP; Wed, 18 Mar 2009 15:24:33 -0400 Message-ID: <20090318152433.4u74oma1z4sgk8g8-nzlynne@webmail.spamcop.net> Date: Wed, 18 Mar 2009 19:40:00 -0000 From: Joern Rennecke To: gdb-patches@sourceware.org Subject: RFA: use xcalloc for zalloc. MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_2dcxlx415xno" Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.1.4) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-03/txt/msg00388.txt.bz2 This message is in MIME format. --=_2dcxlx415xno Content-Type: text/plain; charset=ISO-8859-15; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-length: 97 This patch speeds up simulators that use the sim/common infrastructure to allocate their memory. --=_2dcxlx415xno Content-Type: text/plain; charset=UTF-8; name="zalloc-diff-cvs" Content-Disposition: attachment; filename="zalloc-diff-cvs" Content-Transfer-Encoding: quoted-printable Content-length: 1738 regression tested for m32r-elf with check-gcc and check-gdb on gcc11 in gcc svn & sourceware cvs from 20090317. A simple test shows that speed for allocating large memory areas is indeed improved on gcc11: amylaar@gcc11:~/20090317-z$ uname -a Linux gcc11 2.6.18-6-vserver-amd64 #1 SMP Fri Jun 6 05:50:26 UTC 2008 x86_6= 4 GNU/Linux amylaar@gcc11:~/20090317/bld-m32r/gcc/testsuite/gcc$ time ~/20090317/bld-m3= 2r/sim/m32r/run --memory-region 0,0x80000000 big.x real 0m3.180s user 0m1.488s sys 0m1.692s amylaar@gcc11:~/20090317/bld-m32r/gcc/testsuite/gcc$ time ~/20090317-z/bld-= m32r/sim/m32r/run --memory-region 0,0x80000000 big.x real 0m0.069s user 0m0.060s sys 0m0.012s 2007-04-30 J"orn Rennecke Speed up simulator startup: * sim-utils.c (zalloc): Use xcalloc. Index: sim/common/sim-utils.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/sim/common/sim-utils.c,v retrieving revision 1.9 diff -p -u -r1.9 sim-utils.c --- sim/common/sim-utils.c 14 Jan 2009 10:53:06 -0000 1.9 +++ sim/common/sim-utils.c 18 Mar 2009 18:42:18 -0000 @@ -52,15 +52,13 @@ along with this program. If not, see