Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 09-16-2005, 01:02 PM   #1
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.

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

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
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, 08:26 AM   #3
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


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

All times are GMT -5. The time now is 08:14 PM.

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