From: Ian j. <jon...@gm...> - 2009-08-07 05:34:50
|
> In the case given it was looking at clock cycles. The hardware can measure many > different events. For MIPS you would want to measure instructions retired event. > There are some older tutorials at http://people.redhat.com/wcohen for oprofile > that list events for instructions retired. MIPS is a computed value > (Instructions_retired/elapsed_seconds). >> hmm.... Sorry, I still can not get the exact idea to calculate the MIPS based on oprofile. From my understanding, I should a) first, get the counter number of event "Instructions_retired" by runing oprofile to get samle. b) calculate the total number of event "Instructions_retired" by total_events = count_per_sample * (sample_count/percentage) c) calculate the elapsed_seconds by counting the running cycle. Then, how to get the running cycle by orpfile? After that, I need to change it to seconds by HZ value, right? > You can read out the opreport data any time. The main reason for starting and > stopping OProfile was to limit the data collected to the experiment. PAPI and > perfmon run for somme duration and collect data only for that duration. If not > careful, OProfile will get samples from things other than the experiment (either > before or after). Maybe read through the following article to see how the > experiment was done: > > http://www.redhat.com/magazine/012oct05/features/oprofile/ > I am very appreciate that you given me so many useful document. However, I am still hard to get steps to follow after I read the oprofile document presented in http://oprofile.sourceforge.net/docs/. I tried to summary simple steps as follows: a) download the kernel 2.6.30 (which is used in my CentOS5.2 now) b) download the oprofile-0.9.5.tar.gz from sourceforge (it is fail) c) install the oprofile according to "get started" manual: because I can not download the tarball, the following steps is just assumption: * ./configure --with-kernel-support * make && make install d) set the event and start the oprofile # opcontrol --event=INSTR_RETIRED:400000 # opcontrol --vmlinux=/boot/2.6.30/vmlinux # opcontrol --start I am not sure the event type is right one. Maybe, you would fix me according to my hardware/system environment below. e) stop the oprofile and generate a report # opcontrol --reset (I am not sure whether this step is necessary) # opreport -l /path/to/myreport f) parse the report file and calculate the MIPS value what I need. > OProfile has been in the kernel for quite some time. The main questions are: > > Was the kernel was built with oprofile enabled? > Does the hardware support the interrupt mechanism for the performance counters? > Does oprofile recognize the performance monitoring hardware? (e.g. old versions > don't recognize Intel i7) > My machine is DELL 360 with the following cpu information # cat /proc/cpuinfo ... Intel(R) Pentium(R) Dual CPU E2200 @ 2.20GHz ... and CentOS 5.2 (64bit) with kenel 2.6.30 # uname -a Linux hdt1.hypercloud.ict 2.6.30-perfctr #1 SMP Tue Aug 4 19:51:41 CST 2009 x86_64 x86_64 x86_64 GNU/Linux I think it should support oprofile, right? Thanks, Ian |