Hi folks,

Ok, I have been testing perfmon/libpfm on a 24K box here (one measly
counter) and I see the same symptoms on this box that I do on the
i386/p6. Namely, unpredictable counts.

I have yet to be able to isolate the issue, but the fact that it shows
up on both boxes points to the HL code.

Some data, I've been testing with self and self_standalone. 

self_standalone measures FLOPS and it seems to always count twice as
many flops as actually exist in the code. I haven't found an errata in
the manual that indicates this counter is wrong: objdump says only 1
FLOP in the loop.

10000b08:       6463ffff        daddiu  v1,v1,-1
10000b0c:       1462fffe        bne     v1,v0,10000b08 <floploop+0x20>
10000b10:       46000000        add.s   $f0,$f0,$f0
10000b14:       8cc48034        lw      a0,-32716(a2)

And below, variance for flops...

PMD0               201381
[EMAIL PROTECTED] ~/SVN/perf/libpfm/trunk/examples $ ./a.out 100000
Measuring floating point instr. user mode: reg. 0 value 0x68
inf
PMD0               201375
[EMAIL PROTECTED] ~/SVN/perf/libpfm/trunk/examples $ ./a.out 100000
Measuring floating point instr. user mode: reg. 0 value 0x68
inf
PMD0               243558
[EMAIL PROTECTED] ~/SVN/perf/libpfm/trunk/examples $ ./a.out 100000
Measuring floating point instr. user mode: reg. 0 value 0x68
inf
PMD0               240059
[EMAIL PROTECTED] ~/SVN/perf/libpfm/trunk/examples $ ./a.out 100000
Measuring floating point instr. user mode: reg. 0 value 0x68
inf
PMD0               201385

Now running self, variance again.

[EMAIL PROTECTED] ~/SVN/perf/libpfm/trunk/examples $ ./self
too many events provided (max=1 events), using first 1 event(s)
PMD0           2696283180 CYCLES
[EMAIL PROTECTED] ~/SVN/perf/libpfm/trunk/examples $ ./self
too many events provided (max=1 events), using first 1 event(s)
PMD0           2656029196 CYCLES
[EMAIL PROTECTED] ~/SVN/perf/libpfm/trunk/examples $ ./self
too many events provided (max=1 events), using first 1 event(s)
PMD0           3812744028 CYCLES

My hunch is that the context_switch routines are to blame...Why? Because
even with self_standalone, the numbers are off. In this case, the
interrupt handler never gets called because the counts are < 0x7fffffff.

So perhaps there are some mechanics missing to clear the counters
properly. I'm going to rebuild without modules to see if I can
look at the actual PMD values to see whats happening.

Lastly, repeated invocations of notify_standalone also killed the
kernel...I have not been able to yet get an oops.

Regards,

Phil




On Wed, 2006-07-26 at 11:25 +0200, Philip Mucci wrote:
> Hi again,
> 
> Ok, using the slightly modified self program to do create/load +
> 2*(start/read/stop) and recompiling the kernel without
> preemption, looks like there's still something funky going on. The
> numbers are way off.
> 
> [EMAIL PROTECTED] examples]$ ./self & ./self & ./self & ./self & 
> [1] 4077
> [2] 4078
> [3] 4079
> [4] 4080
> [EMAIL PROTECTED] examples]$ [perfsel0=0x510079 emask=0x79 umask=0x0
> os=0 usr=1 en=1 int=1 inv=0 edge=0 cnt_mask=0] CPU_CLK_UNHALTED
> [perfsel1=0x5100c0 emask=0xc0 umask=0x0 os=0 usr=1 en=1 int=1 inv=0
> edge=0 cnt_mask=0] INST_RETIRED
> [perfsel0=0x510079 emask=0x79 umask=0x0 os=0 usr=1 en=1 int=1 inv=0
> edge=0 cnt_mask=0] CPU_CLK_UNHALTED
> [perfsel1=0x5100c0 emask=0xc0 umask=0x0 os=0 usr=1 en=1 int=1 inv=0
> edge=0 cnt_mask=0] INST_RETIRED
> [perfsel0=0x510079 emask=0x79 umask=0x0 os=0 usr=1 en=1 int=1 inv=0
> edge=0 cnt_mask=0] CPU_CLK_UNHALTED
> [perfsel1=0x5100c0 emask=0xc0 umask=0x0 os=0 usr=1 en=1 int=1 inv=0
> edge=0 cnt_mask=0] INST_RETIRED
> [perfsel0=0x510079 emask=0x79 umask=0x0 os=0 usr=1 en=1 int=1 inv=0
> edge=0 cnt_mask=0] CPU_CLK_UNHALTED
> [perfsel1=0x5100c0 emask=0xc0 umask=0x0 os=0 usr=1 en=1 int=1 inv=0
> edge=0 cnt_mask=0] INST_RETIRED
> PMD0             70035305 CPU_CLK_UNHALTED
> PMD1             90000108 INST_RETIRED
> PMD0             70036312 CPU_CLK_UNHALTED
> PMD1             90000108 INST_RETIRED
> PMD0             66660667 CPU_CLK_UNHALTED
> PMD1             85660765 INST_RETIRED
> PMD0             64112794 CPU_CLK_UNHALTED
> PMD1             82390617 INST_RETIRED
> PMD0             68568825 CPU_CLK_UNHALTED
> PMD1             88116977 INST_RETIRED
> PMD0             75847005 CPU_CLK_UNHALTED
> PMD1             97467698 INST_RETIRED
> PMD0             67962462 CPU_CLK_UNHALTED
> PMD1             87337114 INST_RETIRED
> PMD0             97913443 CPU_CLK_UNHALTED
> PMD1            125815768 INST_RETIRED
> 

_______________________________________________
perfmon mailing list
[email protected]
http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/

Reply via email to