From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Buesch Date: Sun, 13 Feb 2005 16:16:51 +0000 Subject: [UDEV, PATCH] Add profiling support to Makefile Message-Id: <200502131716.55756.mbuesch@freenet.de> MIME-Version: 1 Content-Type: multipart/mixed; boundary="nextPart2433706.dLkIT642Rh" List-Id: To: linux-hotplug@vger.kernel.org --nextPart2433706.dLkIT642Rh Content-Type: multipart/mixed; boundary="Boundary-01=_z13DC9U7BKWz6YM" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_z13DC9U7BKWz6YM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, This patch adds an option to the Makefile to enable profiling. Profiling is only enabled, when not building against klibc, as klibc lacks support for mcount(). Please apply. Thanks. =2D-=20 Regards Michael Buesch [ http://www.tuxsoft.de.vu ] --Boundary-01=_z13DC9U7BKWz6YM Content-Type: text/x-diff; charset="us-ascii"; name="udev_makefile_profile.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="udev_makefile_profile.diff" =3D=3D=3D=3D=3D Makefile 1.232 vs edited =3D=3D=3D=3D=3D =2D-- 1.232/Makefile 2005-02-11 20:55:00 +01:00 +++ edited/Makefile 2005-02-13 17:15:25 +01:00 @@ -25,6 +25,12 @@ # Leave this set to `false' for production use. DEBUG =3D false =20 +# Set the following to 'true' to let gcc generate +# additional profiling code. +# Profiling is NOT supported by klibc and disabled +# automatically if USE_KLIBC=3Dtrue +PROFILE =3D false + # Set this to compile with Security-Enhanced Linux support. USE_SELINUX =3D false =20 @@ -162,6 +168,10 @@ CFLAGS +=3D -DLOG endif =20 +ifeq ($(strip $(PROFILE)),true) + PROFILE_FLAGS =3D -pg -fno-omit-frame-pointer +endif + # if DEBUG is enabled, then we do not strip or optimize ifeq ($(strip $(DEBUG)),true) CFLAGS +=3D -O1 -g -DDEBUG -D_GNU_SOURCE @@ -185,6 +195,8 @@ # arch specific objects ARCH_LIB_OBJS =3D $(KLIBC_DIR)/libc.a =20 + # profiling is not supported by klibc (missing mcount() function) + PROFILE_FLAGS =3D =20 CRT0 =3D $(KLIBC_DIR)/crt0.o LIBC =3D $(ARCH_LIB_OBJS) $(LIB_OBJS) $(CRT0) @@ -218,6 +230,9 @@ LIB_OBJS =3D -lc LDFLAGS =3D endif + +CFLAGS +=3D $(PROFILE_FLAGS) +LIB_OBJS +=3D $(PROFILE_FLAGS) =20 ifeq ($(strip $(USE_SELINUX)),true) UDEV_OBJS +=3D udev_selinux.o --Boundary-01=_z13DC9U7BKWz6YM-- --nextPart2433706.dLkIT642Rh Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQBCD313FGK1OIvVOP4RAn7WAJ4ujJLfNnV6GLVhdHedHTxe8gDMdgCfXlhr 0vauixUgVdBeu862sbdOJj8= =2NYh -----END PGP SIGNATURE----- --nextPart2433706.dLkIT642Rh-- ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel