Definite's Extractor

My findings on Life, Linux, Open Source, and so on.

gprof works best with static link.

Some of my programs are extremely slow, so I try to use gprof to profile them.
After several test run, only the functions in the executable are profiled but not those from the shared library even both are complied with “-pg”.

HP gprof man mentions that environment LD_PROFILE can be set, it does reveal more functions in fedora, but not in the way I want.

Finally, I found this blog:
and link my programs statically and voila, it works!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: