From: Rick K. <rk...@nc...> - 2006-05-24 12:52:07
|
Ryszard, Thank you for the followup message, again good information from you. > I usually do the profiling job and the post-processing on the same machine > with the same set of environment variables, just one after another, so it > should work okay. OK, that's the safest way to do things. For some people this is not possible or convenient, so it's worth mentioning. > But I have other question about libraries. If our program is linked against > some libraries, and these libraries are linked against others, will psrun and > psprocess report these all libraries? I have asked this question, becasuse I > still see question marks even using less complicated examples than a full > simulation. psrun (actually, libpshwpc, which is what psrun uses) takes a snapshot of the entries in /proc/PID/maps to determine what libraries are currently loaded by the application. This snapshot occurs at the time a routine named ps_hwpc_init() is called, which (in the case of psrun) will be at the same time that an application enters the main() routine. Libraries that have not yet been loaded will not be present and will not have any samples taken within them accounted for. The output XML document lists all the modules that were accounted for even if they have had no samples taken within them, so that's one way to see what libraries were even under consideration (versus ignored completely). I don't recall if we mentioned this in this thread, but a while ago Tirath Ramdas reported a problem using psprocess on an x86 machine that manifested itself by inconsistent sample attributions showing up as a larger-than-expected number of unaccounted samples - i.e., question marks. Some testing indicated this is most likely due to failure in psprocess' BFD extension. As a workaround, a new environment variable was introduced in psprocess called PSPROCESS_MAPPER. This was in version 0.6.2a3 of PerfSuite. This variable can be set to the string "addr2line" and causes the binutils utility addr2line to be used rather than the internal PerfSuite BFD Tcl extension. Tirath reported more consistent results using this, and you might want to see if it makes any difference for you. This only has an effect on x86 machines, not Itanium. So in summary, you might want to a) examine a representative XML document to see if the libraries of interest are present in a <module> element, and b) try "export PSPROCESS_MAPPER=addr2line" before running psprocess to see if this improves results. In any case, I would be interested to learn of the outcome. Thanks again, Rick |