I am trying to profile a R script with the last (third) approach in http://pj.freefaculty.org/blog/?p=140. I wonder if what I do (described in the following) is correct?
Instead of
google-pprof --text /usr/bin/R myprofile.log
if you issue sourceCpp with verbose=T
you'll see the file path and generated object file...
Building shared library
--------------------------------------------------------
DIR: /tmp/RtmpyxYB19/sourcecpp_79831e029f
/usr/lib/R/bin/R CMD SHLIB -o 'sourceCpp_2.so' --->8---
so try using (in this instance)
google-pprof --text /tmp/RtmpyxYB19/sourcecpp_79831e029f/sourceCpp_2.so myprofile.log