Re: [PATCH V2 4/6] perf,tools: save misc sample read value in struct perf_sample
From: Jiri Olsa
Date: Sun Jul 26 2015 - 12:32:04 EST
On Fri, Jul 24, 2015 at 09:48:30AM -0400, kan.liang@xxxxxxxxx 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.. why not do this also
within iter_prepare_normal_entry as for the rest of the calculations
I suggested in my other email
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/