[Rd] profiling C code
Torsten Hothorn
Torsten.Hothorn at rzmail.uni-erlangen.de
Wed Feb 22 11:39:33 CET 2006
>
> If you are running Linux, Torsten's suggestion of oprofile is a good one,
> provided you have root access (it seems to need it). So I used in a root
> terminal (running the same example in another window in the middle)
>
> % opcontrol --no-vmlinux
> % opcontrol --start
> .... run things ...
opcontrol --dump
doesn't require root privileges on my system and
> % opreport -l /users/ripley/R/R-devel/bin/exec/R
> % opreport -l /users/ripley/R/R-devel/library/stats/libs/stats.so
should be allowed for `normal users', too.
> ...
> (No unit mask) count 100000
> samples % symbol name
> 6 31.5789 bvalue_
> 4 21.0526 bsplvb_
> 3 15.7895 bsplvd_
> 2 10.5263 sbart_
> 2 10.5263 sslvrg_
> 1 5.2632 anonymous symbol from section .plt
> 1 5.2632 stxwx_
> % opannotate -s /users/ripley/R/R-devel/library/stats/libs/stats.so
> [Problem, root cannot read my source files]
for me, opannotate did not ask about running as `root'.
> % opcontrol --shutdown
>
> If there is a way to use this without root access I would like to know it,
> as only a few very privileged users get that here, and I am not going to
> open up root access to my private file server.
root needs to start the daemon via
opcontrol --start-daemon
and normal users can dump the output. But I don't know how a normal user
would clean up and start new.
Best,
Torsten
More information about the R-devel
mailing list