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?
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.
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.