I currently am developing a shared lilbrary for loading into PostgreSQL (as C-Language functions, see here). Now I would like to profile the function in this library without recompiling PostgreSQL itself.
I tried callgrind using
valgrind --tool=callgrind path/to/postgres arguments-to-postgres
This gives me profiling information for PostgreSQL itself, but fails to log the shared library I am interested in.
I also tried sprof
, but I have no idea how to get that one working.
Any ideas would be highly appriciated.
P.S.: Please do not suggest just pausing the application in a debugger. With function runtimes way below 0.01 seconds I need more detailled results.