Messages in this thread | | | Date | Wed, 14 Aug 2013 18:39:06 +0200 | From | Jiri Olsa <> | Subject | Re: [PATCH V11 13/15] perf tools: expand perf_event__synthesize_sample() |
| |
On Wed, Aug 14, 2013 at 03:48:35PM +0300, Adrian Hunter wrote:
SNIP
> index 81c170f..4c97f36 100644 > --- a/tools/perf/util/evsel.c > +++ b/tools/perf/util/evsel.c > @@ -1389,7 +1389,6 @@ int perf_evsel__parse_sample(struct perf_evsel *evsel, union perf_event *event, > } > > if (type & PERF_SAMPLE_REGS_USER) { > - /* First u64 tells us if we have any regs in sample. */
;-)
> OVERFLOW_CHECK_u64(array); > data->user_regs.abi = *array;
SNIP
> + > + if (type & PERF_SAMPLE_REGS_USER) { > + if (sample->user_regs.abi) { > + *array++ = sample->user_regs.abi; > + sz = hweight_long(sample_regs_user) * sizeof(u64); > + memcpy(array, sample->user_regs.regs, sz); > + array = (void *)array + sz; > + } else { > + *array++ = 0; > + } > + }
Acked-by: Jiri Olsa <jolsa@redhat.com>
| |