Skip to content
Prev 6005 / 15075 Next

profiling C shared libraries loaded into R

On Jun 13, 2009, at 5:58 PM, Michael Braun wrote:

            
You didn't set -pg for link-time* which is the crucial one (adding -pg  
to compile flags is not strictly necessary unless you want to profile  
R itself).

Also you may want to tweak the flags (CFLAGS et al.) instead of the  
compilers since they have higher precedence (also you have a typo in  
CXX). [And why the DEFS?]

Always check the output when your library is actually compiled - you  
may find your flags being overridden by others.

Cheers,
Simon


* you can use LDFLAGS or LIBS but in this instance MAIN_LDFLAGS may be  
more interesting, but I didn't test it.