More...

pfm_pmu_support_t cell_support={
...
        .num_cnt                = PMU_CELL_NUM_COUNTERS,
...

#define PMU_CELL_NUM_COUNTERS   8 /* total number of EvtSel/EvtCtr */

This again seems to imply 8 counters (PMC/PMD pairs) for Cell.
The question is still why does pfm_cell_get_event_code hardcode this as 2,
and where is the limit of 4 32 bit counters defined/enforced?
- d

> -----Original Message-----
> From: Dan Terpstra [mailto:[EMAIL PROTECTED]
> Sent: Sunday, June 08, 2008 4:16 PM
> To: '[EMAIL PROTECTED]'; 'Carl Love'
> Cc: 'perfmon2-devel@lists.sourceforge.net'
> Subject: RE: [perfmon2] perfmon2 on Cell
> 
> Guys -
> I'm perfectly happy with 4 32-bit counters. Given the options, that's the
> trade-off I would have made as well. My confusion lies in the fact that
> pfm_num_counters is returning 8, and pfm_cell_get_event_code was erroring
> out after (hard-coded) 2. Carl, two nodes doesn't work for me, because
> each node is independent. A blade should report the same answer as a
> Playstation. Intel Core 2 Duos don't report 10 counters because they have
> 2 cores; just 5 counters because each core is programmed independently. I
> think the hard-coded 2 is a simple programming bug, but I sure would like
> some confirmation of that.
> - dan
> 
> > -----Original Message-----
> > From: stephane eranian [mailto:[EMAIL PROTECTED]
> > Sent: Friday, June 06, 2008 4:54 PM
> > To: Carl Love
> > Cc: Dan Terpstra; perfmon2-devel@lists.sourceforge.net
> > Subject: Re: [perfmon2] perfmon2 on Cell
> >
> > Hello,
> >
> >
> > On Fri, Jun 6, 2008 at 9:27 PM, Carl Love <[EMAIL PROTECTED]> wrote:
> > > Dan:
> > >
> > > Perfmon2 does not support variable sized counters.  It makes the
> > > assumption that counter size is a known, fixed size.  The
> implementation
> >
> > Adding support for variable size counters is on my list of things to do
> > soon.
> > By variable it will mean that not all counters will have to have the
> same
> > size
> > but that will be coded in the PMU description module. This is not going
> to
> > be totally dynamic, i.e., from one application to the other.
> >
> > > for cell was fixed to four 32 bit counters per node due to the lack of
> > > support for a variable size.  We did not choose to go with eight 16
> bit
> > > counters per node because the feeling was the overhead of having to
> > > invoke the interrupt handler on a 16 bit counter would be very high.
> > > Typically, a user will be measuring either cycles or instructions
> along
> > > with another event.  Causing an interrupt every 2^16 cycles would be
> > > very expensive.
> > >
> > > I would have to double code but does pfm_get_num_counters() return the
> > > total number of counters in a system?  On a cell system there are two
> > > nodes.  Each node has a performance counter unit with four 32 bit
> > > counters.
> > >
> > > Supporting both 16 and 32 bit counters gets very complicated.
> > > Specifically in the code for handling 64 bit virtual counters.  We
> > > talked about providing support at some future time but felt there were
> > > other higher priority things to do first.  Also, the perfmon2
> interface
> > > is already complex.  This is one of the reason it is has not gotten
> > > accepted into the kernel.  We felt adding variable sized counter
> support
> > > now would only add additional complexity that would further hinder
> > > getting it accepted.  So best to try and keep things simple for now,
> get
> > > it accepted then incrementally add the complexity later.
> > >
> > >            Carl Love
> > >
> > >
> > > On Fri, 2008-06-06 at 15:07 -0400, Dan Terpstra wrote:
> > >> I'm working on implementing PAPI on Cell.
> > >> And I'm confused.
> > >> Can someone tell me why pfm_get_num_counters() returns 8 for Cell (I
> > think
> > >> this is # of 16-bit counters?) when pfm_cell_get_event_code()
> compares
> > >> against a hard-coded limit of 2 (see below)? Could this limit simply
> > have
> > >> been inappropriately inherited from another platform?
> > >> Also, how does one distinguish between using these counters in 16-bit
> > mode
> > >> vs. 32-bit mode?
> > >> - d
> > >>
> > >> static int
> > >> pfm_cell_get_event_code(unsigned int i, unsigned int cnt, int *code)
> > >> {
> > >>       if (cnt != PFMLIB_CNT_FIRST && cnt > 2) {
> > >>               return PFMLIB_ERR_INVAL;
> > >>       }
> > >>
> > >>       *code = cell_pe[i].pme_code;
> > >>
> > >>       return PFMLIB_SUCCESS;
> > >> }
> > >>
> > >>
> > >> ---------------------------------------------------------------------
> --
> > --
> > >> Check out the new SourceForge.net Marketplace.
> > >> It's the best place to buy or sell services for
> > >> just about anything Open Source.
> > >> http://sourceforge.net/services/buy/index.php
> > >> _______________________________________________
> > >> perfmon2-devel mailing list
> > >> perfmon2-devel@lists.sourceforge.net
> > >> https://lists.sourceforge.net/lists/listinfo/perfmon2-devel
> > >
> > >
> > > ----------------------------------------------------------------------
> --
> > -
> > > Check out the new SourceForge.net Marketplace.
> > > It's the best place to buy or sell services for
> > > just about anything Open Source.
> > > http://sourceforge.net/services/buy/index.php
> > > _______________________________________________
> > > perfmon2-devel mailing list
> > > perfmon2-devel@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/perfmon2-devel
> > >


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to