LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 01-06-2007, 03:00 PM   #1
ecooper
LQ Newbie
 
Registered: Jan 2007
Distribution: Fedora Core 5
Posts: 1

Rep: Reputation: 0
Profiling Standard C library functions using gprof


I'm trying to profile a program using gprof on Fedora Core 5 and I need profiling information for the Standard C Library functions. But when I compile using the -pg option, it doesn't automatically use the profiling version of the standard C library which seems to contradict what I read in the GNU gprof manual


Also, when I include the flag -lc_p to explicitly use the c profiling library, it says it can't find the library. I'm using glibc-2.4 which apparently obsoletes the old glibc-profile libraries.

I'm wondering whether I need to rebuild glibc with profiling enabled or if there is something else I need to do to be able to profile the standard C functions.
 
Old 01-08-2007, 09:46 AM   #2
jim mcnamara
Member
 
Registered: May 2002
Posts: 964

Rep: Reputation: 36
If you link statically it may solve some problems. The glibc entrypoints should be defined in a static link in such a way that the profiler can monitor them.

Last edited by jim mcnamara; 01-08-2007 at 09:47 AM.
 
  


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
gprof and execution profiling astropirhana Programming 1 10-24-2006 12:16 PM
profiling sort functions in Linux tjd Linux - General 0 06-17-2006 05:47 PM
Console standard iInput functions yrauchwerger Programming 1 05-23-2006 02:52 AM
Standard C library numeric array functions? bulliver Programming 8 04-12-2006 08:45 PM
C++ standard library. Thetargos Programming 8 10-09-2003 03:01 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:31 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