Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1193535 > unrolled thread

RE: [PATCH V2 4/6] perf,tools: save misc sample read value in struct perf_sample

Started by"Liang, Kan" <kan.liang@intel.com>
First post2015-07-28 00:30 +0200
Last post2015-07-28 00:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  RE: [PATCH V2 4/6] perf,tools: save misc sample read value in  struct perf_sample "Liang, Kan" <kan.liang@intel.com> - 2015-07-28 00:30 +0200

#1193535 — RE: [PATCH V2 4/6] perf,tools: save misc sample read value in struct perf_sample

From"Liang, Kan" <kan.liang@intel.com>
Date2015-07-28 00:30 +0200
SubjectRE: [PATCH V2 4/6] perf,tools: save misc sample read value in struct perf_sample
Message-ID<pQZ4d-6Z4-13@gated-at.bofh.it>

> -----Original Message-----
> From: Jiri Olsa [mailto:jolsa@redhat.com]
> Sent: Sunday, July 26, 2015 12:32 PM
> To: Liang, Kan
> Cc: a.p.zijlstra@chello.nl; acme@kernel.org; luto@kernel.org;
> mingo@redhat.com; eranian@google.com; ak@linux.intel.com;
> mark.rutland@arm.com; Hunter, Adrian; jolsa@kernel.org;
> namhyung@kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH V2 4/6] perf,tools: save misc sample read value in
> struct perf_sample
> 
> On Fri, Jul 24, 2015 at 09:48:30AM -0400, kan.liang@intel.com wrote:
> 
> SNIP
> 
> > +	u64 nr = 0;
> >
> >  	if (sid) {
> >  		sample->id     = v->id;
> > @@ -1010,6 +1012,20 @@ static int deliver_sample_value(struct
> perf_evlist *evlist,
> >  		return 0;
> >  	}
> >
> > +	if (perf_evsel__is_group_leader(sid->evsel)) {
> > +		evsel = sid->evsel;
> > +		SET_FREQ_PERF_VALUE(evsel, sample->freq_perf_data,
> > +				    sample->read.group.values[nr].value);
> > +		evlist__for_each_continue(evlist, evsel) {
> > +			if ((evsel->leader != sid->evsel) ||
> > +			    (++nr >= sample->read.group.nr))
> > +				break;
> > +
> > +			SET_FREQ_PERF_VALUE(evsel, sample-
> >freq_perf_data,
> > +					    sample-
> >read.group.values[nr].value);
> 
> I think this should be in upper layer..

OK, I'll move it to deliver_sample_group.

> why not do this also within
> iter_prepare_normal_entry as for the rest of the calculations I suggested
> in my other email

Because we cannot get evlist in iter_add/prepare function. We cannot go
through all group members' value. 
It's too complex (need to change many interfaces) to pass the evlist to
iter_add/prepare function

Thanks,
Kan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web