Subject: Re: profiling main()
To: Rui Paulo <rpaulo@fnop.net>
From: Roland Illig <rillig@NetBSD.org>
List: tech-toolchain
Date: 10/12/2005 23:56:25
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.

Wouldn't it be easier to have a macro similar to this:?

#ifdef EPROL_EXPORT
#  define EPROL_EXPORT_WITH_LABEL EPROL_EXPORT; __asm("_eprol:");
#else
#  define EPROL_EXPORT_WITH_LABEL __asm("_eprol:");
#endif

and use that instead of the four lines of equal code in many files?

Roland