[Openmp-commits] [PATCH] D14027: [OMPT] Windows Support for OMPT
Jonathan Peyton via Openmp-commits
openmp-commits at lists.llvm.org
Fri Oct 23 12:38:07 PDT 2015
jlpeyton created this revision.
jlpeyton added reviewers: omalyshe, jmellorcrummey.
jlpeyton added a subscriber: openmp-commits.
jlpeyton set the repository for this revision to rL LLVM.
The problem is that the ompt_tool() function (which must be implemented by a performance tool) should be defined in the RTL as well to cover the case when the tool is not present in the address space of the process. This functionality is accomplished with weak symbols in Unices. Unfortunately, Windows does not support weak symbols.
The solution in these changes is to grab the list of all modules loaded by the process and then search for symbol "ompt_tool()" within them. To avoid the case when ompt_tool() could be found in libomp.dll, a function with a different name is used -- ompt_aux_tool(). The right function is called by the pointer then.
While doing these changes, the OMPT_SUPPORT detection in CMake was changed to test for the required featuers for OMPT_SUPPORT, namely: __builtin_frame_address() existence, weak attribute existence and psapi.dll existence. For LIBOMP_HAVE_OMPT_SUPPORT to be true, it must be that the __builtin_frame_address() intrinsic exists
AND one of: either weak attributes exist or psapi.dll exists.
Also, since Process Status API is used I had to add new dependency -- psapi.dll to the library dependency micro test.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 7942 bytes
Desc: not available
More information about the Openmp-commits