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

-----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:THRE
>>> 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-unh
>>>> 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