[R-sig-Debian] sprof works on your Debian/Ubuntu ?
Dirk Eddelbuettel
edd at debian.org
Tue Jun 30 21:16:21 CEST 2009
On 30 June 2009 at 14:03, Paul Johnson wrote:
| On Tue, Jun 30, 2009 at 1:09 PM, Paul Johnson<pauljohn32 at gmail.com> wrote:
| > On Sun, Jun 28, 2009 at 3:04 PM, Dirk Eddelbuettel<edd at debian.org> wrote:
| >>
| >> Paul,
| >
| >>
| >> Yes, rebuilding only the parts you want to profile using google-perftools is
| >> easier.
| >>
| >> Hope this helps, Dirk
| >
|
|
| Hello Dirk and others:
|
| I wonder about the small r in your notes. What is that?
Please see e.g. http://dirk.eddelbuettel.com/code/littler.html and just run
'sudo apt-get install littler' on your system to get it.
| In Ubuntu 9.04, I installed "libgoogle-perftool0" and
| "libgoogle-perftools-dev" from the Ubuntu archive. The version of
| google perftools that Ubuntu repositories provide is old. The
| Version is: 0.98, but i see on their homepage it is now up to 1.3.
| (http://code.google.com/p/google-perftools/) I run into the same
| problem with either one.
|
| This happens:
|
| $ LD_PRELOAD="/usr/lib/libprofiler.so.0.0.0" CPUPROFILE=/tmp/rprof3.log R
| Profiling timer expired
I suspect you need something like
$ LD_PRELOAD="/usr/lib/libprofiler.so.0.0.0" \ # enable profiling
CPUPROFILE=/tmp/rprof3.log R \ # provides a logfile
R CMD BATCH someScriptToRun.R
as R would otherwise just sit there and wait for your input, no?
| I am in the thin air now..
|
| Hm. I just noticed I can run the same with "sudo" and it does not stop
| with "Profiling timer expired".
I believe all example I tried with google perftools worked as a regular user.
| Do you have to run this as root as well? (Same problem I encountered
| with oprofile, incidentally).
No, oprofile, if memory serves, is kernel-level so that's why root comes in.
| I can link my package with -lprofile. I suppose I could rebuild R.
You don't have to... if you're happy enough with the LD_PRELOAD trick.
| Would root access be needed to start the profile collector?
Not that I know but I may of course be missing something.
Hth, Dirk
--
Three out of two people have difficulties with fractions.
More information about the R-SIG-Debian
mailing list