LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 09-16-2005, 02:02 PM   #1
bogdanpa
LQ Newbie
 
Registered: Jul 2003
Posts: 11

Rep: Reputation: 0
gprof problem


I'm trying to profile a program using gprof and the "time" columns are always 0, only the "calls" columns indicate something.
I've tried gprof with a simple program and it works fine, displaying results on both time and calls columns. In my real program I'm using signals, read from a comport and send some data through a pipe.
I can't figure out why gprof displays 0 on time columns.

Thanks.
 
Old 09-17-2005, 03:29 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,143

Rep: Reputation: 322Reputation: 322Reputation: 322Reputation: 322
Probably a stupid question, but to be sure, did you compile your program with profiling support (i.e. with -pg as an argument to gcc)?
 
Old 09-19-2005, 09:26 AM   #3
bogdanpa
LQ Newbie
 
Registered: Jul 2003
Posts: 11

Original Poster
Rep: Reputation: 0
" ...did you compile your program with profiling support (i.e. with -pg as an argument to gcc)?"
Yes, I did. I suspect there is something in my program that causes this behavior, because on a simple test program everything seems fine, the problem occurs only with my "real" program.
And I'm using gcc 3.3.4 on a slackware 10.0 if this is of any importance.
Thanks again
 
  


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
gprof: gmon.out: not in a.out format hemk76 Programming 7 11-06-2005 11:05 AM
gprof newbie questions windmaomao Programming 2 08-04-2005 12:57 PM
Win32 version of Gprof - Problem motwman Linux - Software 0 03-31-2005 03:58 PM
gprof error Sinner6 Linux - Software 0 07-12-2004 10:06 AM
Is there a gprof for C++? jhirshon Programming 2 04-29-2004 07:35 PM


All times are GMT -5. The time now is 03:54 AM.

Main Menu
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