From: <rk...@nc...> - 2004-03-30 21:23:29
|
Kshitiz, For some reason, SourceForge mailing lists didn't send me a copy of this email but I see that it made it on the archives, so here's an answer to your post: You were looking in the right place for sample configuration files to customize the hardware performance measurement, but it's not required that you specify those exact files to get non-default behavior. The "recipe" for doing profiling versus the default counting is to: 1. Use a configuration file with the XML root document type as <ps_hwpc_profile>. This document should specify one event only, the event to be used for sampling. Here's an example: <?xml version="1.0" encoding="UTF-8" ?> <ps_hwpc_profile class="PAPI"> <ps_hwpc_event type="preset" name="PAPI_L2_TCM" threshold="100000"/> </ps_hwpc_profile> Here, the event used is PAPI_L2_TCM, sampled at a frequency of 100,000 events. There isn't an exact frequency I can think of to recommend for arbitrary events, although if you sample based on total cycles choosing an equivalent to 10 ms should approximate what "gprof" does. 2. Make sure your application is compiled with symbols retained by using the "-g" option to the compiler. 3. Run psrun with the option "-c FILE", where FILE is replaced by the name of the alternate config file. The XML output should be a container with the total samples taken for each program address. These will usually be a lot larger than the counting equivalent. 4. Run psprocess with the option "-e EXE", with EXE being the name of your executable. This uses binutils to map program addresses to source code lines. By default, you should get a breakdown by module (executable and shared libraries), file, function, and line. Hope this helps, let me know if you still have problems. Rick > Hi! > > I was trying to get function-wise statistical profile data by using > perfsuite. The xml configuration for profiling was not found where > indicated in the online perfsuite presentation. > Other places I looked were in perfsuite/share/perfsuite/xml/pshwpc where > there were a lot of configs. I tried psrun with most of them, but the data > generated by psrun didn't have function wise information. > I am using perfsuite with PAPI3 on a Xeon machine running Linux 2.4, and I > used -q while compiling with g++ to retain symbol information in the > object files. > > Which configuration file should I be using? > > Thanks! > -Kshitiz > > > http://www.crhc.uiuc.edu/~kmalik |