[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150929203651.GA26281@krava>
Date: Tue, 29 Sep 2015 22:36:51 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>
Cc: "Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>,
LKML <linux-kernel@...r.kernel.org>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
"mingo@...hat.com" <mingo@...hat.com>,
Stephane Eranian <eranian@...gle.com>,
linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH] perf record: Limit --intr-regs to platforms supporting
PERF_REGS
On Tue, Sep 29, 2015 at 11:10:02AM -0700, Sukadev Bhattiprolu wrote:
SNIP
>
> diff --git a/tools/perf/util/perf_regs.c b/tools/perf/util/perf_regs.c
> index 885e8ac..6b8eb13 100644
> --- a/tools/perf/util/perf_regs.c
> +++ b/tools/perf/util/perf_regs.c
> @@ -6,6 +6,7 @@ const struct sample_reg __weak sample_reg_masks[] = {
> SMPL_REG_END
> };
>
> +#ifdef HAVE_PERF_REGS_SUPPORT
> int perf_reg_value(u64 *valp, struct regs_dump *regs, int id)
> {
> int i, idx = 0;
> @@ -29,3 +30,4 @@ out:
> *valp = regs->cache_regs[id];
> return 0;
> }
> +#endif
> diff --git a/tools/perf/util/perf_regs.h b/tools/perf/util/perf_regs.h
> index 2984dcc..8dbdfeb 100644
> --- a/tools/perf/util/perf_regs.h
> +++ b/tools/perf/util/perf_regs.h
> @@ -3,6 +3,10 @@
>
> #include <linux/types.h>
>
> +#ifndef __maybe_unused
> +#define __maybe_unused __attribute__((unused))
> +#endif
> +
would the linux/compiler.h include do instead?
otherwise I'd be ok with this
thanks,
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists