perf: Fix build break on powerpc due to sample_reg_masks
PATCH v2 1/1 perf: Fix build break on powerpc due to sample_reg_masks
Quoted 1 line
From
e29aeeee7236122c4d807ec9ebc721b5d7d75c8dMon Sep 17 00:00:00 2001
From: Sukadev Bhattiprolu <[email protected]>
Date: Thu, 24 Sep 2015 17:53:49 -0400
Subject: [PATCH v2] perf: Fix build break on powerpc due to sample_reg_masks
perf_regs.c does not get built on Powerpc as CONFIG_PERF_REGS is false. So the weak definition for 'sample_regs_masks' doesn't get picked up.
Adding perf_regs.o to util/Build unconditionally, exposes a redefinition error for 'perf_reg_value()' function (due to the static inline version in util/perf_regs.h). So use #ifdef HAVE_PERF_REGS_SUPPORT' around that function.
---
Changelog[v2]
- [Jiri Olsa] include <linux/compiler.h> for __maybe_unused
--- tools/perf/util/Build | 2 +- tools/perf/util/perf_regs.c | 2 ++ tools/perf/util/perf_regs.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-)
tools/perf/util/Build +1 -1
@@ -18,6 +18,7 @@ libperf-y += levenshtein.o libperf-y += llvm-utils.o libperf-y += parse-options.o libperf-y += parse-events.o +libperf-y += perf_regs.o libperf-y += path.o libperf-y += rbtree.o libperf-y += bitmap.o
@@ -104,7 +105,6 @@ libperf-$(CONFIG_LIBBABELTRACE) += data-convert-bt.o libperf-y += scripting-engines/ -libperf-$(CONFIG_PERF_REGS) += perf_regs.o libperf-$(CONFIG_ZLIB) += zlib.o libperf-$(CONFIG_LZMA) += lzma.o
tools/perf/util/perf_regs.c +2 -0
@@ -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
tools/perf/util/perf_regs.h +1 -0
@@ -2,6 +2,7 @@#define __PERF_REGS_H#include <linux/types.h> +#include <linux/compiler.h> struct regs_dump ;
Signature · 1 line
1.8.3.1
Quoted 8 lines · Sukadev Bhattiprolu
From
e29aeeee7236122c4d807ec9ebc721b5d7d75c8dMon Sep 17 00:00:00 2001
From: Sukadev Bhattiprolu <[email protected]>
Date: Thu, 24 Sep 2015 17:53:49 -0400
Subject: [PATCH v2] perf: Fix build break on powerpc due tosample_reg_masks
perf_regs.cdoes not get built on Powerpc asCONFIG_PERF_REGSis false. So the weak definition for 'sample_regs_masks' doesn't get picked up.
Quoted 6 lines
Adding perf_regs.o to util/Build unconditionally, exposes a redefinition error for '
perf_reg_value()' function (due to the static inline version inutil/perf_regs.h). So use #ifdefHAVE_PERF_REGS_SUPPORT' around that function.Signed-off-by Sukadev Bhattiprolu <[email protected]>
thanks,
jirka
Em Wed, Sep 30, 2015 at 09:09:09PM +0200, Jiri Olsa escreveu:
Quoted 9 lines · Sukadev Bhattiprolu
Quoted 8 lines
From
e29aeeee7236122c4d807ec9ebc721b5d7d75c8dMon Sep 17 00:00:00 2001
From: Sukadev Bhattiprolu <[email protected]>
Date: Thu, 24 Sep 2015 17:53:49 -0400
Subject: [PATCH v2] perf: Fix build break on powerpc due tosample_reg_masks
perf_regs.cdoes not get built on Powerpc asCONFIG_PERF_REGSis false. So the weak definition for 'sample_regs_masks' doesn't get picked up.
Quoted 8 lines
Quoted 6 lines
Adding perf_regs.o to util/Build unconditionally, exposes a redefinition error for '
perf_reg_value()' function (due to the static inline version inutil/perf_regs.h). So use #ifdefHAVE_PERF_REGS_SUPPORT' around that function.Signed-off-by Sukadev Bhattiprolu <[email protected]>Acked-by Jiri Olsa <[email protected]>
Thanks, applied.
- Arnaldo
Quoted 15 lines · Arnaldo Carvalho de Melo
Em Wed, Sep 30, 2015 at 09:09:09PM +0200, Jiri Olsa escreveu:
Quoted 14 lines · Sukadev Bhattiprolu
Quoted 13 lines
From
e29aeeee7236122c4d807ec9ebc721b5d7d75c8dMon Sep 17 00:00:00 2001
From: Sukadev Bhattiprolu <[email protected]>
Date: Thu, 24 Sep 2015 17:53:49 -0400
Subject: [PATCH v2] perf: Fix build break on powerpc due tosample_reg_masks
perf_regs.cdoes not get built on Powerpc asCONFIG_PERF_REGSis false. So the weak definition for 'sample_regs_masks' doesn't get picked up.Adding perf_regs.o to util/Build unconditionally, exposes a redefinition error for '
perf_reg_value()' function (due to the static inline version inutil/perf_regs.h). So use #ifdefHAVE_PERF_REGS_SUPPORT' around that function.
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Sukadev Bhattiprolu <[email protected]>Acked-by Jiri Olsa <[email protected]>Thanks, applied.
Is this going to Linus' tree any time soon?
I have folks pinging me to say that perf is broken on powerpc.
cheers
Arnaldo Carvalho de Melo
maintainerEm Wed, Oct 07, 2015 at 11:46:38AM +1100, Michael Ellerman escreveu:
Quoted 18 lines · Arnaldo Carvalho de Melo
Quoted 17 lines
Em Wed, Sep 30, 2015 at 09:09:09PM +0200, Jiri Olsa escreveu:
Quoted 16 lines · Sukadev Bhattiprolu
Quoted 14 lines
From
e29aeeee7236122c4d807ec9ebc721b5d7d75c8dMon Sep 17 00:00:00 2001
From: Sukadev Bhattiprolu <[email protected]>
Date: Thu, 24 Sep 2015 17:53:49 -0400
Subject: [PATCH v2] perf: Fix build break on powerpc due tosample_reg_masks
perf_regs.cdoes not get built on Powerpc asCONFIG_PERF_REGSis false. So the weak definition for 'sample_regs_masks' doesn't get picked up.Adding perf_regs.o to util/Build unconditionally, exposes a redefinition error for '
perf_reg_value()' function (due to the static inline version inutil/perf_regs.h). So use #ifdefHAVE_PERF_REGS_SUPPORT' around that function.Signed-off-by Sukadev Bhattiprolu <[email protected]>
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Acked-by Jiri Olsa <[email protected]>Thanks, applied.
Is this going to Linus' tree any time soon?
I have folks pinging me to say that perf is broken on powerpc.
Checking this now.
- Arnaldo
tip-bot for Sukadev Bhattiprolu
merge bot[tip:perf/core] perf tools: Fix build break on powerpc due to sample_reg_masks
In reply to Sukadev Bhattiproluperf tools: Fix build break on powerpc due to sample_reg_masks
Commit-ID: eb56db54326f910348defbee2803ec0675a664b2 Gitweb: http://git.kernel.org/tip/eb56db54326f910348defbee2803ec0675a664b2 Author: Sukadev Bhattiprolu <[email protected]> AuthorDate: Thu, 24 Sep 2015 17:53:49 -0400 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Wed, 30 Sep 2015 18:34:27 -0300
perf tools: Fix build break on powerpc due to sample_reg_masks
The perf_regs.c file does not get built on Powerpc as CONFIG_PERF_REGS is false. So the weak definition for 'sample_regs_masks' doesn't get picked up.
Adding perf_regs.o to util/Build unconditionally, exposes a redefinition error for 'perf_reg_value()' function (due to the static inline version in util/perf_regs.h). So use #ifdef HAVE_PERF_REGS_SUPPORT' around that function.
--- tools/perf/util/Build | 2 +- tools/perf/util/perf_regs.c | 2 ++ tools/perf/util/perf_regs.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-)
tools/perf/util/Build +1 -1
@@ -18,6 +18,7 @@ libperf-y += levenshtein.o libperf-y += llvm-utils.o libperf-y += parse-options.o libperf-y += parse-events.o +libperf-y += perf_regs.o libperf-y += path.o libperf-y += rbtree.o libperf-y += bitmap.o
@@ -104,7 +105,6 @@ libperf-$(CONFIG_LIBBABELTRACE) += data-convert-bt.o libperf-y += scripting-engines/ -libperf-$(CONFIG_PERF_REGS) += perf_regs.o libperf-$(CONFIG_ZLIB) += zlib.o libperf-$(CONFIG_LZMA) += lzma.o
tools/perf/util/perf_regs.c +2 -0
@@ -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
tools/perf/util/perf_regs.h +1 -0
@@ -2,6 +2,7 @@#define __PERF_REGS_H#include <linux/types.h> +#include <linux/compiler.h> struct regs_dump ;
tip-bot for Sukadev Bhattiprolu
merge bot[tip:perf/urgent] perf tools: Fix build break on powerpc due to sample_reg_masks
In reply to Sukadev Bhattiproluperf tools: Fix build break on powerpc due to sample_reg_masks
Commit-ID: 9fb4765451f22c5e782c1590747717550bff34b2 Gitweb: http://git.kernel.org/tip/9fb4765451f22c5e782c1590747717550bff34b2 Author: Sukadev Bhattiprolu <[email protected]> AuthorDate: Thu, 24 Sep 2015 17:53:49 -0400 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Wed, 7 Oct 2015 10:20:08 -0300
perf tools: Fix build break on powerpc due to sample_reg_masks
perf_regs.c does not get built on Powerpc as CONFIG_PERF_REGS is false. So the weak definition for 'sample_regs_masks' doesn't get picked up.
Adding perf_regs.o to util/Build unconditionally, exposes a redefinition error for 'perf_reg_value()' function (due to the static inline version in util/perf_regs.h). So use #ifdef HAVE_PERF_REGS_SUPPORT' around that function.
--- tools/perf/util/Build | 2 +- tools/perf/util/perf_regs.c | 2 ++ tools/perf/util/perf_regs.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-)
tools/perf/util/Build +1 -1
@@ -17,6 +17,7 @@ libperf-y += levenshtein.o libperf-y += llvm-utils.o libperf-y += parse-options.o libperf-y += parse-events.o +libperf-y += perf_regs.o libperf-y += path.o libperf-y += rbtree.o libperf-y += bitmap.o
@@ -103,7 +104,6 @@ libperf-$(CONFIG_LIBBABELTRACE) += data-convert-bt.o libperf-y += scripting-engines/ -libperf-$(CONFIG_PERF_REGS) += perf_regs.o libperf-$(CONFIG_ZLIB) += zlib.o libperf-$(CONFIG_LZMA) += lzma.o
tools/perf/util/perf_regs.c +2 -0
@@ -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
tools/perf/util/perf_regs.h +1 -0
@@ -2,6 +2,7 @@#define __PERF_REGS_H#include <linux/types.h> +#include <linux/compiler.h> struct regs_dump ;