perf python: Fix up the build on architectures without HAVE_KVM_STAT_SUPPORT
Arnaldo Carvalho de Melo
maintainerPATCH 1/1 perf python: Fix up the build on architectures without HAVE_KVM_STAT_SUPPORT
Noticed while building on a raspbian arm 32-bit system.
There was also this other case, fixed by adding a missing util/stat.h with the prototypes:
/tmp/tmp.MbiSHoF3dj/perf-6.12.0-rc3/tools/perf/util/python.c:1396:6: error: no previous prototype for ‘perf_stat__set_no_csv_summary’ [-Werror=missing-prototypes]
1396 | void perf_stat__set_no_csv_summary(int set __maybe_unused)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/tmp.MbiSHoF3dj/perf-6.12.0-rc3/tools/perf/util/python.c:1400:6: error: no previous prototype for ‘perf_stat__set_big_num’ [-Werror=missing-prototypes]
1400 | void perf_stat__set_big_num(int set __maybe_unused)
| ^~~~~~~~~~~~~~~~~~~~~~cc1: all warnings being treated as errors
In other architectures this must be building due to some lucky indirect inclusion of that header.
--- tools/perf/util/python.c | 3 +++ 1 file changed, 3 insertions(+)
tools/perf/util/python.c +3 -0
@@ -19,6 +19,7 @@#include "util/bpf-filter.h" #include "util/env.h" #include "util/kvm-stat.h" +#include "util/stat.h" #include "util/kwork.h" #include "util/sample.h" #include "util/lock-contention.h"
@@ -1355,6 +1356,7 @@ PyMODINIT_FUNC PyInit_perf(void)unsigned int scripting_max_stack =PERF_MAX_STACK_DEPTH ; +#ifdef HAVE_KVM_STAT_SUPPORT bool kvm_entry_event (struct evsel *evsel__maybe_unused ) {return false;
@@ -1384,6 +1386,7 @@ void exit_event_decode_key(struct perf_kvm_stat *kvm __maybe_unused, char *decode __maybe_unused) { } +#endif // HAVE_KVM_STAT_SUPPORT int find_scripts (char **scripts_array__maybe_unused ,char **scripts_path_array__maybe_unused ,int num__maybe_unused ,int pathlen__maybe_unused )
Signature · 1 line
2.46.0
Ian Rogers
reviewerQuoted 17 lines · Arnaldo Carvalho de Melo
Noticed while building on a raspbian arm 32-bit system.
There was also this other case, fixed by adding a missing
util/stat.hwith the prototypes:
/tmp/tmp.MbiSHoF3dj/perf-6.12.0-rc3/tools/perf/util/python.c:1396:6: error: no previous prototype for ‘perf_stat__set_no_csv_summary’ [-Werror=missing-prototypes]
1396 | voidperf_stat__set_no_csv_summary(int set __maybe_unused)| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /tmp/tmp.MbiSHoF3dj/perf-6.12.0-rc3/tools/perf/util/python.c:1400:6: error: no previous prototype for ‘perf_stat__set_big_num’ [-Werror=missing-prototypes] 1400 | void perf_stat__set_big_num(int set __maybe_unused) | ^~~~~~~~~~~~~~~~~~~~~~cc1: all warnings being treated as errors
In other architectures this must be building due to some lucky indirect inclusion of that header.
Quoted 7 lines
Fixes 9dabf4003423c8d3 ("perf python: Switch module to linking libraries from building source")Cc Adrian Hunter <[email protected]>Cc Ian Rogers <[email protected]>Cc Jiri Olsa <[email protected]>Cc Kan Liang <[email protected]>Cc Namhyung Kim <[email protected]>Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
So this will at least conflict with:
https://lore.kernel.org/lkml/[email protected]/
where the #ifdef-ed out functions are removed. Does that series fix the ARM32 issue? Could we land that?
Thanks,
Ian
Quoted 35 lines
--- tools/perf/util/python.c | 3 +++ 1 file changed, 3 insertions(+)tools/perf/util/python.c +3
-1@@ -19,6 +19,7 @@#include "util/bpf-filter.h" #include "util/env.h" #include "util/kvm-stat.h" +#include "util/stat.h" #include "util/kwork.h" #include "util/sample.h" #include "util/lock-contention.h" @@ -1355,6 +1356,7 @@ PyMODINIT_FUNC PyInit_perf(void)unsigned int scripting_max_stack =PERF_MAX_STACK_DEPTH ; +#ifdef HAVE_KVM_STAT_SUPPORT bool kvm_entry_event (struct evsel *evsel__maybe_unused ) {return false;@@ -1384,6 +1386,7 @@ void exit_event_decode_key(struct perf_kvm_stat *kvm __maybe_unused, char *decode __maybe_unused) { } +#endif // HAVE_KVM_STAT_SUPPORT int find_scripts (char **scripts_array__maybe_unused ,char **scripts_path_array__maybe_unused ,int num__maybe_unused ,int pathlen__maybe_unused ) --2.46.0
Arnaldo Carvalho de Melo
maintainerQuoted 27 lines · Ian Rogers
Quoted 17 lines · Arnaldo Carvalho de Melo
Noticed while building on a raspbian arm 32-bit system.
There was also this other case, fixed by adding a missing
util/stat.hwith the prototypes:
/tmp/tmp.MbiSHoF3dj/perf-6.12.0-rc3/tools/perf/util/python.c:1396:6: error: no previous prototype for ‘perf_stat__set_no_csv_summary’ [-Werror=missing-prototypes]
1396 | voidperf_stat__set_no_csv_summary(int set __maybe_unused)| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /tmp/tmp.MbiSHoF3dj/perf-6.12.0-rc3/tools/perf/util/python.c:1400:6: error: no previous prototype for ‘perf_stat__set_big_num’ [-Werror=missing-prototypes] 1400 | void perf_stat__set_big_num(int set __maybe_unused) | ^~~~~~~~~~~~~~~~~~~~~~cc1: all warnings being treated as errors
In other architectures this must be building due to some lucky indirect inclusion of that header.
Quoted 7 lines
Fixes 9dabf4003423c8d3 ("perf python: Switch module to linking libraries from building source")Cc Adrian Hunter <[email protected]>Cc Ian Rogers <[email protected]>Cc Jiri Olsa <[email protected]>Cc Kan Liang <[email protected]>Cc Namhyung Kim <[email protected]>Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
Quoted 4 lines
So this will at least conflict with:
https://lore.kernel.org/lkml/[email protected]/
where the #ifdef-ed out functions are removed. Does that series fix the ARM32 issue? Could we land that?
I'd prefer to have what I posted for perf-tools, as it is smaller, and to land the patch removing those functions on perf-tools-next.
I'll try to switch testing to a librecomputer board, the rpi3 is super slow :-)
Thanks,
- Arnaldo
Quoted 29 lines · Arnaldo Carvalho de Melo
Quoted 27 lines · Ian Rogers
Quoted 24 lines · Arnaldo Carvalho de Melo
Noticed while building on a raspbian arm 32-bit system.
There was also this other case, fixed by adding a missing
util/stat.hwith the prototypes:
/tmp/tmp.MbiSHoF3dj/perf-6.12.0-rc3/tools/perf/util/python.c:1396:6: error: no previous prototype for ‘perf_stat__set_no_csv_summary’ [-Werror=missing-prototypes]
1396 | voidperf_stat__set_no_csv_summary(int set __maybe_unused)| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /tmp/tmp.MbiSHoF3dj/perf-6.12.0-rc3/tools/perf/util/python.c:1400:6: error: no previous prototype for ‘perf_stat__set_big_num’ [-Werror=missing-prototypes] 1400 | void perf_stat__set_big_num(int set __maybe_unused) | ^~~~~~~~~~~~~~~~~~~~~~cc1: all warnings being treated as errors
In other architectures this must be building due to some lucky indirect inclusion of that header.
Fixes 9dabf4003423c8d3 ("perf python: Switch module to linking libraries from building source")Cc Adrian Hunter <[email protected]>Cc Ian Rogers <[email protected]>Cc Jiri Olsa <[email protected]>Cc Kan Liang <[email protected]>Cc Namhyung Kim <[email protected]>Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
Quoted 7 lines
Quoted 4 lines
So this will at least conflict with:
https://lore.kernel.org/lkml/[email protected]/
where the #ifdef-ed out functions are removed. Does that series fix the ARM32 issue? Could we land that?I'd prefer to have what I posted for perf-tools, as it is smaller, and to land the patch removing those functions on perf-tools-next.
Makes sense to me. Have a
should you need it.
Quoted 2 lines
I'll try to switch testing to a librecomputer board, the rpi3 is super slow :-)
Thanks,
Ian
Arnaldo Carvalho de Melo
maintainerQuoted 4 lines · Ian Rogers
Quoted 3 lines · Arnaldo Carvalho de Melo
Quoted 2 lines · Ian Rogers
Quoted 1 line · Arnaldo Carvalho de Melo
Noticed while building on a raspbian arm 32-bit system.
<SNIP>
Quoted 13 lines
Quoted 12 lines
Quoted 12 lines
Quoted 7 lines
Fixes 9dabf4003423c8d3 ("perf python: Switch module to linking libraries from building source")Cc Adrian Hunter <[email protected]>Cc Ian Rogers <[email protected]>Cc Jiri Olsa <[email protected]>Cc Kan Liang <[email protected]>Cc Namhyung Kim <[email protected]>Signed-off-by Arnaldo Carvalho de Melo <[email protected]>So this will at least conflict with:
https://lore.kernel.org/lkml/[email protected]/
where the #ifdef-ed out functions are removed. Does that series fix the ARM32 issue? Could we land that?
Quoted 6 lines
Quoted 2 lines
I'd prefer to have what I posted for perf-tools, as it is smaller, and to land the patch removing those functions on perf-tools-next.
Makes sense to me. Have a
Reviewed-by Ian Rogers <[email protected]>should you need it.
Always appreciated, thanks, applying it to the patch,
- Arnaldo
Quoted 2 lines
Quoted 2 lines
I'll try to switch testing to a librecomputer board, the rpi3 is super slow :-)