Here is the result on my IVB laptop:

I run some cycle burning workload on CPU0:

$ taskset -c 0 noploop &
$ sudo syst_count -e unhalted_reference_cycles,unhalted_core_cycles -p
-d 10 -c 0
<press CTRL-C to quit before 10s time limit>
# 1s -----
CPU0   G0         2 594 304 518        2 594 304 518
unhalted_reference_cycles (scaling 0,00%, ena=1 000 736 581, run=1 000
736 581)
CPU0   G0         2 594 304 951        2 594 304 951
unhalted_core_cycles (scaling 0,00%, ena=1 000 736 581, run=1 000 736
581)
# 2s -----
CPU0   G0         5 188 602 874        2 594 298 356
unhalted_reference_cycles (scaling 0,00%, ena=2 001 469 769, run=2 001
469 769)
CPU0   G0         5 188 604 369        2 594 299 418
unhalted_core_cycles (scaling 0,00%, ena=2 001 469 769, run=2 001 469
769)

As you can see, we are in the billions. Also this shows that my
core-i5 does not have Turbo mode.
ref cycles = core cycles.



On Thu, Dec 4, 2014 at 3:16 AM, Sun, Yongjie <yongjie....@intel.com> wrote:
> Can you show me the result in your server? And your CPU?
>
> -----Original Message-----
> From: Stephane Eranian [mailto:eran...@googlemail.com]
> Sent: Thursday, December 4, 2014 10:12 AM
> To: Sun, Yongjie
> Cc: perfmon2-devel@lists.sourceforge.net
> Subject: Re: [perfmon2] perfmon2 CPU_CLK_UNHALTED:REF_P count error
>
> On Thu, Dec 4, 2014 at 3:09 AM, Sun, Yongjie <yongjie....@intel.com> wrote:
>> 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)
>
> I think both counts are too low. In 1s you got on 9 million cycles.....
> If the cpu is really busy it should be in the billions.
> So something is broken.
> Can you reboot your system AND NOT load the sep driver (VTUNE) and rerun the 
> test?
>
>> # 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:TH
>>>>>> R
>>>>>> 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-u
>>>>>>> n
>>>>>>> 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

Reply via email to