Dmesg output: Performance Events: PEBS fmt1+, SandyBridge events, Intel PMU driver. PAX: PMU arbitration service v1.0.1 has been started. sep3_10: PMU collection driver v3.10.3 (EMON INTERNAL) has been loaded. sep3_10: IDT vector 0x40 will be used for handling PMU interrupts. clearing PMU state on CPU#15 clearing PMU state on CPU#8
syst_count output: same like: CPU0 G0 8,886,925 8,886,925 unhalted_core_cycles (scaling 0.00%, ena=1,000,291,924, run=1,000,291,924) CPU0 G0 0 0 unhalted_reference_cycles (scaling 0.00%, ena=1,000,291,924, run=1,000,291,924) # 1s ----- CPU1 G0 2,955,018 2,955,018 unhalted_core_cycles (scaling 0.00%, ena=1,000,319,397, run=1,000,319,397) CPU1 G0 0 0 unhalted_reference_cycles (scaling 0.00%, ena=1,000,319,397, run=1,000,319,397) # 1s ----- CPU2 G0 162,771 162,771 unhalted_core_cycles (scaling 0.00%, ena=1,000,317,563, run=1,000,317,563) CPU2 G0 0 0 unhalted_reference_cycles (scaling 0.00%, ena=1,000,317,563, run=1,000,317,563) # 1s ----- CPU3 G0 318,645 318,645 unhalted_core_cycles (scaling 0.00%, ena=1,000,314,571, run=1,000,314,571) CPU3 G0 0 0 unhalted_reference_cycles (scaling 0.00%, ena=1,000,314,571, run=1,000,314,571) # 1s ----- CPU4 G0 160,486 160,486 unhalted_core_cycles (scaling 0.00%, ena=1,000,312,981, run=1,000,312,981) CPU4 G0 0 0 unhalted_reference_cycles (scaling 0.00%, ena=1,000,312,981, run=1,000,312,981) # 1s ----- CPU5 G0 448,774 448,774 unhalted_core_cycles (scaling 0.00%, ena=1,000,311,395, run=1,000,311,395) CPU5 G0 0 0 unhalted_reference_cycles (scaling 0.00%, ena=1,000,311,395, run=1,000,311,395) # 1s ----- CPU6 G0 149,396 149,396 unhalted_core_cycles (scaling 0.00%, ena=1,000,307,538, run=1,000,307,538) CPU6 G0 0 0 unhalted_reference_cycles (scaling 0.00%, ena=1,000,307,538, run=1,000,307,538) # 1s ----- CPU7 G0 417,315 417,315 unhalted_core_cycles (scaling 0.00%, ena=1,000,303,946, run=1,000,303,946) CPU7 G0 0 0 unhalted_reference_cycles (scaling 0.00%, ena=1,000,303,946, run=1,000,303,946) # 1s ----- CPU8 G0 720,604 720,604 unhalted_core_cycles (scaling 0.00%, ena=1,000,270,014, run=1,000,270,014) CPU8 G0 0 0 unhalted_reference_cycles (scaling 0.00%, ena=1,000,270,014, run=1,000,270,014) # 1s ----- CPU9 G0 1,556,507 1,556,507 unhalted_core_cycles (scaling 0.00%, ena=1,000,266,053, run=1,000,266,053) CPU9 G0 0 0 unhalted_reference_cycles (scaling 0.00%, ena=1,000,266,053, run=1,000,266,053) # 1s ----- CPU10 G0 14,548,713 14,548,713 unhalted_core_cycles (scaling 0.00%, ena=1,000,266,471, run=1,000,266,471) CPU10 G0 0 0 unhalted_reference_cycles (scaling 0.00%, ena=1,000,266,471, run=1,000,266,471) # 1s ----- CPU11 G0 158,015 158,015 unhalted_core_cycles (scaling 0.00%, ena=1,000,261,804, run=1,000,261,804) CPU11 G0 0 0 unhalted_reference_cycles (scaling 0.00%, ena=1,000,261,804, run=1,000,261,804) -----Original Message----- From: Stephane Eranian [mailto:eran...@googlemail.com] Sent: Thursday, December 4, 2014 9:48 AM To: Sun, Yongjie Cc: perfmon2-devel@lists.sourceforge.net Subject: Re: [perfmon2] perfmon2 CPU_CLK_UNHALTED:REF_P count error hi On Thu, Dec 4, 2014 at 2:46 AM, Sun, Yongjie <yongjie....@intel.com> wrote: > > I have tried many os like Ubuntu, centos.. > Kernel versio is: both are the same result 3.5.0-49-generic > 2.6.32-358.el6.x86_64 > Send me the output of: sudo LIBPFM_VERBOSE=1 ./syst_count -e unhalted_core_cycles,unhalted_ref_cycles -p -d10 Also the output of: dmesg | fgrep PMU > -----Original Message----- > From: Stephane Eranian [mailto:eran...@googlemail.com] > Sent: Thursday, December 4, 2014 9:44 AM > To: Sun, Yongjie > Cc: perfmon2-devel@lists.sourceforge.net > Subject: Re: [perfmon2] perfmon2 CPU_CLK_UNHALTED:REF_P count error > > Hi, > > On Thu, Dec 4, 2014 at 2:39 AM, Sun, Yongjie <yongjie....@intel.com> wrote: >> Current the issue is: the CPU_CLK_UNHALTED:REF_P couted value is too small >> than CPU_CLK_UNHALTED:THREAD_P. is it right? From my understanding, it >> should be almost same. It is none of the workload business. >> > Which kernel is this running on? > UNHALTED_REF_CYCLES can only be measured on a fixed counter. So need kernel > support for this. > > >> -----Original Message----- >> From: Stephane Eranian [mailto:eran...@googlemail.com] >> Sent: Thursday, December 4, 2014 9:35 AM >> To: Sun, Yongjie >> Cc: perfmon2-devel@lists.sourceforge.net >> Subject: Re: [perfmon2] perfmon2 CPU_CLK_UNHALTED:REF_P count error >> >> Hi, >> >> On Thu, Dec 4, 2014 at 2:31 AM, Sun, Yongjie <yongjie....@intel.com> wrote: >>> I try use the syst_count: >>> Result is same >>> >>> CPU0 G0 7,188,625 7,188,625 UNHALTED_CORE_CYCLES >>> (scaling 0.00%, ena=1,999,298,896, run=1,999,298,896) >>> CPU0 G0 3 3 >>> UNHALTED_REFERENCE_CYCLES (scaling 0.00%, ena=1,999,336,546, >>> run=1,999,336,546) >>> CPU0 G0 7,303,052 7,303,052 >>> CPU_CLK_UNHALTED:THREAD_P (scaling 0.00%, ena=1,999,348,997, >>> run=1,999,348,997) >>> CPU0 G0 545,254 545,254 CPU_CLK_UNHALTED:REF_P >>> (scaling 0.00%, ena=1,999,364,938, run=1,999,364,938) >>> >> But what is your workload doing and on which CPU does it run. >> Here it needs to run on CPU0. If you workload blocks and there is nothing >> else to run on CPU0, the processor goes in halted state, and the events you >> are measuring stop counting. >> >>> -----Original Message----- >>> From: Stephane Eranian [mailto:eran...@googlemail.com] >>> Sent: Thursday, December 4, 2014 9:25 AM >>> To: Sun, Yongjie >>> Cc: perfmon2-devel@lists.sourceforge.net >>> Subject: Re: [perfmon2] perfmon2 CPU_CLK_UNHALTED:REF_P count error >>> >>> Hi, >>> >>> These Python scripts are all not maintained. >>> I suggest you use the perf_examples/syst_count program instead. >>> And you need to be root to run per-CPU (system-wide) measurments. >>> >>> >>> On Thu, Dec 4, 2014 at 1:34 AM, Sun, Yongjie <yongjie....@intel.com> wrote: >>>> Hi, >>>> I running on Intel SNB E5-2680 >>>> >>>> I just used the "libpfm-4.5.0/python/sys.py" >>>> ./sys.py -e >>>> UNHALTED_CORE_CYCLES,UNHALTED_REFERENCE_CYCLES,CPU_CLK_UNHALTED:THR >>>> E >>>> A >>>> D >>>> _P,CPU_CLK_UNHALTED:REF_P -c 0 >>>> Result: >>>> CPU0: UNHALTED_CORE_CYCLES 3229292 >>>> CPU0: UNHALTED_REFERENCE_CYCLES 3 >>>> CPU0: CPU_CLK_UNHALTED:THREAD_P 3266550 >>>> CPU0: CPU_CLK_UNHALTED:REF_P 268798 >>>> CPU0: UNHALTED_CORE_CYCLES 6834444 >>>> CPU0: UNHALTED_REFERENCE_CYCLES 3 >>>> CPU0: CPU_CLK_UNHALTED:THREAD_P 6897896 >>>> CPU0: CPU_CLK_UNHALTED:REF_P 568677 >>>> CPU0: UNHALTED_CORE_CYCLES 10782920 >>>> CPU0: UNHALTED_REFERENCE_CYCLES 3 >>>> CPU0: CPU_CLK_UNHALTED:THREAD_P 10876957 >>>> CPU0: CPU_CLK_UNHALTED:REF_P 897739 >>>> -----Original Message----- >>>> From: Stephane Eranian [mailto:eran...@googlemail.com] >>>> Sent: Wednesday, December 3, 2014 12:33 AM >>>> To: Sun, Yongjie >>>> Cc: perfmon2-devel@lists.sourceforge.net >>>> Subject: Re: [perfmon2] perfmon2 CPU_CLK_UNHALTED:REF_P count error >>>> >>>> Hi, >>>> >>>> On Mon, Dec 1, 2014 at 6:24 AM, Sun, Yongjie <yongjie....@intel.com> wrote: >>>>> Hi, all >>>>> I use the perfmon2 to count events >>>>> “UNHALTED_CORE_CYCLES,UNHALTED_REFERENCE_CYCLES,CPU_CLK_UNHALTED:THREAD_P,CPU_CLK_UNHALTED:REF_P” >>>>> and got >>>> >>>> which CPU is this running on? >>>> How long does your test run? >>>> Are you running in system-wide or per-process mode? >>>> Need more context to answer your question. >>>> >>>>> CPU0: UNHALTED_CORE_CYCLES 5538707 >>>>> CPU0: UNHALTED_REFERENCE_CYCLES 3 >>>>> CPU0: CPU_CLK_UNHALTED:THREAD_P 5641229 >>>>> CPU0: CPU_CLK_UNHALTED:REF_P 419607 >>>>> CPU0: UNHALTED_CORE_CYCLES 11661876 >>>>> CPU0: UNHALTED_REFERENCE_CYCLES 3 >>>>> CPU0: CPU_CLK_UNHALTED:THREAD_P 11813664 >>>>> CPU0: CPU_CLK_UNHALTED:REF_P 911248 >>>>> CPU0: UNHALTED_CORE_CYCLES 15682069 >>>>> CPU0: UNHALTED_REFERENCE_CYCLES 3 >>>>> CPU0: CPU_CLK_UNHALTED:THREAD_P 15869779 >>>>> CPU0: CPU_CLK_UNHALTED:REF_P 1246315 >>>>> >>>>> Two questions: 1. why UNHALTED_REFERENCE_CYCLES is 3? Too small >>>>> 2. why CPU0: CPU_CLK_UNHALTED:REF_P is much smaller >>>>> than CPU_CLK_UNHALTED:THREAD_P? this do not make sence! >>>>> >>>>> BTW: I count this for I want to count the CPU Frequency from Intel’s DOC: >>>>> https://software.intel.com/en-us/articles/measuring-the-average-un >>>>> h >>>>> a >>>>> l >>>>> t >>>>> ed-frequency >>>>> Average frequency = >>>>> TSC_frequency * (CPU_CLK_UNHALTED.THREAD / CPU_CLK_UNHALTED.REF) >>>>> >>>>> So can anybody help on this question? >>>>> >>>>> >>>>> ------------------------------------------------------------------ >>>>> - >>>>> - >>>>> - >>>>> - >>>>> -------- Download BIRT iHub F-Type - The Free Enterprise-Grade >>>>> BIRT Server from Actuate! Instantly Supercharge Your Business >>>>> Reports and Dashboards with Interactivity, Sharing, Native Excel >>>>> Exports, App Integration & more Get technology previously reserved >>>>> for billion-dollar corporations, FREE >>>>> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg. >>>>> clktrk _______________________________________________ >>>>> perfmon2-devel mailing list >>>>> perfmon2-devel@lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/perfmon2-devel >>>>> ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel