I'm asking here, rather than R-devel, because it seems to be a Linux
specific question and because I'm using Ubuntu-9.04.

I'm trying to profile an package, and got errors, so I decided to
follow BDR's (http://tolstoy.newcastle.edu.au/R/devel/06/02/4254.html)
example exactly, and got same problem.

Can anyone replicate?

$ sudo mkdir -p /var/tmp//usr/lib/R/library/stats/libs

$ chown -R pauljohn.pauljohn /var/tmp/usr/lib/R

$ export LD_PROFILE=/usr/lib/R/library/stats/libs/stats.so

$ R

### in R session, type
>example(smooth.spline)
> q()

Observe that does create the profile file:

$ ls -la /var/tmp/usr/lib/R/library/stats/libs
total 20
drwxr-xr-x 2 pauljohn pauljohn    4096 2009-06-28 14:26 .
drwxr-xr-x 3 pauljohn pauljohn    4096 2009-06-28 14:25 ..
-rw-r--r-- 1 pauljohn pauljohn 1356800 2009-06-28 14:26 stats.so.profile

$ sprof /usr/lib/R/library/stats/libs/stats.so
/var/tmp/usr/lib/R/library/stats/libs/stats.so.profile
Inconsistency detected by ld.so: dl-open.c: 652: _dl_open: Assertion
`_dl_debug_initialize (0, args.nsid)->r_state == RT_CONSISTENT'
failed!
paulj...@pols124:Siena-Profiling$ sudo sprof /usr/lib/R/library/stats/
libs/stats.so /var/tmp/usr/lib/R/library/stats/libs/stats.so.profile
Inconsistency detected by ld.so: dl-open.c: 652: _dl_open: Assertion
`_dl_debug_initialize (0, args.nsid)->r_state == RT_CONSISTENT'
failed!

I Google to find one discussion that there's a bug in glibc that was
unearthed in 2008 and there was debate on whether "sprof" is now
deprecated.  I don't understand the details completely.
(http://sources.redhat.com/ml/libc-alpha/2008-08/msg00013.html)

Nobody on Ubuntu has tried it lately?

Instead of sprof, I'll try oprofile, I guess.

I already tried to do this with gprof applied to the specific package,
but no profile is produced.  I believe that means I need to re-build
all of R with the -pg flag, and I'm a bit reluctant to break
everything by doing that.

pj

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas

_______________________________________________
R-SIG-Debian mailing list
R-SIG-Debian@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-debian

Reply via email to