Re: Shark attributing time oddly to source
Re: Shark attributing time oddly to source
- Subject: Re: Shark attributing time oddly to source
- From: Rick Altherr <email@hidden>
- Date: Mon, 13 Apr 2009 17:29:05 -0700
On Apr 13, 2009, at 5:13 PM, Benson Margulies wrote:
This is compiled with plain old -O with the stock g++ 4.1 from the
tools. Note that all the time is dumped into the return statement.
253 BT_ApeParameterValue
BT_ApeOrderedOrthographicFeatureEvaluator
::parameterSum(BT_ApeDecodeState
const& decodeState, BT_UInt32 tokenIndex, BT_UInt32, BT_UInt32 tag)
const
254 {
255 BT_ApeDecodeStatePerToken const& perToken =
decodeState.perToken()[tokenIndex];
2 256 for (BT_UInt32 fx = 0; fx <= Other; fx ++) {
257 bool thisEval =
perToken.nonWordFeatureCache[m_cacheIndexMap[fx]];
258 if (thisEval) {
259 BT_ApeParameterValue param = m_parameters.get(fx,
tag);
260 #ifdef DEBUG
261 BT_LOG4(BT_Log::INFO_CHANNEL, "OFE: tx %d tag %d fx
%d param %g\n", (int)tokenIndex, (int)tag, (int)fx, param);
262 #endif
446 263 return param;
264 }
265 }
266 return 0;
165 267 }
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
@apple.com
This email sent to email@hidden
A few possibilities:
- This function is called _very_ frequently but isn't inlined. Thus,
the time spent on the return is actually time spent in the epilog of
the function. You options are to reduce the number of calls to the
function or to inline it.
- The function runs very quickly but is also called frequently. In
this case, Nyquist might require a faster sampling rate. The default
is 1ms, but 100us is still reasonable. If the profile changes when
using 100us, you were seeing aliasing.
--
Rick Altherr
Performance Tools
Development Technologies
email@hidden
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden