Robert,

On Fri, Apr 4, 2008 at 3:57 PM, Robert Richter <[EMAIL PROTECTED]> wrote:
> On 04.04.08 11:17:35, stephane eranian wrote:
>  > Yes, I do. No need to expose fields the user cannot influence on input.
>
>  I will rework this section.
>
Ok, thanks.


  > The rule of libpfm is that PMD related to events (hosted in counting PMD)
>  > are ALWAYS put first in pfp_pmds[] AND in the order the events where
>  > specified. Here is an example:
>  >
>  >    I want to measure events A, B. If event A is measured by PMD3 and B
>  > by PMD1, then
>  >    pfp_pmd[0].reg_num = 3
>  >    pfp_pmd[1].reg_num = 1
>  >
>  > After those PMDs, there can be more PMDs but there is no order
>  > guarantee. Those PMDs
>  > are related to extended features which use PMDs. The values return by
>  > libpfm for those
>  > are mostly informational. It is expected that programs using extended
>  > features KNOW
>  > which PMD to use and know how to decode their content.
>
>  The issue becomes visible in setup_pmu_ibsop() of smpl_amd64_ibs.c.
>  After calling the dispatch function I want to enable sampling for IBS.
>
>  pd[0].reg_flags = PFM_REGFL_OVFL_NOTIFY;
>  ...
>  pd[0].reg_smpl_pmds[0] = ...
>  ...
>
>  For this I have to know which register of outp.pfp_pmds is for
>  IBS. When using only IBS, this is always the first register. But it is
>  not necessarily known, if counter or other features of the PMU are
>  used. The programm does not know the index of the register and thus,
>  it may only use the base registers.
>
>  Alternately one could implement a search routine that scans
>  reg_num for the IbsOpCtl register, but this may also change e.g. on a
>  CPU with more counters. So I see now other way than the library has to
>  tell the index.
>
Ok, now I understand your problem. We need the library to pass back the index
of the ibsopctl, ibsfetchctl register in pfp_pmds[]. For that you can define
a model-specific output_param for AMD64. We define such structure on Itanium
where we need to pass debug register values. Look at
include/perfmon/pfmlib_itanium2.h.
The model-specific param is passed to pfm_dispatch_events(). Just add
2 fields in
there to report the indexes of the two PMDs of interest.

How does that sound?

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
perfmon2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to