Re: [PATCH V11 13/15] perf tools: expandperf_event__synthesize_sample()

From: Jiri Olsa
Date: Wed Aug 14 2013 - 12:40:22 EST


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@xxxxxxxxxx>
--
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/