views:

176

answers:

2

I'm profiling some computationally intensive code of mine, and was surprised to see that the function RtlpNtMakeTemporaryKey takes up a huge chunk of time. It's module is ntdll and the source file is Unknown. Is this a call which is waiting for my slow function to terminate or is it something which I can optimize?

+1  A: 

This sounds like an internal function in Windows since it is in ntdll.dll. You should look at the call stack that reaches this function to find out why it is being invoked so often.

Michael
++ Yes, and an easy way to do that is to pause it at random, as in: http://stackoverflow.com/questions/406760/whats-your-most-controversial-programming-opinion/1562802#1562802
Mike Dunlavey
+2  A: 

Are you sure you have symbols for ntdll? It's possible that you don't, and RtlpNtMakeTemporaryKey is just the closet exported symbol name that your debugger can see to the real function or functions that are taking up so much time.

But yeah, you should focus on your code and who/why you're calling into ntdll so much.

Terry Mahaffey