Return Program Counter

Return Program Counter

Hi,I want to read thereturn program counter in the current activation record for indentifying dynamic parent of a call. I am working on an Intel Xeon processor. Can anybody tell me how can I achieve this?Does there exist a performance monitoring even which gives the value of the program counter?Thanks

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

Hello gokussj9,
Let'ssee if I understand your question correctly.
You want to see where the hot spots are in your software and you'd like to be able to do call stack analysis (to see the list of 'who is calling who').
Usually we use the Intel VTune Amplifier XE tool to see what a program is doing.
You can get a free trial at http://software.intel.com/en-us/articles/intel-vtune-amplifier-xe/

Amplifier has a 'statistical' call graph feature which records the call stack every so often and then builds an average call graph. Statistical call graph is faster than tracking every call but is not as accurate.

I'm not sure if Amplifier call graph feature works on linux at the moment. I have a question in to the Amplifier folks.

Linux has Oprofile utility, gprof, the 'perf' utility which can all do call graphs with varying degrees of effectiveness.

Hope this helps.
Pat

Hello gokussj9,

Intel VTune Amplifier XE for Linux supports statistical call-graphs. The analysis type is called "hotspots analysis". With the latestfew updates, it isalso possible under Linux, to attach to a running process.Fordetailed questions, the VTune Amplifier forum is usually a good place.

Concerning your question about PMU events, you might want to look into the Last Branch Record (LBR). For Nehalem architecture, which is used in current Intel Xeon processors, there is a description available on page 30 in thePerformance Analysis Guide for Intel Core i7 Processor and Intel Xeon 5500 processors.

Kind regards
Thomas

Leave a Comment

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