adding code to profile all routines in an image