From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sat, 8 Oct 2005 01:41:12 +0400 From: "Dmitry V. Levin" To: ALT Devel discussion list Subject: Re: [devel] version script for libdb4.3 Message-ID: <20051007214112.GA27634@nomad.office.altlinux.org> Mail-Followup-To: ALT Devel discussion list References: <20050904210622.GG3539@solemn.turbinal.org> <1125869437.17182.4.camel@localhost.localdomain> <20050904214819.GB21568@basalt.office.altlinux.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yNb1oOkm5a9FJOVX" Content-Disposition: inline In-Reply-To: <20050904214819.GB21568@basalt.office.altlinux.org> X-fingerprint: 9658 398D 181B 1200 8FC5 26B8 F6F8 846B C1E2 3429 X-BeenThere: devel@altlinux.ru X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ALT Devel discussion list List-Id: ALT Devel discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2005 21:41:10 -0000 Archived-At: List-Archive: List-Post: --yNb1oOkm5a9FJOVX Content-Type: multipart/mixed; boundary="8t9RHnE3ZwKMSgU+" Content-Disposition: inline --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 05, 2005 at 01:48:19AM +0400, Dmitry V. Levin wrote: [...] > =D5=C2=C9=D2=C1=CE=C9=C5 =CE=C5=CE=D5=D6=CE=D9=C8 =D3=C9=CD=D7=CF=CC=CF= =D7 =C4=C1=A3=D4 =D3=D4=C1=C2=C9=CC=C9=DA=C1=C3=C9=C0 =C9=D3=D0=CF=CC=D8=DA= =CF=D7=C1=CE=C9=D1 =C9 =D2=CF=D3=D4 =D3=CB=CF=D2=CF=D3=D4=C9 > =DA=C1=D0=D5=D3=CB=C1. =EE=C1 =D4=CF=CD =D6=C5 libdb4.3 =D7=D9=C9=C7=D2= =D9=DB =D5=CD=CF=D0=CF=CD=D2=C1=DE=C9=D4=C5=CC=D8=CE=D9=CA. =EE=C5=CD=CE=CF=C7=CF =C3=C9=C6=D2: $ ls -log {old,new}/libdb-4.3.so=20 -rw-r--r-- 1 854016 =EF=CB=D4 8 00:17 new/libdb-4.3.so -rw-r--r-- 1 936160 =E9=C0=CE 15 22:31 old/libdb-4.3.so $ nm -D old/libdb-4.3.so |grep -c '^[0-9a-f]' 1431 $ nm -D new/libdb-4.3.so |grep -c '^[0-9a-f]' 51 $ rm -f my_db.db && env -i LD_DEBUG=3Dstatistics LD_LIBRARY_PATH=3Dold ./db= _create 12345: number of relocations: 632 12345: number of relocations from cache: 6 12345: number of relative relocations: 1593 12345:=09 12345: runtime linker statistics: 12345: final number of relocations: 748 12345: final number of relocations from cache: 6 $ rm -f my_db.db && env -i LD_DEBUG=3Dstatistics LD_LIBRARY_PATH=3Dnew ./db= _create 12345: number of relocations: 106 12345: number of relocations from cache: 5 12345: number of relative relocations: 2120 12345:=09 12345: runtime linker statistics: 12345: final number of relocations: 139 12345: final number of relocations from cache: 5 $ env -i LD_LIBRARY_PATH=3Dold time sh -c 'rm -f my_db.db; for i in `seq 10= 000`; do ./db_create; done' 5.53user 4.15system 0:09.68elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (1920466major+361627minor)pagefaults 0swaps $ env -i LD_LIBRARY_PATH=3Dnew time sh -c 'rm -f my_db.db; for i in `seq 10= 000`; do ./db_create; done' 2.82user 3.91system 0:06.72elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (1750466major+351627minor)pagefaults 0swaps --=20 ldv --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="db_create.c" Content-Transfer-Encoding: quoted-printable /* Taken from /usr/share/doc/db-4.3.28/gsg/C/DB.html */ #include int main(void) { DB *dbp; /* DB structure handle */ u_int32_t flags; /* database open flags */ int ret; /* function return value */ /* Initialize the structure. This = =20 * database is not opened in an environment, = =20 * so the environment pointer is NULL. */ ret =3D db_create(&dbp, NULL, 0); if (ret !=3D 0) { /* Error handling goes here */ return 1; } /* Database open flags */ flags =3D DB_CREATE; /* If the database does not exist, = =20 * create it.*/ /* open the database */ ret =3D dbp->open(dbp, /* DB structure pointer */ NULL, /* Transaction pointer */ "my_db.db", /* On-disk file that holds the database. */ NULL, /* Optional logical database name */ DB_BTREE, /* Database access method */ flags, /* Open flags */ 0); /* File mode (using defaults) */ if (ret !=3D 0) { /* Error handling goes here */ return 1; } return 0; } --8t9RHnE3ZwKMSgU+-- --yNb1oOkm5a9FJOVX Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDRut49viEa8HiNCkRAgJwAJkBFNOOH8PsIfsrZErt24XdnaOs1QCfTBEE IV67U5ApnEuoNz+dDu6xiq0= =vI23 -----END PGP SIGNATURE----- --yNb1oOkm5a9FJOVX--