LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 12: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, 04: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: 45
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, 09: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



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 01:55 AM
gprof: gmon.out: not in a.out format hemk76 Programming 7 11-06-2005 10:05 AM
gprof problem bogdanpa Programming 2 09-19-2005 08:26 AM
Win32 version of Gprof - Problem motwman Linux - Software 0 03-31-2005 02:58 PM
gprof: gmon.out file is missing call-graph data hemk76 Programming 0 01-07-2005 11:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:20 AM.

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
Open Source Consulting | Domain Registration