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?
Asked
Active
Viewed 1,787 times
0

Jacob
- 34,255
- 14
- 110
- 165
-
What's the call stack above this function? As Terry mentions, it's probably not *actually* this function. – Ana Betts Jan 15 '10 at 03:01
2 Answers
5
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
- 11,775
- 1
- 35
- 44
1
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
- 54,279
- 5
- 125
- 144
-
++ 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 Jan 14 '10 at 22:53