[postgis-devel] Valgrind callgrind tool

Nathaniel Hunter Clay clay.nathaniel at gmail.com
Sat Jan 12 11:39:15 PST 2013


Hi all,

I am in the process of writing functions that enable the return of 
arbitrary rays of pixel values from a raster and a function that returns 
the visibility of  one point to another point on the surface of a 
raster. The functions that I have written so far  are preforming 
terribly slow.

So I was going to use Valgrind callgrind to find out which function or 
overall which functions are taking up the most time.  However, I have 
tried to use Paul Ramsey's Valgrind blog post to guide me in executing 
postgresql statements in single user mode. So that Valgrind can profile 
the execution of my functions.

I am running into some problems with the default package of postgresql 
in Ubuntu. Postgresql 9.1 is a little finicky in taking command line 
switches to place it in single user mode and to tell it where the 
postgresql config file is and etc. So, how do you setup your environment 
for debugging and profiling? Are there any tips on how to use Valgrind 
other than on Paul's blog? Any help would be greatly appreciated.

Many Thanks,

Nathaniel Hunter Clay



More information about the postgis-devel mailing list