2

I created a shared library "mylib.so" in the /tmp folder. I would like to profile mylib.so. To do this, i took following steps

  1. export LD_PROFILE_OUTPUT=${PWD}
  2. export LD_PROFILE= mylib.so
  3. export LD_LIBRARY_PATH=/tmp
  4. execute my_app, which is linked against mylib.so

After these 4 steps, i am "supposed" to have a mylib.so.profile in the /tmp folder. but there is no such file. My suspicion is that sprof cannot locate mylib.so. How can i tell sprof to look for mylib.so in the /tmp folder? I am using redhat enterprise linux 5.0.

Jimm
  • 8,165
  • 16
  • 69
  • 118

1 Answers1

1

All the steps above are valid. My mistake was that the shared library was called mylib.so.1 and not mylib.so. I ran ldd on my_app, and it showed me my_app requires mylib.so.1. Then i changed export LD_PROFILE=mylib.so.1 and everything worked fine.

Jimm
  • 8,165
  • 16
  • 69
  • 118