LinuxQuestions.org
Review your favorite Linux distribution.
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 03-25-2005, 12:33 PM   #1
iansworld
Member
 
Registered: Oct 2004
Location: Mission Viejo, CA
Distribution: suse 9.1
Posts: 30

Rep: Reputation: 15
gprof - annotate source, profile directed compiling


I would like to use the annotated source output of gprof (activity of code by line number).

I am compiling the code using gcc 3.4.2 as:

gcc -pg program_name -o program

When program is run, I get the gmon.out file just fine. I then run gprof as

gprof program > LOG

The flat listing ouptut works fine.

The gprof man page says that I can get the annotated source output by running it as:

gprof -A program

gprof accepts this option (no errors or warnings) but produces no ouput. Am I doing something wrong or is this an unimplemented option?

I would also like to use profile outputs as an input for recompliling. The gcc man page lists some options such as -fprofile-arcs for this purpse. Can someone give me a sketch on how to use the profiling into for this purpose?

- Ian
 
  


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
source /etc/profile kaon Slackware 13 08-09-2004 10:02 PM
compiling software from source...how do i delete the folder w/ source? webazoid Linux - Software 2 07-01-2004 09:09 PM
Enabling subnet directed broadcast on Linux Router yrraja Linux - Networking 3 07-01-2004 12:27 PM
source /etc/profile? why? what is it? piratebiter Linux - General 3 09-09-2003 11:36 AM
.profile not be source when using ksh93. NEED HELP!!!! michaeldm9 Linux - General 0 08-28-2003 08:29 AM

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

All times are GMT -5. The time now is 12:26 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
Open Source Consulting | Domain Registration