On Tue, 2009-08-11 at 21:40 +0200, stephane eranian wrote:

> > You seem to have forgotten to append your test.c though :-)
> >
> Can't send you the program because it uses extra bits and pieces
> which are hard to remove. Otherwise I would have send it already.

Those other bits aren't open source? tskk :-)

> But I think it boils down to the following piece of code in
> perf_counter_output():
>                 leader = counter->group_leader;
>                 list_for_each_entry(sub, &leader->sibling_list, list_entry) {
>                         if (sub != counter)
>                                 sub->pmu->read(sub);
> 
>                         group_entry.id = primary_counter_id(sub);
>                         group_entry.counter = atomic64_read(&sub->count);
> 
>                         perf_output_put(&handle, group_entry);
>                 }

Well, likely, but nothing obviously wrong stands out there, so now I get
to write a reproduces to see what's going wrong.

> >> Related to PERF_SAMPLE_GROUP, I believe there is some information missing.
> >> You need to provide the TIMING information because in the case of 
> >> SAMPLE_GROUP
> >> you'd like to be able to scale the values of the counters you are
> >> collecting. And you
> >> need the timing at the moment, the sample was recorded not later.
> >
> > Right, so something like the below, possibly complemented with having
> > PERF_COUNTER_IOC_RESET also reset the run-times?
> >
> Yes, but don't you have a namespace issue between PERF_FORMAT_* and
> PERF_SAMPLE_* in the patch below? I would think you want to keep them 
> separate.

Maybe, otoh we've consistently used it whenever exposing the timing
data.

> I am also wondering about why one would want one timing value and not the 
> other.
> In other words, why not group them under a single name. But maybe it is harder
> to return more than one u64 per PERF_FORMAT?

Not really, Paul did it like that initially and we've been consistently
doing it like that -- changing it now is a bit late.



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to