I've hacked up some profiling support for linux
(probably works on other *nixen with GCC and gprof,
too). I wrote a NASM macro called PROFILE_ENTRY to be
placed at the beginning of procedures in order to
instrument them for gprof, and added code to
configure.in so that it can be enabled easily. I also
sprinkled PROFILE_ENTRYs through linux/copyvwin.asm and
cpu/memory.asm.
PROFILE_ENTRY doesn't expand to anything when profiling
isn't enabled, so it shouldn't slow anything down for
non-profiling builds.
The patch itself