[Rd] Profiling C functions called from R.

Pavel N. Krivitsky pavel at stat.washington.edu
Sat Feb 26 02:53:32 CET 2005


I am working on an R package which includes some C routines. I would 
like to profile the C routines (built with GCC under Debian Linux). I 
tried running R with

LD_PROFILE=/path/to/C/library.so R

and executing functions that would invoke the code therein. The code 
takes about twice as long to run with LD_PROFILE set than without, so I 
am guessing that profiling is taking place. However, gmon.out is not 
generated (or at least I can't find it anywhere on the filesystem).

Has anyone been able to profile shared libraries built for R in Linux?

                Thank you in advance,
                Pavel Krivitsky

More information about the R-devel mailing list