* [FYI][PATCH 1/1] perf tools: Set COMPAT_NEED_REALLOCARRAY for CONFIG_AUXTRACE=1
@ 2021-11-17 12:51 Arnaldo Carvalho de Melo
2021-11-17 14:41 ` Leo Yan
0 siblings, 1 reply; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2021-11-17 12:51 UTC (permalink / raw)
To: German Gomez
Cc: Alexander Shishkin, James Clark, Jiri Olsa, John Garry, Leo Yan,
Mark Rutland, Mathieu Poirier, Namhyung Kim, Will Deacon,
Linux Kernel Mailing List
As it is being used in tools/perf/arch/arm64/util/arm-spe.c and the
COMPAT_NEED_REALLOCARRAY was only being set when CORESIGHT=1 is set.
Fixes: 56c31cdff7c2a640 ("perf arm-spe: Implement find_snapshot callback")
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: German Gomez <german.gomez@arm.com>
Cc: James Clark <james.clark@arm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: John Garry <john.garry@huawei.com>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/Makefile.config | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 07e65a061fd3a13b..afd144725a0bf766 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -1010,6 +1010,9 @@ ifndef NO_AUXTRACE
ifndef NO_AUXTRACE
$(call detected,CONFIG_AUXTRACE)
CFLAGS += -DHAVE_AUXTRACE_SUPPORT
+ ifeq ($(feature-reallocarray), 0)
+ CFLAGS += -DCOMPAT_NEED_REALLOCARRAY
+ endif
endif
endif
--
2.31.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [FYI][PATCH 1/1] perf tools: Set COMPAT_NEED_REALLOCARRAY for CONFIG_AUXTRACE=1
2021-11-17 12:51 [FYI][PATCH 1/1] perf tools: Set COMPAT_NEED_REALLOCARRAY for CONFIG_AUXTRACE=1 Arnaldo Carvalho de Melo
@ 2021-11-17 14:41 ` Leo Yan
2021-11-17 15:35 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 4+ messages in thread
From: Leo Yan @ 2021-11-17 14:41 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: German Gomez, Alexander Shishkin, James Clark, Jiri Olsa,
John Garry, Mark Rutland, Mathieu Poirier, Namhyung Kim,
Will Deacon, Linux Kernel Mailing List
On Wed, Nov 17, 2021 at 09:51:42AM -0300, Arnaldo Carvalho de Melo wrote:
> As it is being used in tools/perf/arch/arm64/util/arm-spe.c and the
> COMPAT_NEED_REALLOCARRAY was only being set when CORESIGHT=1 is set.
Thanks for the patch, Arnaldo.
This patch looks good to me. But I cannot reproduce the build failure,
if without CORESIGHT=1 I still don't see the build failure.
I think we should apply below code as well, if COMPAT_NEED_REALLOCARRAY
is enabled for AUXTRACE, it will be applied for cs-etm as well. For
this reason, we can remove the redundant definition for CORESIGHT.
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 07e65a061fd3..2dbf086d1155 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -477,9 +477,6 @@ ifdef CORESIGHT
$(call feature_check,libopencsd)
ifeq ($(feature-libopencsd), 1)
CFLAGS += -DHAVE_CSTRACE_SUPPORT $(LIBOPENCSD_CFLAGS)
- ifeq ($(feature-reallocarray), 0)
- CFLAGS += -DCOMPAT_NEED_REALLOCARRAY
- endif
LDFLAGS += $(LIBOPENCSD_LDFLAGS)
EXTLIBS += $(OPENCSDLIBS)
$(call detected,CONFIG_LIBOPENCSD)
Thanks,
Leo
> Fixes: 56c31cdff7c2a640 ("perf arm-spe: Implement find_snapshot callback")
> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> Cc: German Gomez <german.gomez@arm.com>
> Cc: James Clark <james.clark@arm.com>
> Cc: Jiri Olsa <jolsa@redhat.com>
> Cc: John Garry <john.garry@huawei.com>
> Cc: Leo Yan <leo.yan@linaro.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Cc: Will Deacon <will@kernel.org>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> ---
> tools/perf/Makefile.config | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> index 07e65a061fd3a13b..afd144725a0bf766 100644
> --- a/tools/perf/Makefile.config
> +++ b/tools/perf/Makefile.config
> @@ -1010,6 +1010,9 @@ ifndef NO_AUXTRACE
> ifndef NO_AUXTRACE
> $(call detected,CONFIG_AUXTRACE)
> CFLAGS += -DHAVE_AUXTRACE_SUPPORT
> + ifeq ($(feature-reallocarray), 0)
> + CFLAGS += -DCOMPAT_NEED_REALLOCARRAY
> + endif
> endif
> endif
>
> --
> 2.31.1
>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [FYI][PATCH 1/1] perf tools: Set COMPAT_NEED_REALLOCARRAY for CONFIG_AUXTRACE=1
2021-11-17 14:41 ` Leo Yan
@ 2021-11-17 15:35 ` Arnaldo Carvalho de Melo
2021-11-18 5:24 ` Leo Yan
0 siblings, 1 reply; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2021-11-17 15:35 UTC (permalink / raw)
To: Leo Yan
Cc: German Gomez, Alexander Shishkin, James Clark, Jiri Olsa,
John Garry, Mark Rutland, Mathieu Poirier, Namhyung Kim,
Will Deacon, Linux Kernel Mailing List
Em Wed, Nov 17, 2021 at 10:41:10PM +0800, Leo Yan escreveu:
> On Wed, Nov 17, 2021 at 09:51:42AM -0300, Arnaldo Carvalho de Melo wrote:
> > As it is being used in tools/perf/arch/arm64/util/arm-spe.c and the
> > COMPAT_NEED_REALLOCARRAY was only being set when CORESIGHT=1 is set.
>
> Thanks for the patch, Arnaldo.
>
> This patch looks good to me. But I cannot reproduce the build failure,
> if without CORESIGHT=1 I still don't see the build failure.
Strange, here it broke when building on ubuntu:16.04-x-arm64 and ubuntu:18.04-x-arm64
I.e. cross building from x86-64 to arm64.
> I think we should apply below code as well, if COMPAT_NEED_REALLOCARRAY
> is enabled for AUXTRACE, it will be applied for cs-etm as well. For
> this reason, we can remove the redundant definition for CORESIGHT.
Isn't it possible to ask for:
make NO_AUXTRACE=1 CORESIGHT=1
?
> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> index 07e65a061fd3..2dbf086d1155 100644
> --- a/tools/perf/Makefile.config
> +++ b/tools/perf/Makefile.config
> @@ -477,9 +477,6 @@ ifdef CORESIGHT
> $(call feature_check,libopencsd)
> ifeq ($(feature-libopencsd), 1)
> CFLAGS += -DHAVE_CSTRACE_SUPPORT $(LIBOPENCSD_CFLAGS)
> - ifeq ($(feature-reallocarray), 0)
> - CFLAGS += -DCOMPAT_NEED_REALLOCARRAY
> - endif
> LDFLAGS += $(LIBOPENCSD_LDFLAGS)
> EXTLIBS += $(OPENCSDLIBS)
> $(call detected,CONFIG_LIBOPENCSD)
>
> Thanks,
> Leo
>
> > Fixes: 56c31cdff7c2a640 ("perf arm-spe: Implement find_snapshot callback")
> > Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> > Cc: German Gomez <german.gomez@arm.com>
> > Cc: James Clark <james.clark@arm.com>
> > Cc: Jiri Olsa <jolsa@redhat.com>
> > Cc: John Garry <john.garry@huawei.com>
> > Cc: Leo Yan <leo.yan@linaro.org>
> > Cc: Mark Rutland <mark.rutland@arm.com>
> > Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
> > Cc: Namhyung Kim <namhyung@kernel.org>
> > Cc: Will Deacon <will@kernel.org>
> > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> > ---
> > tools/perf/Makefile.config | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> > index 07e65a061fd3a13b..afd144725a0bf766 100644
> > --- a/tools/perf/Makefile.config
> > +++ b/tools/perf/Makefile.config
> > @@ -1010,6 +1010,9 @@ ifndef NO_AUXTRACE
> > ifndef NO_AUXTRACE
> > $(call detected,CONFIG_AUXTRACE)
> > CFLAGS += -DHAVE_AUXTRACE_SUPPORT
> > + ifeq ($(feature-reallocarray), 0)
> > + CFLAGS += -DCOMPAT_NEED_REALLOCARRAY
> > + endif
> > endif
> > endif
> >
> > --
> > 2.31.1
> >
--
- Arnaldo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [FYI][PATCH 1/1] perf tools: Set COMPAT_NEED_REALLOCARRAY for CONFIG_AUXTRACE=1
2021-11-17 15:35 ` Arnaldo Carvalho de Melo
@ 2021-11-18 5:24 ` Leo Yan
0 siblings, 0 replies; 4+ messages in thread
From: Leo Yan @ 2021-11-18 5:24 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: German Gomez, Alexander Shishkin, James Clark, Jiri Olsa,
John Garry, Mark Rutland, Mathieu Poirier, Namhyung Kim,
Will Deacon, Linux Kernel Mailing List
On Wed, Nov 17, 2021 at 12:35:46PM -0300, Arnaldo Carvalho de Melo wrote:
[...]
> > I think we should apply below code as well, if COMPAT_NEED_REALLOCARRAY
> > is enabled for AUXTRACE, it will be applied for cs-etm as well. For
> > this reason, we can remove the redundant definition for CORESIGHT.
>
> Isn't it possible to ask for:
>
> make NO_AUXTRACE=1 CORESIGHT=1
>
> ?
If AUXTRACE is disabled, then it has no chance to build cs-etm code;
this is decided by util/Build:
ifdef CONFIG_LIBOPENCSD
perf-$(CONFIG_AUXTRACE) += cs-etm.o
perf-$(CONFIG_AUXTRACE) += cs-etm-decoder/
endif
So we could safely remove the redundant definition for
COMPAT_NEED_REALLOCARRAY in CORESIGHT chunk.
Thanks,
Leo
> > diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> > index 07e65a061fd3..2dbf086d1155 100644
> > --- a/tools/perf/Makefile.config
> > +++ b/tools/perf/Makefile.config
> > @@ -477,9 +477,6 @@ ifdef CORESIGHT
> > $(call feature_check,libopencsd)
> > ifeq ($(feature-libopencsd), 1)
> > CFLAGS += -DHAVE_CSTRACE_SUPPORT $(LIBOPENCSD_CFLAGS)
> > - ifeq ($(feature-reallocarray), 0)
> > - CFLAGS += -DCOMPAT_NEED_REALLOCARRAY
> > - endif
> > LDFLAGS += $(LIBOPENCSD_LDFLAGS)
> > EXTLIBS += $(OPENCSDLIBS)
> > $(call detected,CONFIG_LIBOPENCSD)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-11-18 5:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-17 12:51 [FYI][PATCH 1/1] perf tools: Set COMPAT_NEED_REALLOCARRAY for CONFIG_AUXTRACE=1 Arnaldo Carvalho de Melo
2021-11-17 14:41 ` Leo Yan
2021-11-17 15:35 ` Arnaldo Carvalho de Melo
2021-11-18 5:24 ` Leo Yan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).