Re: [Rd] profiling C code

From: Torsten Hothorn <Torsten.Hothorn_at_rzmail.uni-erlangen.de>
Date: Wed 22 Feb 2006 - 10:39:33 GMT

>
> 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



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed Feb 22 21:42:31 2006

This archive was generated by hypermail 2.1.8 : Wed 22 Feb 2006 - 19:30:50 GMT