oaken-source / graprof

a profiling and trace analysis tool - see the website for downloads and additional information
http://graprof.grapentin.org
GNU General Public License v3.0
13 stars 1 forks source link

Trying graprof on a real world example: git #7

Closed stefanbeller closed 10 years ago

stefanbeller commented 11 years ago

So I was trying to use graprof on git and then executing git crashed with the instrumented build.

Setting git up seems to be easy:

# get the sources:
git clone https://github.com/gitster/git
cd git
# add the required instrumentation. Git provides a user specific file for adding such flags:
cat << EOF > config.mak
CFLAGS += -g -finstrument-functions
LDFLAGS +=  -L /home/sb/OSS/graprof/libgraprof/.libs -lgraprof
EOF
# hoping all deps are installed:
make 
LD_LIBRARY_PATH=/home/sb/OSS/graprof/libgraprof/.libs GRAPROF_OUT=gp.out ./git-status
Segmentation fault (core dumped)

I do wonder what's the problem, whether I am missing a required step or if there is a real problem. I found on the web, that -finstrument-functions may get into trouble when using with shared libraries, but this doesn't seem to be the case. (add LD_DEBUG=symbols,bindings to see the bindings, which bind correctly to libgraprof)

oaken-source commented 11 years ago

I can't reproduce this problem, using the latest development build. Maybe it's not relevant anymore? Can you try again and let me know how it went?

Thanks!

stefanbeller commented 11 years ago

It's still there (tested both on x86_64 as well as x86). When running plain ./git-status without libgraprof compiled in, it just works. Testing with valgrind, there are not even any suspicious memory accesses.

When running with libgraprof enabled however I do get weird crashes. I do not really know how to track them down.

oaken-source commented 10 years ago

fixed in develop branch - the problem was related to concurrent access to the malloc family functions.