I'm trying to get gprof working and am having absolutely no luck in getting a gmon.out file to be generated - I compile my program with the -pg flag, then execute it, but nothing gets generated. The flag is doing SOMETHING, since the size of the binary increases very slightly when I compile with -pg versus without, but it's definitely not creating any file - I've made sure permissions are set correctly, looked around in all possible directories. The exact same series of steps correctly creates the gmon.out file on a FreeBSD machine I tried it on, so I have absolutely no idea why it seems to do nothing on my Mac. Any ideas? EDIT: I tried it on another Mac (almost the exact same system as mine, both C2D iMacs with Leopard) and it works...which is even weirder. I've tried both gcc 4.0 and 4.2 on my machine and neither works.