Subject: Re: profiling main()
To: Roland Illig <rillig@NetBSD.org>
From: Rui Paulo <rpaulo@fnop.net>
List: tech-toolchain
Date: 10/12/2005 23:01:20
--pf9I7BMVVzbSWLtt
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 2005.10.12 23:56:25 +0200, Roland Illig wrote:
| Rui Paulo wrote:
| >Hi,
| >The attached patch makes it possible to profile main() in userland
| >applications for ELF files. The "bug" was noticed by Bruce Evans in
| >http://lists.freebsd.org/pipermail/cvs-src/2005-October/053619.html.
| >
| >Please comment.
|=20
| Wouldn't it be easier to have a macro similar to this:?
|=20
| #ifdef EPROL_EXPORT
| #  define EPROL_EXPORT_WITH_LABEL EPROL_EXPORT; __asm("_eprol:");
| #else
| #  define EPROL_EXPORT_WITH_LABEL __asm("_eprol:");
| #endif
|=20
| and use that instead of the four lines of equal code in many files?

Most of the code is equal between all those files. If we don't want to
duplicate code, we should fix all the files and not just this small
change.

		-- Rui Paulo

--pf9I7BMVVzbSWLtt
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (NetBSD)

iD8DBQFDTYewZPqyxs9FH4QRAgb6AKCFF1/vbLWRMwzeBQG083VvzlzXuwCghdXI
0ThBtFL2Yw196BIBZfLpdbo=
=znyX
-----END PGP SIGNATURE-----

--pf9I7BMVVzbSWLtt--