GetModuleFileNameA, threads and Intel Parallel Amplifier

The top of the call stack for a new thread always appears as GetModuleFileNameA.   When you start up a new thread and give it a function to begin execution at, the call stack shows the function being called from GetModuleFileNameA. This display will appear for any Parallel Amplifier analysis – hotspot analysis (including call tree), concurrency and locks&waits. This is an artifact of the call sequence of starting the thread and beginning at the designated function  - GetModuleFileNameA was a last call in kernel32.dll module, when you created a new thread. So when you are examining data in Parallel Amplifier you may examine a function and follow up its call stack and see that it is called by GetModuleFileNameA – when this happens, it is likely an indication of the beginning point for a new thread.  If you see a lot of time associated to GetModuleFileNameA and wonder why this API is consuming so much time, look again. You should see that the self-time is very small . The actual time is in its descendents. This again indicates that GetModuleFileNameA appears at the top of the call stack when a new thread begins. In summary – GetModuleFileNameA does not always means the beginning of a new thread, but the beginning of a new thread always shows up as GetModuleFileNameA.

Benefits :   Understanding this will help you better understand Intel Parallel Amplifier results.

Для получения подробной информации о возможностях оптимизации компилятора обратитесь к нашему Уведомлению об оптимизации.