I figure out the problem what the problem is.

I am not sure if I can consider it a bug on the syst.c or I was just
making wrong assumption about its output.

Anyway, I wrote a document explaining the problem and possibles solutions.

If it is actually a bug I can send my patch that samples the actual
scaled value related to the last sample instead of the value related
to the whole measurement set.

The document can be found here:

http://lampiao.lsc.ic.unicamp.br/~piga/misc/libpfmSystInformation.pdf



On Fri, Apr 27, 2012 at 12:51 AM, Leonardo Piga <leonardo.p...@gmail.com> wrote:
> Hello,
>
> I am using libpfm 4.2 to measure about 15 performance counters on a
> AMD Barcelona CPU. I am able to collect 5 performance counter without
> multiplexing.
>
> However, when multiplexing I am getting "negative" delta values using
> the syst from perf_examples.
>
> Here is an example:
>
> Sample n
> "core" : 0,
>        "name" : "perf::PERF_COUNT_HW_CPU_CYCLES",
>        "val"  : 131956093,
>        "raw"  : 62161538,
>        "ena"  : 1000618391,
>        "run"  : 471368743,
>        "ratio"  : 0.47,
>        "delta"  : 131956093
>
>
> Sample n+1
> "core" : 0,
>        "name" : "perf::PERF_COUNT_HW_CPU_CYCLES",
>        "val"  : 118435137,
>        "raw"  : 63447168,
>        "ena"  : 2002214687,
>        "run"  : 1072611170,
>        "ratio"  : 0.54,
>        "delta"  : 18446744073696030660
>
> As you can see Sample_n$val is greater than Sample_n+1$val that is why
> delta is so big (negative actually). (The raw value is growing
> though).
>
> So, I think that I am not doing the measurements in the best way.
>
> My questions are:
>
> 1)How  does libpfm do the multiplexation?
>
> 2) What is the best way to multiplex 15 performance counters in time
> window of 1 second? Is there any example available with the library to
> do this?
>
> 3) What is the purpose of group (-g option on syst tool)? Can it help
> on my issue?
>
> --
>
> Leonardo

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to