From pavel at stat.washington.edu  Wed Mar  2 08:08:03 2005
From: pavel at stat.washington.edu (Pavel N. Krivitsky)
Date: Wed Mar  2 08:04:55 2005
Subject: [Rd] Profiling C functions called from R.
In-Reply-To: <Pine.LNX.4.61.0502260757000.19634@gannet.stats>
References: <421FD69C.8000707@stat.washington.edu>
	<Pine.LNX.4.61.0502260757000.19634@gannet.stats>
Message-ID: <1109747283.24299.21.camel@Navi>

Hi,

Thank you for the reply. I think I've figured out the problem. In case
someone else might find this useful, the vanishing profile file turns
out to be the result of a semi-documented quirk (not in R). When using

LD_PROFILE=/$PATH_TO_LIB/$LIB_NAME.so R

the resulting $LIB_NAME.so.profile will be created
in /var/tmp/$PATH_TO_LIB/

_only_if_ /var/tmp/$PATH_TO_LIB/ already exists. If it doesn't, it'll
give an error message (that got buried in other output in my case) and
no profile will be created. If LD_PROFILE_OUTPUT is used to control
where the profile file goes:

export LD_PROFILE=/$PATH_TO_LIB/$LIB_NAME.so
export LD_PROFILE_OUPUT=/$PUT_PROFILE_HERE/
R
unset LD_PROFILE
unset LD_PROFILE_OUTPUT

then $LIB_NAME.so.profile will be created
in /$PUT_PROFILE_HERE/$PATH_TO_LIB/ again, only if the directory already
exists.

                             Thanks,
                             Pavel Krivitsky


[Rd] Profiling C functions called from R.
Pavel N. Krivitsky