Hi. I have a shared library that I would like to profile. I see that this issue has been touched on in some previous posts, but I am still having trouble, and I am hoping someone here can help.

First things first... I am running R 2.8.0 patched on OS X 10.5.7, on a dual quad-core Mac Pro. It is the 64-bit binary build for Leopard, as downloaded from CRAN.

I am compiling my code using gcc-4.2, and I am including the -g -p -pg flags. Optimization is turned off (-O0). I AM able to debug the code using gdb (called as R -d gdb). I always run R from the command line.

I have tried profiling using Shark, which recognizes functions in libR.dylib, but none of the functions in mylib.so. For each function call, Shark refers to "Unknown Library", and after the function address, there is an indicator of [unknown]. Also, when I use Shark, it appears to want to profile the entire R session. All I care about is my library.

I am also open to using gprof instead, but I cannot find the requisite gmon.out file.

Thanks in advance for any suggestions.

Michael



-------------------------------------------
Michael Braun
Homer A. Burnell Career Development Professor, and
        Assistant Professor of Management Science (Marketing Group)
MIT Sloan School of Management
One Amherst St., E40-169
Cambridge, MA 02142
bra...@mit.edu
617-253-3436

_______________________________________________
R-SIG-Mac mailing list
R-SIG-Mac@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Reply via email to