Thank you very much for the tips, Martin and Duncan! Rprof and operf are
helping me a lot!!

Also, I am now in R-dev maillist and I see there seems to be more
appropriate to this kind of question.

Best,

Charles

On Wed, Dec 3, 2014 at 12:03 AM, Duncan Murdoch <murdoch.dun...@gmail.com>
wrote:

> On 02/12/2014, 4:43 PM, Charles Novaes de Santana wrote:
> > Dear all,
> >
> > I am running a c++ library (a .so file) from a R code. I am using the
> > function dyn.load("lib.so") to load the library. Do you know a way to
> > profile my C library from R? Or should I compile my C library as an
> > executable and profile it using the typical C-profilers?
> >
> > Thanks in advance for any help!
>
> If you want line-level profiling of your C++ code, you'll certainly need
> to use something that's not built in to R.  You can probably do it
> without recompiling your C++ code, just by profiling the R process.  But
> the details certainly depend on the profiler you choose to use.
>
> If you just want to know how much time is being spent in each C++
> function called from R, Rprof() should be able to tell you.  (It might
> give misleading information if your C++ code takes too long to execute,
> and some timer ticks get lost; I'm not sure if the underlying code takes
> account of that.)
>
> Duncan Murdoch
>



-- 
Um axé! :)

--
Charles Novaes de Santana, PhD
http://www.imedea.uib-csic.es/~charles

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to