Re: [PATCH 02/16] perf: Add ability to attach registers dump tosample

From: Peter Zijlstra
Date: Thu May 24 2012 - 05:51:09 EST


On Wed, 2012-05-23 at 21:32 +0200, Jiri Olsa wrote:
> /*
> + * Values for sample_regs when PERF_SAMPLE_REGS is set.
> + * Defines register set to be attached to the sample.
> + */
> +enum perf_sample_regs {
> + PERF_SAMPLE_REGS_USER = 1U << 0, /* user registers */
> + PERF_SAMPLE_REGS_MAX = 1U << 1, /* non-ABI */
> +};



> + __u64 sample_regs; /* enum perf_sample_regs */
> +
> + /*
> + * Arch specific mask for PERF_SAMPLE_REGS_USER setup.
> + * Defines set of user regs to dump on samples.
> + * See asm/perf_regs.h for details.
> + */
> + __u64 sample_regs_user;

This all just smells.. :/

So you're wasting 64 bits to specify PERF_SAMPLE_REGS_USER while also
implying we'll need another u64 for every other value of
perf_sample_regs?

What are we doing here and why?

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