Function Name from Callback

Function Name from Callback

  Intel OMPT Developers,

      I am using the OMPT interface to help me profile a math library. I have set up callbacks to get timing info for begin/end of parallel regions, threads,   and tasks. Is there a convenient, built-in way to determine the ASCII name of the function that a task or thread is working on? Thank you!

 

  Sincerely,

  Harry Hughes

Thread Topic: 

Question
4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Since this is a question about the OMPT standard, not the details of the implementation in the Open source intel runtime, you would be better asking in a more general place. I know that many of the folks who are on the OpenMP profiling sub-committee are working on the OMPT implementation in LLVM (which will be the same one as ultimately ends up here), and so will see questions asked on the openmp-dev@lists.llvm.org list, therefore that would be a good place to ask.

My immediate reaction, though, is that the answer will be "No, we don't know the function name".

Harry,

  as James has mentioned, there's no direct way (at least at the momento) to convert the addresses into ASCII names. However, one alternative might include using the binutils library [1] to convert the addresses into their routine. You can take the addr2line application as a reference to do the same process.

Best,

[1] http://www.gnu.org/software/binutils/

Quote:

Harald S. (Intel) wrote:

Harry,

  as James has mentioned, there's no direct way (at least at the momento) to convert the addresses into ASCII names. However, one alternative might include using the binutils library [1] to convert the addresses into their routine. You can take the addr2line application as a reference to do the same process.

Best,

[1] http://www.gnu.org/software/binutils/

I'm not the original poster, but I have the same problem as him. I am making a profiling tool that would benefit greatly from being able to map tasks to a location in the source code. Using addr2line on the outline function address, I can only find the source file, it does not successfully identify the line number. Do you have any idea how to resolve this?

Edit: Using gdb as such:

list *<func address>

where <func address> is the address given in the callback, I do get a line number out, but I'm not sure it is accurate.

Leave a Comment

Please sign in to add a comment. Not a member? Join today