From: Rui L. <ru...@nc...> - 2011-01-28 19:23:52
|
Hi wkq, Thanks for updating us on your progress, and glad to know that it works for you! Regarding getting counter values periodically, "psrun" does not support this feature. There might be other tools that support this, but I'm not aware of a currently maintained one. Using a combination of available features -- PerfSuite's libpshwpc API, interval timer and signal handler -- it could be possible to achieve that, but it involves changes to a user's source code, and might not work for a threaded program. An example is in the PerfSuite installation directory, under "share/perfsuite/examples/sampler/". Please be aware that this is unsupported and you are on your own to go this direction. Thanks, Rui On 01/28/2011 05:25 AM, 吴名 wrote: > Oh, thanks. solved. > Does perfsuite support sampling with specified interval ? Since I want > to get performance counter data every n seconds. > Until now, I can't find the option for psrun to do this job. > > Thanks. > > wkq > > > 2011/1/28 Rui Liu <ru...@nc...>: >> Hi wkq, >> >> Thanks for updating us on your progress and glad to know that "psrun" works >> for you now with the customized configuration file! >> >>> But when I run psprocess *.xml, >>> it prints: >>> exec: 83: -classpath: not found >> This usually happens when a user did not use the "--enable-java" option when >> running "configure". By default, "psprocess" now uses a Java >> implementation, so this message will show up in such situation. There are 2 >> solutions: >> >> 1) The recommended solution. If you have Java of version 1.5 or higher >> installed, then run "configure ...", "make" and "make install" again, and >> add "--enable-java" when you run "configure". Then "psprocess" should work. >> 2) If Tcl is installed on your machine, then you can use the Tcl >> implementation of psprocess, by doing "psprocess --tcl ...". We plan to >> keep on supporting the Java implementation and not the Tcl one, so this is >> not the recommended solution. >> >> >>> ... but you can see 8406186437 - 8400025761 = 6160676, (still a >>> big number), Which one is more strict?? or they are same, the error is >>> allowable ? >> Although the magnitude of the difference might seem large, the percentage is >> small: 6160676 / 8406186437 ~= 0.07%, so it could be ignorable. There are >> many factors that could affect the final values of the hardware performance >> counters. An email to the PAPI mailing list that John McCalpin posted on >> 2009-10-22 was a good and detailed overview of some tips and pitfalls for >> using hardware performance counters. It's at: >> >> http://lists.eecs.utk.edu/pipermail/ptools-perfapi/2009-October/001386.html >> >> Thanks, >> Rui >> >> >> On 01/27/2011 06:43 AM, 吴名 wrote: >>> Of course, I can use text output format, but why xml is not ok. >>> >>> Besides, if I use PERF_COUNT_HW_INSTRUCTIONS, "sys_perf_event_open: >>> sys call function, >>> >>> for this part >>> void cpu() >>> { >>> unsigned int i = 1; >>> int a = 1, b = 2; >>> while(i++ < 1200000000) >>> { >>> a = a + b; >>> } >>> } >>> >>> my prints 8406186437, and every time is different. may 8396328126, ... >>> While psrun with PAPI_TOT_INS, 8400025761, (every time is dfferent >>> too), but you can see 8406186437 - 8400025761 = 6160676, (still a >>> big number), Which one is more strict?? or they are same, the error is >>> allowable ? >>> >>> Thanks a lot. >>> >>> wkq >>> >>> >> -------- Original Message -------- >> Subject: Re: Hardware event not available ?? >> Date: Thu, 27 Jan 2011 17:52:08 +0800 >> From: 吴名 <wk...@gm...> >> To: Rui Liu <ru...@nc...> >> References: <AAN...@ma...> >> <4D4...@nc...> >> >> Thank you for you quick reply. Yes, psrun can work now. I can only viem >> But when I run psprocess *.xml, >> >> it prints: >> exec: 83: -classpath: not found >> >> seems I don't have proper environment path. expat problem ? But >> configuration shows no problem. >> configure: configuring Expat support >> checking expat.h usability... yes >> checking expat.h presence... yes >> checking for expat.h... yes >> checking for XML_ParserCreate in -lexpat... yes >> >> >> wkq >> >>> 2011/1/27 Rui Liu <ru...@nc...>: >>>> Hi wkq, >>>> >>>> Thanks for contacting me! And sorry for your previous mails not getting >>>> through. >>>> >>>> Yes, PerfSuite should work on Intel Xeon. What you are seeing is because >>>> some events in the default PerfSuite pshwc configuration file are not >>>> available on that CPU. One solution is to define a configuration file to >>>> use with "psrun": >>>> >>>> 1) create a file, for example, "events.xml", with the following content: >>>> >>>> <?xml version="1.0" encoding="UTF-8" ?> >>>> <ps_hwpc_eventlist class="PAPI"> >>>> <ps_hwpc_event type="preset" name="PAPI_TOT_CYC" /> >>>> </ps_hwpc_eventlist> >>>> >>>> 2) Start "psrun" using this configuration file: >>>> psrun -c <absolute_or_relative_path_to_"events.xml"> <your_program> >>>> then it should work and generate an XML file, and you can use "psprocess >>>> <generated_xml_file_name>" to view the processed output. >>>> >>>> After this works, you can customize the file "events.xml" to count the >>>> events that interest you. For example, if you want to count the total >>>> number of instructions and L2 total cache miss, and "papi_avail" output >>>> shows that PAPI_TOT_INS and PAPI_L2_TCM are available on your CPU, then >>>> you >>>> can change "events.xml" to contain: >>>> >>>> <?xml version="1.0" encoding="UTF-8" ?> >>>> <ps_hwpc_eventlist class="PAPI"> >>>> <ps_hwpc_event type="preset" name="PAPI_TOT_INS" /> >>>> <ps_hwpc_event type="preset" name="PAPI_L2_TCM" /> >>>> </ps_hwpc_eventlist> >>>> >>>> and use it with "psrun" by doing "psrun -c <path_to_"events.xml"> >>>> <your_program>". >>>> >>>> On the other hand, if you put in an event that is not available on your >>>> CPU >>>> in this file, and use it with "psrun", then psrun will stop with the >>>> error >>>> message "hardware event not available". That is what's happening in your >>>> case -- some events in the default configuration file are not available >>>> on >>>> your CPU. The default config file "psrun" uses can be found at the >>>> bottom >>>> of "psrun -h" output. >>>> >>>> Please let us know how it goes or if you have more questions. Good luck! >>>> >>>> Thanks, >>>> Rui >>>> >>>> On 01/26/2011 08:43 AM, 吴名 wrote: >>>>> Hi Mr Liu, >>>>> I tried to send you from 163.com, your reply in PAPI mail list, but >>>>> the ncsa always deny my mail, :( >>>>> So I try this gmail. >>>>> >>>>> I installed perfsuite, but the psrun won't work. (install is right) >>>>> (Hardware event not available) But PAPI can work. >>>>> I run examples hl, still the same problem, Does this suite support >>>>> intel xeon processor ? >>>>> >>>>> >>>>> I really looking forward to your reply. >>>>> The mail list about perfsuite still need some time to approve my >>>>> subscribe. So I send to you first. >>>>> Thanks. >>>>> >>>>> wkq >>>>> > |