Problem with gprof, no gmon.out file !!
Hi,
I am trying to profile a program with gprof. I am using gcc to build and link, and I am using the -pg option. However, when my program exits (gracefully), no gmon.out file is generated. I am using Linux 2.6.4.xxx and gcc 3.4.2 Here is a sample of my build commands: Compilation: ------------ gcc -pg -Werror -g -nostdinc -I SIM/include/include1 - I SIM/include/include2 -o SIM/obj/simulate_main.o -c SIM/simulate_main.c gcc -pg -Werror -g -nostdinc -I SIM/include/include1 - I SIM/include/include2 -o SIM/obj/traffic_gen.o -c SIM/traffic_gen.c Linkage: -------- gcc -nostdinc -I SIM/include/include1 - I SIM/include/include2 -pg -Werror -g -Wl,-export-dynamic ./SIM/obj/simulate_main.o ./SIM/obj/traffic_gen.o -lpthread -o SIM/bin/simulate gcc -nostdinc -I SIM/include/include1 - I SIM/include/include2 -static -pg -Werror -g -Wl,-export-dynamic ./SIM/obj/simulate_main.o ./SIM/obj/traffic_gen.o -lpthread -o SIM/bin/simulate_static thanks, Taj |
How do you execute the linked program? From which directory?
I think you should look for the file in the current directory, that is, the directory from where you start the program. Maybe you're looking in the wrong place? |
Hi, did you manage to solve ur problem? coz i'm getting the same thing. no gmon.out. and i looked at the current directory. i even did a search in case the file end up somewhere else. if ur problem is solved, would appreciate if u can share the solution with me. thanks in advance
|
All times are GMT -5. The time now is 08:34 AM. |