diff options
author | Stephane Eranian <eranian@google.com> | 2015-09-01 11:30:14 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-09-01 18:04:41 +0200 |
commit | af4aeadd8c04303c0aa2d112145c3627e2ebd026 (patch) | |
tree | 569c570d011874e21ff08843e223763338ffdf38 /tools/perf/util/perf_regs.h | |
parent | perf build: Fix Intel PT instruction decoder dependency problem (diff) | |
download | linux-af4aeadd8c04303c0aa2d112145c3627e2ebd026.tar.xz linux-af4aeadd8c04303c0aa2d112145c3627e2ebd026.zip |
perf tools: Fix link time error with sample_reg_masks on non x86
This patch makes perf compile on non x86 platforms by defining a weak
symbol for sample_reg_masks[] in util/perf_regs.c.
The patch also moves the REG() and REG_END() macros into the
util/per_regs.h header file. The macros are renamed to
SMPL_REG/SMPL_REG_END to avoid clashes with other header files.
Signed-off-by: Stephane Eranian <eranian@google.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1441099814-26783-1-git-send-email-eranian@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/perf_regs.h')
-rw-r--r-- | tools/perf/util/perf_regs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/perf_regs.h b/tools/perf/util/perf_regs.h index 92c1fff2153e..2984dcc54d67 100644 --- a/tools/perf/util/perf_regs.h +++ b/tools/perf/util/perf_regs.h @@ -9,6 +9,8 @@ struct sample_reg { const char *name; uint64_t mask; }; +#define SMPL_REG(n, b) { .name = #n, .mask = 1ULL << (b) } +#define SMPL_REG_END { .name = NULL } extern const struct sample_reg sample_reg_masks[]; |