Re: [PATCH 1/4] perf: add ability to sample machine state on interrupt
From: Jiri Olsa
Date: Fri Jul 11 2014 - 04:15:10 EST
On Wed, Jul 09, 2014 at 12:15:56AM +0200, Stephane Eranian wrote:
> Enable capture of interrupted machine state in each
> sample.
>
> Registers to sample are passed per event in the
> sample_regs_intr bitmask.
>
> To sample interrupt machine state, the
> PERF_SAMPLE_INTR_REGS must be passed in
> sample_type.
SNIP
> index 57e9190..018939c 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -4296,7 +4296,7 @@ perf_output_sample_regs(struct perf_output_handle *handle,
> }
> }
>
> -static void perf_sample_regs_user(struct perf_regs_user *regs_user,
> +static void perf_sample_regs_user(struct perf_regs *regs_user,
> struct pt_regs *regs)
> {
> if (!user_mode(regs)) {
> @@ -4312,6 +4312,14 @@ static void perf_sample_regs_user(struct perf_regs_user *regs_user,
> }
> }
>
> +static void perf_sample_regs_intr(struct perf_regs *regs_user,
> + struct pt_regs *regs)
> +{
> + regs_user->regs = regs;
> + regs_user->abi = perf_reg_abi(current);
^^^ regs_intr
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/