On Tue, 2010-08-10 at 14:47 +1200, Michael Hope wrote:
I'd like to record the running of a typical program such as Firefox, GCC, or ffmpeg and capture the calls and arguments to functions like strcpy() and memcpy(). The idea is to generate a usage profile so we can tell what standard library functions and what variants (i.e. aligned/unaligned, small copy/large copy) to attack first.
Does anyone know of existing research with this information, or existing tools that could capture it?
In a previous life I've played with sprof which gave a developer such information about a single shared library. That might be useful to play with if you are interested in profiling a single shared library. I don't know what the current status is but it's certainly worth a try and prevents you from having to write tracing versions of the functions that you might be interested in.
Still seems to come by default with eglibc and might be worth exploring though your mileage may vary.
HTH Ramana