LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-03-2009, 01:57 PM   #1
taj2000
LQ Newbie
 
Registered: May 2009
Posts: 1

Rep: Reputation: 0
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
 
Old 05-04-2009, 05:33 PM   #2
clvic
Member
 
Registered: Feb 2008
Location: Rome, Italy
Distribution: OpenSuSE 11.x, vectorlinux, slax, Sabayon
Posts: 206
Blog Entries: 2

Rep: Reputation: 44
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?
 
Old 05-21-2009, 10:01 PM   #3
linux newb
LQ Newbie
 
Registered: Aug 2008
Posts: 4

Rep: Reputation: 0
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
gmon.out not created while using gprof on target board VGM Linux - General 0 04-14-2009 02:55 AM
gprof: gmon.out: not in a.out format hemk76 Programming 7 11-06-2005 11:05 AM
gprof problem bogdanpa Programming 2 09-19-2005 09:26 AM
Win32 version of Gprof - Problem motwman Linux - Software 0 03-31-2005 03:58 PM
gprof: gmon.out file is missing call-graph data hemk76 Programming 0 01-08-2005 12:54 AM


All times are GMT -5. The time now is 06:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration