Questions tagged [sprof]

11 questions
33
votes
3 answers

gprof : How to generate call graph for functions in shared library that is linked to main program

I am working on Linux environment. I have two 'C' source packages train and test_train. train package when compiled generates libtrain.so test_train links to libtrain.so and generates executable train-test Now I want to generate a call graph using…
atv
  • 1,950
  • 4
  • 21
  • 26
20
votes
3 answers

What is causing sprof to complain about "inconsistency detected by ld.so"?

I'm trying to use sprof to profile some software (ossim) where almost all the code is in a shared library. I've generated a profiling file, but when I run sprof, I get the following error: > sprof /home/eca7215/usr/lib/libossim.so.1…
Edward
  • 1,786
  • 1
  • 15
  • 33
9
votes
1 answer

How to use sprof?

please explain with example?
yoge
7
votes
2 answers

Profiling a preloaded shared library with LD_PROFILE

I'm currently trying to profile a preloaded shared library by using the LD_PROFILE environment variable. I compile the library with "-g" flag and export LD_PROFILE_OUTPUT as well as LD_PROFILE before running an application (ncat in my case) with the…
user1159435
  • 125
  • 2
  • 7
2
votes
1 answer

How can sprof locate my shared library

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 export LD_PROFILE_OUTPUT=${PWD} export LD_PROFILE= mylib.so export LD_LIBRARY_PATH=/tmp execute my_app, which is linked…
Jimm
  • 8,165
  • 16
  • 69
  • 118
2
votes
2 answers

sprof "PLTREL not found error"

I'm trying to profile our shared library, but whenever I have the environmental variable LD_PROFILE set, I get "PLTREL not found in object ". What gives? Is there some sort of linker flag I'm missing or what? There seems to be no information…
jdizzle
  • 4,078
  • 1
  • 30
  • 38
1
vote
0 answers

Profile OpenCV with sprof

I have this basic OpenCV code: #include "opencv2/opencv.hpp" int main(){ cv::Mat img = cv::imread("/home/luca/Documents/IMG_20161031_162242.jpg", cv::IMREAD_GRAYSCALE); if(!img.data) std::cerr<<"Error reading image"<
justHelloWorld
  • 6,478
  • 8
  • 58
  • 138
1
vote
1 answer

How to profile a dynamically linked library without sprof?

I am having some trouble profiling a dynamic library, and I can't seem to find anybody who has used sprof. Does anybody know of an alternative tool that can give a call graph for a dynamically linked library?
Mikhail
  • 7,749
  • 11
  • 62
  • 136
0
votes
1 answer

Discard unused symbos from dlopen()'ed .so

I have a set of shared libraries (Intel MKL) that are only distributed in binary form. A top-level "runtime" library, libmkl_rt.so, links against my executable and is visible with ldd: ... libmkl_rt.so => /var/task/lib/libmkl_rt.so…
thinkski
  • 1,306
  • 1
  • 15
  • 25
0
votes
1 answer

sprof flat profile name column has ugly format

I try to profile functions provided by a shared library using sprof. The profiling works but the column containing the function names is very ugly formatted. I'm using for example the unordered_map provided by boost. The associated entry in the flat…
Fex
  • 322
  • 1
  • 13
0
votes
1 answer

What are the default values for these export variables?

I tried to setup sprof (following this http://greg-n-blog.blogspot.com/2010/01/profiling-shared-library-on-linux-using.html) using the below steps. Now my program won't run. What are the steps I need to do to undo the following? 2) export…
postelrich
  • 3,274
  • 5
  • 38
  • 65