All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] perf pmu: Fix aarch64 build
@ 2023-02-03  1:40 ` Ian Rogers
  0 siblings, 0 replies; 30+ messages in thread
From: Ian Rogers @ 2023-02-03  1:40 UTC (permalink / raw)
  To: John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Adrian Hunter, Kan Liang, Kim Phillips, Florian Fischer,
	Ravi Bangoria, Xing Zhengjun, Rob Herring, Kang Minchul,
	linux-arm-kernel, linux-perf-users, linux-kernel, Sandipan Das,
	Jing Zhang, linuxppc-dev, Kajol Jain
  Cc: Stephane Eranian, Perry Taylor, Caleb Biggers, Ian Rogers

ARM64 overrides a weak function but a previous change had broken the
build.

Fixes: 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table")
Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/arch/arm64/util/pmu.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/perf/arch/arm64/util/pmu.c b/tools/perf/arch/arm64/util/pmu.c
index 2779840d8896..fa143acb4c8d 100644
--- a/tools/perf/arch/arm64/util/pmu.c
+++ b/tools/perf/arch/arm64/util/pmu.c
@@ -22,6 +22,8 @@ static struct perf_pmu *pmu__find_core_pmu(void)
 			return NULL;
 
 		return pmu;
+	}
+	return NULL;
 }
 
 const struct pmu_metrics_table *pmu_metrics_table__find(void)
-- 
2.39.1.519.gcb327c4b5f-goog


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v1] perf pmu: Fix aarch64 build
@ 2023-02-03  1:40 ` Ian Rogers
  0 siblings, 0 replies; 30+ messages in thread
From: Ian Rogers @ 2023-02-03  1:40 UTC (permalink / raw)
  To: John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Adrian Hunter, Kan Liang, Kim Phillips, Florian Fischer,
	Ravi Bangoria, Xing Zhengjun, Rob Herring, Kang Minchul,
	linux-arm-kernel, linux-perf-users, linux-kernel, Sandipan Das,
	Jing Zhang, linuxppc-dev, Kajol Jain
  Cc: Ian Rogers, Perry Taylor, Caleb Biggers, Stephane Eranian

ARM64 overrides a weak function but a previous change had broken the
build.

Fixes: 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table")
Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/arch/arm64/util/pmu.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/perf/arch/arm64/util/pmu.c b/tools/perf/arch/arm64/util/pmu.c
index 2779840d8896..fa143acb4c8d 100644
--- a/tools/perf/arch/arm64/util/pmu.c
+++ b/tools/perf/arch/arm64/util/pmu.c
@@ -22,6 +22,8 @@ static struct perf_pmu *pmu__find_core_pmu(void)
 			return NULL;
 
 		return pmu;
+	}
+	return NULL;
 }
 
 const struct pmu_metrics_table *pmu_metrics_table__find(void)
-- 
2.39.1.519.gcb327c4b5f-goog


^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [PATCH v1] perf pmu: Fix aarch64 build
@ 2023-02-03  1:40 ` Ian Rogers
  0 siblings, 0 replies; 30+ messages in thread
From: Ian Rogers @ 2023-02-03  1:40 UTC (permalink / raw)
  To: John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Adrian Hunter, Kan Liang, Kim Phillips, Florian Fischer,
	Ravi Bangoria, Xing Zhengjun, Rob Herring, Kang Minchul,
	linux-arm-kernel, linux-perf-users, linux-kernel, Sandipan Das,
	Jing Zhang, linuxppc-dev, Kajol Jain
  Cc: Stephane Eranian, Perry Taylor, Caleb Biggers, Ian Rogers

ARM64 overrides a weak function but a previous change had broken the
build.

Fixes: 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table")
Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/arch/arm64/util/pmu.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/perf/arch/arm64/util/pmu.c b/tools/perf/arch/arm64/util/pmu.c
index 2779840d8896..fa143acb4c8d 100644
--- a/tools/perf/arch/arm64/util/pmu.c
+++ b/tools/perf/arch/arm64/util/pmu.c
@@ -22,6 +22,8 @@ static struct perf_pmu *pmu__find_core_pmu(void)
 			return NULL;
 
 		return pmu;
+	}
+	return NULL;
 }
 
 const struct pmu_metrics_table *pmu_metrics_table__find(void)
-- 
2.39.1.519.gcb327c4b5f-goog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* Re: [PATCH v1] perf pmu: Fix aarch64 build
  2023-02-03  1:40 ` Ian Rogers
  (?)
@ 2023-02-03  1:41   ` Ian Rogers
  -1 siblings, 0 replies; 30+ messages in thread
From: Ian Rogers @ 2023-02-03  1:41 UTC (permalink / raw)
  To: John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Adrian Hunter, Kan Liang, Kim Phillips, Florian Fischer,
	Ravi Bangoria, Xing Zhengjun, Rob Herring, Kang Minchul,
	linux-arm-kernel, linux-perf-users, linux-kernel, Sandipan Das,
	Jing Zhang, linuxppc-dev, Kajol Jain
  Cc: Stephane Eranian, Perry Taylor, Caleb Biggers

On Thu, Feb 2, 2023 at 5:40 PM Ian Rogers <irogers@google.com> wrote:
>
> ARM64 overrides a weak function but a previous change had broken the
> build.
>
> Fixes: 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table")

As 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table") is
only on tmp.perf/core then it may be best to just squash this fix into
that.

Thanks,
Ian

> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
>  tools/perf/arch/arm64/util/pmu.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/tools/perf/arch/arm64/util/pmu.c b/tools/perf/arch/arm64/util/pmu.c
> index 2779840d8896..fa143acb4c8d 100644
> --- a/tools/perf/arch/arm64/util/pmu.c
> +++ b/tools/perf/arch/arm64/util/pmu.c
> @@ -22,6 +22,8 @@ static struct perf_pmu *pmu__find_core_pmu(void)
>                         return NULL;
>
>                 return pmu;
> +       }
> +       return NULL;
>  }
>
>  const struct pmu_metrics_table *pmu_metrics_table__find(void)
> --
> 2.39.1.519.gcb327c4b5f-goog
>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1] perf pmu: Fix aarch64 build
@ 2023-02-03  1:41   ` Ian Rogers
  0 siblings, 0 replies; 30+ messages in thread
From: Ian Rogers @ 2023-02-03  1:41 UTC (permalink / raw)
  To: John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Adrian Hunter, Kan Liang, Kim Phillips, Florian Fischer,
	Ravi Bangoria, Xing Zhengjun, Rob Herring, Kang Minchul,
	linux-arm-kernel, linux-perf-users, linux-kernel, Sandipan Das,
	Jing Zhang, linuxppc-dev, Kajol Jain
  Cc: Perry Taylor, Caleb Biggers, Stephane Eranian

On Thu, Feb 2, 2023 at 5:40 PM Ian Rogers <irogers@google.com> wrote:
>
> ARM64 overrides a weak function but a previous change had broken the
> build.
>
> Fixes: 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table")

As 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table") is
only on tmp.perf/core then it may be best to just squash this fix into
that.

Thanks,
Ian

> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
>  tools/perf/arch/arm64/util/pmu.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/tools/perf/arch/arm64/util/pmu.c b/tools/perf/arch/arm64/util/pmu.c
> index 2779840d8896..fa143acb4c8d 100644
> --- a/tools/perf/arch/arm64/util/pmu.c
> +++ b/tools/perf/arch/arm64/util/pmu.c
> @@ -22,6 +22,8 @@ static struct perf_pmu *pmu__find_core_pmu(void)
>                         return NULL;
>
>                 return pmu;
> +       }
> +       return NULL;
>  }
>
>  const struct pmu_metrics_table *pmu_metrics_table__find(void)
> --
> 2.39.1.519.gcb327c4b5f-goog
>

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1] perf pmu: Fix aarch64 build
@ 2023-02-03  1:41   ` Ian Rogers
  0 siblings, 0 replies; 30+ messages in thread
From: Ian Rogers @ 2023-02-03  1:41 UTC (permalink / raw)
  To: John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Adrian Hunter, Kan Liang, Kim Phillips, Florian Fischer,
	Ravi Bangoria, Xing Zhengjun, Rob Herring, Kang Minchul,
	linux-arm-kernel, linux-perf-users, linux-kernel, Sandipan Das,
	Jing Zhang, linuxppc-dev, Kajol Jain
  Cc: Stephane Eranian, Perry Taylor, Caleb Biggers

On Thu, Feb 2, 2023 at 5:40 PM Ian Rogers <irogers@google.com> wrote:
>
> ARM64 overrides a weak function but a previous change had broken the
> build.
>
> Fixes: 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table")

As 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table") is
only on tmp.perf/core then it may be best to just squash this fix into
that.

Thanks,
Ian

> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
>  tools/perf/arch/arm64/util/pmu.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/tools/perf/arch/arm64/util/pmu.c b/tools/perf/arch/arm64/util/pmu.c
> index 2779840d8896..fa143acb4c8d 100644
> --- a/tools/perf/arch/arm64/util/pmu.c
> +++ b/tools/perf/arch/arm64/util/pmu.c
> @@ -22,6 +22,8 @@ static struct perf_pmu *pmu__find_core_pmu(void)
>                         return NULL;
>
>                 return pmu;
> +       }
> +       return NULL;
>  }
>
>  const struct pmu_metrics_table *pmu_metrics_table__find(void)
> --
> 2.39.1.519.gcb327c4b5f-goog
>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1] perf pmu: Fix aarch64 build
  2023-02-03  1:41   ` Ian Rogers
  (?)
@ 2023-02-03 14:17     ` Arnaldo Carvalho de Melo
  -1 siblings, 0 replies; 30+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-02-03 14:17 UTC (permalink / raw)
  To: Ian Rogers
  Cc: John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, Adrian Hunter, Kan Liang, Kim Phillips,
	Florian Fischer, Ravi Bangoria, Xing Zhengjun, Rob Herring,
	Kang Minchul, linux-arm-kernel, linux-perf-users, linux-kernel,
	Sandipan Das, Jing Zhang, linuxppc-dev, Kajol Jain,
	Stephane Eranian, Perry Taylor, Caleb Biggers

Em Thu, Feb 02, 2023 at 05:41:22PM -0800, Ian Rogers escreveu:
> On Thu, Feb 2, 2023 at 5:40 PM Ian Rogers <irogers@google.com> wrote:
> >
> > ARM64 overrides a weak function but a previous change had broken the
> > build.
> >
> > Fixes: 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table")
> 
> As 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table") is
> only on tmp.perf/core then it may be best to just squash this fix into
> that.

Yeah, that was my intention, I'll fold it there to keep bisection,
thanks for fixing it so fast, I'll double check on my rk3399 board and
on again on the cross-build container.

- Arnaldo

> 
> Thanks,
> Ian
> 
> > Signed-off-by: Ian Rogers <irogers@google.com>
> > ---
> >  tools/perf/arch/arm64/util/pmu.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/tools/perf/arch/arm64/util/pmu.c b/tools/perf/arch/arm64/util/pmu.c
> > index 2779840d8896..fa143acb4c8d 100644
> > --- a/tools/perf/arch/arm64/util/pmu.c
> > +++ b/tools/perf/arch/arm64/util/pmu.c
> > @@ -22,6 +22,8 @@ static struct perf_pmu *pmu__find_core_pmu(void)
> >                         return NULL;
> >
> >                 return pmu;
> > +       }
> > +       return NULL;
> >  }
> >
> >  const struct pmu_metrics_table *pmu_metrics_table__find(void)
> > --
> > 2.39.1.519.gcb327c4b5f-goog
> >

-- 

- Arnaldo

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1] perf pmu: Fix aarch64 build
@ 2023-02-03 14:17     ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 30+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-02-03 14:17 UTC (permalink / raw)
  To: Ian Rogers
  Cc: John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, Adrian Hunter, Kan Liang, Kim Phillips,
	Florian Fischer, Ravi Bangoria, Xing Zhengjun, Rob Herring,
	Kang Minchul, linux-arm-kernel, linux-perf-users, linux-kernel,
	Sandipan Das, Jing Zhang, linuxppc-dev, Kajol Jain,
	Stephane Eranian, Perry Taylor, Caleb Biggers

Em Thu, Feb 02, 2023 at 05:41:22PM -0800, Ian Rogers escreveu:
> On Thu, Feb 2, 2023 at 5:40 PM Ian Rogers <irogers@google.com> wrote:
> >
> > ARM64 overrides a weak function but a previous change had broken the
> > build.
> >
> > Fixes: 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table")
> 
> As 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table") is
> only on tmp.perf/core then it may be best to just squash this fix into
> that.

Yeah, that was my intention, I'll fold it there to keep bisection,
thanks for fixing it so fast, I'll double check on my rk3399 board and
on again on the cross-build container.

- Arnaldo

> 
> Thanks,
> Ian
> 
> > Signed-off-by: Ian Rogers <irogers@google.com>
> > ---
> >  tools/perf/arch/arm64/util/pmu.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/tools/perf/arch/arm64/util/pmu.c b/tools/perf/arch/arm64/util/pmu.c
> > index 2779840d8896..fa143acb4c8d 100644
> > --- a/tools/perf/arch/arm64/util/pmu.c
> > +++ b/tools/perf/arch/arm64/util/pmu.c
> > @@ -22,6 +22,8 @@ static struct perf_pmu *pmu__find_core_pmu(void)
> >                         return NULL;
> >
> >                 return pmu;
> > +       }
> > +       return NULL;
> >  }
> >
> >  const struct pmu_metrics_table *pmu_metrics_table__find(void)
> > --
> > 2.39.1.519.gcb327c4b5f-goog
> >

-- 

- Arnaldo

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1] perf pmu: Fix aarch64 build
@ 2023-02-03 14:17     ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 30+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-02-03 14:17 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Mark Rutland, Kang Minchul, Sandipan Das, Peter Zijlstra,
	Perry Taylor, Stephane Eranian, linux-kernel, James Clark,
	Kim Phillips, Will Deacon, Kan Liang, Rob Herring,
	Alexander Shishkin, Ingo Molnar, Xing Zhengjun, Mike Leach,
	John Garry, Kajol Jain, Namhyung Kim, Caleb Biggers,
	linux-arm-kernel, Ravi Bangoria, Florian Fischer, Adrian Hunter,
	linux-perf-users, Jiri Olsa, Leo Yan

Em Thu, Feb 02, 2023 at 05:41:22PM -0800, Ian Rogers escreveu:
> On Thu, Feb 2, 2023 at 5:40 PM Ian Rogers <irogers@google.com> wrote:
> >
> > ARM64 overrides a weak function but a previous change had broken the
> > build.
> >
> > Fixes: 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table")
> 
> As 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table") is
> only on tmp.perf/core then it may be best to just squash this fix into
> that.

Yeah, that was my intention, I'll fold it there to keep bisection,
thanks for fixing it so fast, I'll double check on my rk3399 board and
on again on the cross-build container.

- Arnaldo

> 
> Thanks,
> Ian
> 
> > Signed-off-by: Ian Rogers <irogers@google.com>
> > ---
> >  tools/perf/arch/arm64/util/pmu.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/tools/perf/arch/arm64/util/pmu.c b/tools/perf/arch/arm64/util/pmu.c
> > index 2779840d8896..fa143acb4c8d 100644
> > --- a/tools/perf/arch/arm64/util/pmu.c
> > +++ b/tools/perf/arch/arm64/util/pmu.c
> > @@ -22,6 +22,8 @@ static struct perf_pmu *pmu__find_core_pmu(void)
> >                         return NULL;
> >
> >                 return pmu;
> > +       }
> > +       return NULL;
> >  }
> >
> >  const struct pmu_metrics_table *pmu_metrics_table__find(void)
> > --
> > 2.39.1.519.gcb327c4b5f-goog
> >

-- 

- Arnaldo

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1] perf pmu: Fix aarch64 build
  2023-02-03 14:17     ` Arnaldo Carvalho de Melo
  (?)
@ 2023-02-03 14:35       ` Arnaldo Carvalho de Melo
  -1 siblings, 0 replies; 30+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-02-03 14:35 UTC (permalink / raw)
  To: Ian Rogers
  Cc: John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, Adrian Hunter, Kan Liang, Kim Phillips,
	Florian Fischer, Ravi Bangoria, Xing Zhengjun, Rob Herring,
	Kang Minchul, linux-arm-kernel, linux-perf-users, linux-kernel,
	Sandipan Das, Jing Zhang, linuxppc-dev, Kajol Jain,
	Stephane Eranian, Perry Taylor, Caleb Biggers

Em Fri, Feb 03, 2023 at 11:17:38AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Thu, Feb 02, 2023 at 05:41:22PM -0800, Ian Rogers escreveu:
> > On Thu, Feb 2, 2023 at 5:40 PM Ian Rogers <irogers@google.com> wrote:
> > >
> > > ARM64 overrides a weak function but a previous change had broken the
> > > build.
> > >
> > > Fixes: 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table")
> > 
> > As 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table") is
> > only on tmp.perf/core then it may be best to just squash this fix into
> > that.
> 
> Yeah, that was my intention, I'll fold it there to keep bisection,
> thanks for fixing it so fast, I'll double check on my rk3399 board and
> on again on the cross-build container.

Nope, that is not what I reported yesterday, trying to build it on the
rk3399 board:

acme@roc-rk3399-pc:~/git/perf$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
acme@roc-rk3399-pc:~/git/perf$

 CC      /tmp/build/perf/arch/arm64/util/pmu.o
  CC      /tmp/build/perf/bench/epoll-wait.o
arch/arm64/util/pmu.c: In function ‘pmu__find_core_pmu’:
arch/arm64/util/pmu.c:27:33: error: declaration of ‘pmu_metrics_table__find’ shadows a global declaration [-Werror=shadow]
   27 | const struct pmu_metrics_table *pmu_metrics_table__find(void)
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/arm64/util/pmu.c:5:
arch/arm64/util/../../../util/pmu.h:234:33: note: shadowed declaration is here
  234 | const struct pmu_metrics_table *pmu_metrics_table__find(void);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/util/pmu.c: In function ‘pmu_metrics_table__find’:
arch/arm64/util/pmu.c:29:26: error: declaration of ‘pmu’ shadows a previous local [-Werror=shadow]
   29 |         struct perf_pmu *pmu = pmu__find_core_pmu();
      |                          ^~~
arch/arm64/util/pmu.c:11:26: note: shadowed declaration is here
   11 |         struct perf_pmu *pmu = NULL;
      |                          ^~~
arch/arm64/util/pmu.c: In function ‘pmu__find_core_pmu’:
arch/arm64/util/pmu.c:27:1: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
   27 | const struct pmu_metrics_table *pmu_metrics_table__find(void)
      | ^~~~~
arch/arm64/util/pmu.c:37:32: error: declaration of ‘pmu_events_table__find’ shadows a global declaration [-Werror=shadow]
   37 | const struct pmu_events_table *pmu_events_table__find(void)
      |                                ^~~~~~~~~~~~~~~~~~~~~~
In file included from arch/arm64/util/pmu.c:5:
arch/arm64/util/../../../util/pmu.h:233:32: note: shadowed declaration is here
  233 | const struct pmu_events_table *pmu_events_table__find(void);
      |                                ^~~~~~~~~~~~~~~~~~~~~~
arch/arm64/util/pmu.c: In function ‘pmu_events_table__find’:
arch/arm64/util/pmu.c:39:26: error: declaration of ‘pmu’ shadows a previous local [-Werror=shadow]
   39 |         struct perf_pmu *pmu = pmu__find_core_pmu();
      |                          ^~~
arch/arm64/util/pmu.c:11:26: note: shadowed declaration is here
   11 |         struct perf_pmu *pmu = NULL;
      |                          ^~~
arch/arm64/util/pmu.c: In function ‘pmu__find_core_pmu’:
arch/arm64/util/pmu.c:47:8: error: declaration of ‘perf_pmu__cpu_slots_per_cycle’ shadows a global declaration [-Werror=shadow]
   47 | double perf_pmu__cpu_slots_per_cycle(void)
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/arm64/util/pmu.c:5:
arch/arm64/util/../../../util/pmu.h:255:8: note: shadowed declaration is here
  255 | double perf_pmu__cpu_slots_per_cycle(void);
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/util/pmu.c: In function ‘perf_pmu__cpu_slots_per_cycle’:
arch/arm64/util/pmu.c:51:26: error: declaration of ‘pmu’ shadows a previous local [-Werror=shadow]
   51 |         struct perf_pmu *pmu = pmu__find_core_pmu();
      |                          ^~~
arch/arm64/util/pmu.c:11:26: note: shadowed declaration is here
   11 |         struct perf_pmu *pmu = NULL;
      |                          ^~~
arch/arm64/util/pmu.c: In function ‘pmu__find_core_pmu’:
arch/arm64/util/pmu.c:64:1: error: expected declaration or statement at end of input
   64 | }
      | ^
At top level:
arch/arm64/util/pmu.c:47:8: error: ‘perf_pmu__cpu_slots_per_cycle’ defined but not used [-Werror=unused-function]
   47 | double perf_pmu__cpu_slots_per_cycle(void)
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/util/pmu.c:37:32: error: ‘pmu_events_table__find’ defined but not used [-Werror=unused-function]
   37 | const struct pmu_events_table *pmu_events_table__find(void)
      |                                ^~~~~~~~~~~~~~~~~~~~~~
arch/arm64/util/pmu.c:27:33: error: ‘pmu_metrics_table__find’ defined but not used [-Werror=unused-function]
   27 | const struct pmu_metrics_table *pmu_metrics_table__find(void)
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[6]: *** [/home/acme/git/perf/tools/build/Makefile.build:98: /tmp/build/perf/arch/arm64/util/pmu.o] Error 1
make[5]: *** [/home/acme/git/perf/tools/build/Makefile.build:140: util] Error 2
make[4]: *** [/home/acme/git/perf/tools/build/Makefile.build:140: arm64] Error 2
make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:140: arch] Error 2
make[3]: *** Waiting for unfinished jobs....


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1] perf pmu: Fix aarch64 build
@ 2023-02-03 14:35       ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 30+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-02-03 14:35 UTC (permalink / raw)
  To: Ian Rogers
  Cc: John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, Adrian Hunter, Kan Liang, Kim Phillips,
	Florian Fischer, Ravi Bangoria, Xing Zhengjun, Rob Herring,
	Kang Minchul, linux-arm-kernel, linux-perf-users, linux-kernel,
	Sandipan Das, Jing Zhang, linuxppc-dev, Kajol Jain,
	Stephane Eranian, Perry Taylor, Caleb Biggers

Em Fri, Feb 03, 2023 at 11:17:38AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Thu, Feb 02, 2023 at 05:41:22PM -0800, Ian Rogers escreveu:
> > On Thu, Feb 2, 2023 at 5:40 PM Ian Rogers <irogers@google.com> wrote:
> > >
> > > ARM64 overrides a weak function but a previous change had broken the
> > > build.
> > >
> > > Fixes: 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table")
> > 
> > As 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table") is
> > only on tmp.perf/core then it may be best to just squash this fix into
> > that.
> 
> Yeah, that was my intention, I'll fold it there to keep bisection,
> thanks for fixing it so fast, I'll double check on my rk3399 board and
> on again on the cross-build container.

Nope, that is not what I reported yesterday, trying to build it on the
rk3399 board:

acme@roc-rk3399-pc:~/git/perf$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
acme@roc-rk3399-pc:~/git/perf$

 CC      /tmp/build/perf/arch/arm64/util/pmu.o
  CC      /tmp/build/perf/bench/epoll-wait.o
arch/arm64/util/pmu.c: In function ‘pmu__find_core_pmu’:
arch/arm64/util/pmu.c:27:33: error: declaration of ‘pmu_metrics_table__find’ shadows a global declaration [-Werror=shadow]
   27 | const struct pmu_metrics_table *pmu_metrics_table__find(void)
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/arm64/util/pmu.c:5:
arch/arm64/util/../../../util/pmu.h:234:33: note: shadowed declaration is here
  234 | const struct pmu_metrics_table *pmu_metrics_table__find(void);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/util/pmu.c: In function ‘pmu_metrics_table__find’:
arch/arm64/util/pmu.c:29:26: error: declaration of ‘pmu’ shadows a previous local [-Werror=shadow]
   29 |         struct perf_pmu *pmu = pmu__find_core_pmu();
      |                          ^~~
arch/arm64/util/pmu.c:11:26: note: shadowed declaration is here
   11 |         struct perf_pmu *pmu = NULL;
      |                          ^~~
arch/arm64/util/pmu.c: In function ‘pmu__find_core_pmu’:
arch/arm64/util/pmu.c:27:1: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
   27 | const struct pmu_metrics_table *pmu_metrics_table__find(void)
      | ^~~~~
arch/arm64/util/pmu.c:37:32: error: declaration of ‘pmu_events_table__find’ shadows a global declaration [-Werror=shadow]
   37 | const struct pmu_events_table *pmu_events_table__find(void)
      |                                ^~~~~~~~~~~~~~~~~~~~~~
In file included from arch/arm64/util/pmu.c:5:
arch/arm64/util/../../../util/pmu.h:233:32: note: shadowed declaration is here
  233 | const struct pmu_events_table *pmu_events_table__find(void);
      |                                ^~~~~~~~~~~~~~~~~~~~~~
arch/arm64/util/pmu.c: In function ‘pmu_events_table__find’:
arch/arm64/util/pmu.c:39:26: error: declaration of ‘pmu’ shadows a previous local [-Werror=shadow]
   39 |         struct perf_pmu *pmu = pmu__find_core_pmu();
      |                          ^~~
arch/arm64/util/pmu.c:11:26: note: shadowed declaration is here
   11 |         struct perf_pmu *pmu = NULL;
      |                          ^~~
arch/arm64/util/pmu.c: In function ‘pmu__find_core_pmu’:
arch/arm64/util/pmu.c:47:8: error: declaration of ‘perf_pmu__cpu_slots_per_cycle’ shadows a global declaration [-Werror=shadow]
   47 | double perf_pmu__cpu_slots_per_cycle(void)
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/arm64/util/pmu.c:5:
arch/arm64/util/../../../util/pmu.h:255:8: note: shadowed declaration is here
  255 | double perf_pmu__cpu_slots_per_cycle(void);
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/util/pmu.c: In function ‘perf_pmu__cpu_slots_per_cycle’:
arch/arm64/util/pmu.c:51:26: error: declaration of ‘pmu’ shadows a previous local [-Werror=shadow]
   51 |         struct perf_pmu *pmu = pmu__find_core_pmu();
      |                          ^~~
arch/arm64/util/pmu.c:11:26: note: shadowed declaration is here
   11 |         struct perf_pmu *pmu = NULL;
      |                          ^~~
arch/arm64/util/pmu.c: In function ‘pmu__find_core_pmu’:
arch/arm64/util/pmu.c:64:1: error: expected declaration or statement at end of input
   64 | }
      | ^
At top level:
arch/arm64/util/pmu.c:47:8: error: ‘perf_pmu__cpu_slots_per_cycle’ defined but not used [-Werror=unused-function]
   47 | double perf_pmu__cpu_slots_per_cycle(void)
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/util/pmu.c:37:32: error: ‘pmu_events_table__find’ defined but not used [-Werror=unused-function]
   37 | const struct pmu_events_table *pmu_events_table__find(void)
      |                                ^~~~~~~~~~~~~~~~~~~~~~
arch/arm64/util/pmu.c:27:33: error: ‘pmu_metrics_table__find’ defined but not used [-Werror=unused-function]
   27 | const struct pmu_metrics_table *pmu_metrics_table__find(void)
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[6]: *** [/home/acme/git/perf/tools/build/Makefile.build:98: /tmp/build/perf/arch/arm64/util/pmu.o] Error 1
make[5]: *** [/home/acme/git/perf/tools/build/Makefile.build:140: util] Error 2
make[4]: *** [/home/acme/git/perf/tools/build/Makefile.build:140: arm64] Error 2
make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:140: arch] Error 2
make[3]: *** Waiting for unfinished jobs....


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1] perf pmu: Fix aarch64 build
@ 2023-02-03 14:35       ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 30+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-02-03 14:35 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Mark Rutland, Kang Minchul, Sandipan Das, Peter Zijlstra,
	Perry Taylor, Stephane Eranian, linux-kernel, James Clark,
	Kim Phillips, Will Deacon, Kan Liang, Rob Herring,
	Alexander Shishkin, Ingo Molnar, Xing Zhengjun, Mike Leach,
	John Garry, Kajol Jain, Namhyung Kim, Caleb Biggers,
	linux-arm-kernel, Ravi Bangoria, Florian Fischer, Adrian Hunter,
	linux-perf-users, Jiri Olsa, Leo Yan

Em Fri, Feb 03, 2023 at 11:17:38AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Thu, Feb 02, 2023 at 05:41:22PM -0800, Ian Rogers escreveu:
> > On Thu, Feb 2, 2023 at 5:40 PM Ian Rogers <irogers@google.com> wrote:
> > >
> > > ARM64 overrides a weak function but a previous change had broken the
> > > build.
> > >
> > > Fixes: 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table")
> > 
> > As 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table") is
> > only on tmp.perf/core then it may be best to just squash this fix into
> > that.
> 
> Yeah, that was my intention, I'll fold it there to keep bisection,
> thanks for fixing it so fast, I'll double check on my rk3399 board and
> on again on the cross-build container.

Nope, that is not what I reported yesterday, trying to build it on the
rk3399 board:

acme@roc-rk3399-pc:~/git/perf$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
acme@roc-rk3399-pc:~/git/perf$

 CC      /tmp/build/perf/arch/arm64/util/pmu.o
  CC      /tmp/build/perf/bench/epoll-wait.o
arch/arm64/util/pmu.c: In function ‘pmu__find_core_pmu’:
arch/arm64/util/pmu.c:27:33: error: declaration of ‘pmu_metrics_table__find’ shadows a global declaration [-Werror=shadow]
   27 | const struct pmu_metrics_table *pmu_metrics_table__find(void)
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/arm64/util/pmu.c:5:
arch/arm64/util/../../../util/pmu.h:234:33: note: shadowed declaration is here
  234 | const struct pmu_metrics_table *pmu_metrics_table__find(void);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/util/pmu.c: In function ‘pmu_metrics_table__find’:
arch/arm64/util/pmu.c:29:26: error: declaration of ‘pmu’ shadows a previous local [-Werror=shadow]
   29 |         struct perf_pmu *pmu = pmu__find_core_pmu();
      |                          ^~~
arch/arm64/util/pmu.c:11:26: note: shadowed declaration is here
   11 |         struct perf_pmu *pmu = NULL;
      |                          ^~~
arch/arm64/util/pmu.c: In function ‘pmu__find_core_pmu’:
arch/arm64/util/pmu.c:27:1: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
   27 | const struct pmu_metrics_table *pmu_metrics_table__find(void)
      | ^~~~~
arch/arm64/util/pmu.c:37:32: error: declaration of ‘pmu_events_table__find’ shadows a global declaration [-Werror=shadow]
   37 | const struct pmu_events_table *pmu_events_table__find(void)
      |                                ^~~~~~~~~~~~~~~~~~~~~~
In file included from arch/arm64/util/pmu.c:5:
arch/arm64/util/../../../util/pmu.h:233:32: note: shadowed declaration is here
  233 | const struct pmu_events_table *pmu_events_table__find(void);
      |                                ^~~~~~~~~~~~~~~~~~~~~~
arch/arm64/util/pmu.c: In function ‘pmu_events_table__find’:
arch/arm64/util/pmu.c:39:26: error: declaration of ‘pmu’ shadows a previous local [-Werror=shadow]
   39 |         struct perf_pmu *pmu = pmu__find_core_pmu();
      |                          ^~~
arch/arm64/util/pmu.c:11:26: note: shadowed declaration is here
   11 |         struct perf_pmu *pmu = NULL;
      |                          ^~~
arch/arm64/util/pmu.c: In function ‘pmu__find_core_pmu’:
arch/arm64/util/pmu.c:47:8: error: declaration of ‘perf_pmu__cpu_slots_per_cycle’ shadows a global declaration [-Werror=shadow]
   47 | double perf_pmu__cpu_slots_per_cycle(void)
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/arm64/util/pmu.c:5:
arch/arm64/util/../../../util/pmu.h:255:8: note: shadowed declaration is here
  255 | double perf_pmu__cpu_slots_per_cycle(void);
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/util/pmu.c: In function ‘perf_pmu__cpu_slots_per_cycle’:
arch/arm64/util/pmu.c:51:26: error: declaration of ‘pmu’ shadows a previous local [-Werror=shadow]
   51 |         struct perf_pmu *pmu = pmu__find_core_pmu();
      |                          ^~~
arch/arm64/util/pmu.c:11:26: note: shadowed declaration is here
   11 |         struct perf_pmu *pmu = NULL;
      |                          ^~~
arch/arm64/util/pmu.c: In function ‘pmu__find_core_pmu’:
arch/arm64/util/pmu.c:64:1: error: expected declaration or statement at end of input
   64 | }
      | ^
At top level:
arch/arm64/util/pmu.c:47:8: error: ‘perf_pmu__cpu_slots_per_cycle’ defined but not used [-Werror=unused-function]
   47 | double perf_pmu__cpu_slots_per_cycle(void)
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arm64/util/pmu.c:37:32: error: ‘pmu_events_table__find’ defined but not used [-Werror=unused-function]
   37 | const struct pmu_events_table *pmu_events_table__find(void)
      |                                ^~~~~~~~~~~~~~~~~~~~~~
arch/arm64/util/pmu.c:27:33: error: ‘pmu_metrics_table__find’ defined but not used [-Werror=unused-function]
   27 | const struct pmu_metrics_table *pmu_metrics_table__find(void)
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[6]: *** [/home/acme/git/perf/tools/build/Makefile.build:98: /tmp/build/perf/arch/arm64/util/pmu.o] Error 1
make[5]: *** [/home/acme/git/perf/tools/build/Makefile.build:140: util] Error 2
make[4]: *** [/home/acme/git/perf/tools/build/Makefile.build:140: arm64] Error 2
make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:140: arch] Error 2
make[3]: *** Waiting for unfinished jobs....


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1] perf pmu: Fix aarch64 build
  2023-02-03 14:35       ` Arnaldo Carvalho de Melo
  (?)
@ 2023-02-03 14:36         ` Arnaldo Carvalho de Melo
  -1 siblings, 0 replies; 30+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-02-03 14:36 UTC (permalink / raw)
  To: Ian Rogers
  Cc: John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, Adrian Hunter, Kan Liang, Kim Phillips,
	Florian Fischer, Ravi Bangoria, Xing Zhengjun, Rob Herring,
	Kang Minchul, linux-arm-kernel, linux-perf-users, linux-kernel,
	Sandipan Das, Jing Zhang, linuxppc-dev, Kajol Jain,
	Stephane Eranian, Perry Taylor, Caleb Biggers

Em Fri, Feb 03, 2023 at 11:35:29AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Feb 03, 2023 at 11:17:38AM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Thu, Feb 02, 2023 at 05:41:22PM -0800, Ian Rogers escreveu:
> > > On Thu, Feb 2, 2023 at 5:40 PM Ian Rogers <irogers@google.com> wrote:
> > > >
> > > > ARM64 overrides a weak function but a previous change had broken the
> > > > build.
> > > >
> > > > Fixes: 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table")
> > > 
> > > As 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table") is
> > > only on tmp.perf/core then it may be best to just squash this fix into
> > > that.
> > 
> > Yeah, that was my intention, I'll fold it there to keep bisection,
> > thanks for fixing it so fast, I'll double check on my rk3399 board and
> > on again on the cross-build container.
> 
> Nope, that is not what I reported yesterday, trying to build it on the
> rk3399 board:

Sorry, pulled the trigger too soon, this is _before_ applying your fix,
I should't multitask too much :-\

I'll double check now, 

- Arnaldo

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1] perf pmu: Fix aarch64 build
@ 2023-02-03 14:36         ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 30+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-02-03 14:36 UTC (permalink / raw)
  To: Ian Rogers
  Cc: John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, Adrian Hunter, Kan Liang, Kim Phillips,
	Florian Fischer, Ravi Bangoria, Xing Zhengjun, Rob Herring,
	Kang Minchul, linux-arm-kernel, linux-perf-users, linux-kernel,
	Sandipan Das, Jing Zhang, linuxppc-dev, Kajol Jain,
	Stephane Eranian, Perry Taylor, Caleb Biggers

Em Fri, Feb 03, 2023 at 11:35:29AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Feb 03, 2023 at 11:17:38AM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Thu, Feb 02, 2023 at 05:41:22PM -0800, Ian Rogers escreveu:
> > > On Thu, Feb 2, 2023 at 5:40 PM Ian Rogers <irogers@google.com> wrote:
> > > >
> > > > ARM64 overrides a weak function but a previous change had broken the
> > > > build.
> > > >
> > > > Fixes: 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table")
> > > 
> > > As 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table") is
> > > only on tmp.perf/core then it may be best to just squash this fix into
> > > that.
> > 
> > Yeah, that was my intention, I'll fold it there to keep bisection,
> > thanks for fixing it so fast, I'll double check on my rk3399 board and
> > on again on the cross-build container.
> 
> Nope, that is not what I reported yesterday, trying to build it on the
> rk3399 board:

Sorry, pulled the trigger too soon, this is _before_ applying your fix,
I should't multitask too much :-\

I'll double check now, 

- Arnaldo

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1] perf pmu: Fix aarch64 build
@ 2023-02-03 14:36         ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 30+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-02-03 14:36 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Mark Rutland, Kang Minchul, Sandipan Das, Peter Zijlstra,
	Perry Taylor, Stephane Eranian, linux-kernel, James Clark,
	Kim Phillips, Will Deacon, Kan Liang, Rob Herring,
	Alexander Shishkin, Ingo Molnar, Xing Zhengjun, Mike Leach,
	John Garry, Kajol Jain, Namhyung Kim, Caleb Biggers,
	linux-arm-kernel, Ravi Bangoria, Florian Fischer, Adrian Hunter,
	linux-perf-users, Jiri Olsa, Leo Yan

Em Fri, Feb 03, 2023 at 11:35:29AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Feb 03, 2023 at 11:17:38AM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Thu, Feb 02, 2023 at 05:41:22PM -0800, Ian Rogers escreveu:
> > > On Thu, Feb 2, 2023 at 5:40 PM Ian Rogers <irogers@google.com> wrote:
> > > >
> > > > ARM64 overrides a weak function but a previous change had broken the
> > > > build.
> > > >
> > > > Fixes: 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table")
> > > 
> > > As 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table") is
> > > only on tmp.perf/core then it may be best to just squash this fix into
> > > that.
> > 
> > Yeah, that was my intention, I'll fold it there to keep bisection,
> > thanks for fixing it so fast, I'll double check on my rk3399 board and
> > on again on the cross-build container.
> 
> Nope, that is not what I reported yesterday, trying to build it on the
> rk3399 board:

Sorry, pulled the trigger too soon, this is _before_ applying your fix,
I should't multitask too much :-\

I'll double check now, 

- Arnaldo

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1] perf pmu: Fix aarch64 build
  2023-02-03 14:36         ` Arnaldo Carvalho de Melo
  (?)
@ 2023-02-03 14:43           ` Arnaldo Carvalho de Melo
  -1 siblings, 0 replies; 30+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-02-03 14:43 UTC (permalink / raw)
  To: Ian Rogers
  Cc: John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, Adrian Hunter, Kan Liang, Kim Phillips,
	Florian Fischer, Ravi Bangoria, Xing Zhengjun, Rob Herring,
	Kang Minchul, linux-arm-kernel, linux-perf-users, linux-kernel,
	Sandipan Das, Jing Zhang, linuxppc-dev, Kajol Jain,
	Stephane Eranian, Perry Taylor, Caleb Biggers

Em Fri, Feb 03, 2023 at 11:36:30AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Feb 03, 2023 at 11:35:29AM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Fri, Feb 03, 2023 at 11:17:38AM -0300, Arnaldo Carvalho de Melo escreveu:
> > > Em Thu, Feb 02, 2023 at 05:41:22PM -0800, Ian Rogers escreveu:
> > > > On Thu, Feb 2, 2023 at 5:40 PM Ian Rogers <irogers@google.com> wrote:
> > > > >
> > > > > ARM64 overrides a weak function but a previous change had broken the
> > > > > build.
> > > > >
> > > > > Fixes: 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table")
> > > > 
> > > > As 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table") is
> > > > only on tmp.perf/core then it may be best to just squash this fix into
> > > > that.
> > > 
> > > Yeah, that was my intention, I'll fold it there to keep bisection,
> > > thanks for fixing it so fast, I'll double check on my rk3399 board and
> > > on again on the cross-build container.
> > 
> > Nope, that is not what I reported yesterday, trying to build it on the
> > rk3399 board:
> 
> Sorry, pulled the trigger too soon, this is _before_ applying your fix,
> I should't multitask too much :-\
> 
> I'll double check now, 

Ok, now it is exploding at:

pmu-events/pmu-events.c: In function ‘decompress’:
pmu-events/pmu-events.c:3598:11: error: ‘struct pmu_event’ has no member named ‘metric_name’
 3598 |         pe->metric_name = (*p == '\0' ? NULL : p);
      |           ^~
pmu-events/pmu-events.c:3600:11: error: ‘struct pmu_event’ has no member named ‘metric_group’
 3600 |         pe->metric_group = (*p == '\0' ? NULL : p);
      |           ^~
pmu-events/pmu-events.c:3614:11: error: ‘struct pmu_event’ has no member named ‘metric_constraint’
 3614 |         pe->metric_constraint = (*p == '\0' ? NULL : p);
      |           ^~
pmu-events/pmu-events.c:3616:11: error: ‘struct pmu_event’ has no member named ‘metric_expr’
 3616 |         pe->metric_expr = (*p == '\0' ? NULL : p);
      |           ^~
pmu-events/pmu-events.c: At top level:
pmu-events/pmu-events.c:3637:32: error: no previous prototype for ‘perf_pmu__find_table’ [-Werror=missing-prototypes]
 3637 | const struct pmu_events_table *perf_pmu__find_table(struct perf_pmu *pmu)
      |                                ^~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:98: /tmp/build/perf/pmu-events/pmu-events.o] Error 1
make[2]: *** [Makefile.perf:676: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2
make[2]: *** Waiting for unfinished jobs....
  CC      /tmp/build/perf/builtin-ftrace.o


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1] perf pmu: Fix aarch64 build
@ 2023-02-03 14:43           ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 30+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-02-03 14:43 UTC (permalink / raw)
  To: Ian Rogers
  Cc: John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, Adrian Hunter, Kan Liang, Kim Phillips,
	Florian Fischer, Ravi Bangoria, Xing Zhengjun, Rob Herring,
	Kang Minchul, linux-arm-kernel, linux-perf-users, linux-kernel,
	Sandipan Das, Jing Zhang, linuxppc-dev, Kajol Jain,
	Stephane Eranian, Perry Taylor, Caleb Biggers

Em Fri, Feb 03, 2023 at 11:36:30AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Feb 03, 2023 at 11:35:29AM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Fri, Feb 03, 2023 at 11:17:38AM -0300, Arnaldo Carvalho de Melo escreveu:
> > > Em Thu, Feb 02, 2023 at 05:41:22PM -0800, Ian Rogers escreveu:
> > > > On Thu, Feb 2, 2023 at 5:40 PM Ian Rogers <irogers@google.com> wrote:
> > > > >
> > > > > ARM64 overrides a weak function but a previous change had broken the
> > > > > build.
> > > > >
> > > > > Fixes: 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table")
> > > > 
> > > > As 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table") is
> > > > only on tmp.perf/core then it may be best to just squash this fix into
> > > > that.
> > > 
> > > Yeah, that was my intention, I'll fold it there to keep bisection,
> > > thanks for fixing it so fast, I'll double check on my rk3399 board and
> > > on again on the cross-build container.
> > 
> > Nope, that is not what I reported yesterday, trying to build it on the
> > rk3399 board:
> 
> Sorry, pulled the trigger too soon, this is _before_ applying your fix,
> I should't multitask too much :-\
> 
> I'll double check now, 

Ok, now it is exploding at:

pmu-events/pmu-events.c: In function ‘decompress’:
pmu-events/pmu-events.c:3598:11: error: ‘struct pmu_event’ has no member named ‘metric_name’
 3598 |         pe->metric_name = (*p == '\0' ? NULL : p);
      |           ^~
pmu-events/pmu-events.c:3600:11: error: ‘struct pmu_event’ has no member named ‘metric_group’
 3600 |         pe->metric_group = (*p == '\0' ? NULL : p);
      |           ^~
pmu-events/pmu-events.c:3614:11: error: ‘struct pmu_event’ has no member named ‘metric_constraint’
 3614 |         pe->metric_constraint = (*p == '\0' ? NULL : p);
      |           ^~
pmu-events/pmu-events.c:3616:11: error: ‘struct pmu_event’ has no member named ‘metric_expr’
 3616 |         pe->metric_expr = (*p == '\0' ? NULL : p);
      |           ^~
pmu-events/pmu-events.c: At top level:
pmu-events/pmu-events.c:3637:32: error: no previous prototype for ‘perf_pmu__find_table’ [-Werror=missing-prototypes]
 3637 | const struct pmu_events_table *perf_pmu__find_table(struct perf_pmu *pmu)
      |                                ^~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:98: /tmp/build/perf/pmu-events/pmu-events.o] Error 1
make[2]: *** [Makefile.perf:676: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2
make[2]: *** Waiting for unfinished jobs....
  CC      /tmp/build/perf/builtin-ftrace.o


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1] perf pmu: Fix aarch64 build
@ 2023-02-03 14:43           ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 30+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-02-03 14:43 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Mark Rutland, Kang Minchul, Sandipan Das, Peter Zijlstra,
	Perry Taylor, Stephane Eranian, linux-kernel, James Clark,
	Kim Phillips, Will Deacon, Kan Liang, Rob Herring,
	Alexander Shishkin, Ingo Molnar, Xing Zhengjun, Mike Leach,
	John Garry, Kajol Jain, Namhyung Kim, Caleb Biggers,
	linux-arm-kernel, Ravi Bangoria, Florian Fischer, Adrian Hunter,
	linux-perf-users, Jiri Olsa, Leo Yan

Em Fri, Feb 03, 2023 at 11:36:30AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Feb 03, 2023 at 11:35:29AM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Fri, Feb 03, 2023 at 11:17:38AM -0300, Arnaldo Carvalho de Melo escreveu:
> > > Em Thu, Feb 02, 2023 at 05:41:22PM -0800, Ian Rogers escreveu:
> > > > On Thu, Feb 2, 2023 at 5:40 PM Ian Rogers <irogers@google.com> wrote:
> > > > >
> > > > > ARM64 overrides a weak function but a previous change had broken the
> > > > > build.
> > > > >
> > > > > Fixes: 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table")
> > > > 
> > > > As 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table") is
> > > > only on tmp.perf/core then it may be best to just squash this fix into
> > > > that.
> > > 
> > > Yeah, that was my intention, I'll fold it there to keep bisection,
> > > thanks for fixing it so fast, I'll double check on my rk3399 board and
> > > on again on the cross-build container.
> > 
> > Nope, that is not what I reported yesterday, trying to build it on the
> > rk3399 board:
> 
> Sorry, pulled the trigger too soon, this is _before_ applying your fix,
> I should't multitask too much :-\
> 
> I'll double check now, 

Ok, now it is exploding at:

pmu-events/pmu-events.c: In function ‘decompress’:
pmu-events/pmu-events.c:3598:11: error: ‘struct pmu_event’ has no member named ‘metric_name’
 3598 |         pe->metric_name = (*p == '\0' ? NULL : p);
      |           ^~
pmu-events/pmu-events.c:3600:11: error: ‘struct pmu_event’ has no member named ‘metric_group’
 3600 |         pe->metric_group = (*p == '\0' ? NULL : p);
      |           ^~
pmu-events/pmu-events.c:3614:11: error: ‘struct pmu_event’ has no member named ‘metric_constraint’
 3614 |         pe->metric_constraint = (*p == '\0' ? NULL : p);
      |           ^~
pmu-events/pmu-events.c:3616:11: error: ‘struct pmu_event’ has no member named ‘metric_expr’
 3616 |         pe->metric_expr = (*p == '\0' ? NULL : p);
      |           ^~
pmu-events/pmu-events.c: At top level:
pmu-events/pmu-events.c:3637:32: error: no previous prototype for ‘perf_pmu__find_table’ [-Werror=missing-prototypes]
 3637 | const struct pmu_events_table *perf_pmu__find_table(struct perf_pmu *pmu)
      |                                ^~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:98: /tmp/build/perf/pmu-events/pmu-events.o] Error 1
make[2]: *** [Makefile.perf:676: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2
make[2]: *** Waiting for unfinished jobs....
  CC      /tmp/build/perf/builtin-ftrace.o


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1] perf pmu: Fix aarch64 build
  2023-02-03 14:43           ` Arnaldo Carvalho de Melo
  (?)
@ 2023-02-03 15:43             ` Arnaldo Carvalho de Melo
  -1 siblings, 0 replies; 30+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-02-03 15:43 UTC (permalink / raw)
  To: Ian Rogers
  Cc: John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, Adrian Hunter, Kan Liang, Kim Phillips,
	Florian Fischer, Ravi Bangoria, Xing Zhengjun, Rob Herring,
	Kang Minchul, linux-arm-kernel, linux-perf-users, linux-kernel,
	Sandipan Das, Jing Zhang, linuxppc-dev, Kajol Jain,
	Stephane Eranian, Perry Taylor, Caleb Biggers

Em Fri, Feb 03, 2023 at 11:43:23AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Feb 03, 2023 at 11:36:30AM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Fri, Feb 03, 2023 at 11:35:29AM -0300, Arnaldo Carvalho de Melo escreveu:
> > > Em Fri, Feb 03, 2023 at 11:17:38AM -0300, Arnaldo Carvalho de Melo escreveu:
> > > > Em Thu, Feb 02, 2023 at 05:41:22PM -0800, Ian Rogers escreveu:
> > > > > On Thu, Feb 2, 2023 at 5:40 PM Ian Rogers <irogers@google.com> wrote:
> > > > > >
> > > > > > ARM64 overrides a weak function but a previous change had broken the
> > > > > > build.
> > > > > >
> > > > > > Fixes: 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table")
> > > > > 
> > > > > As 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table") is
> > > > > only on tmp.perf/core then it may be best to just squash this fix into
> > > > > that.
> > > > 
> > > > Yeah, that was my intention, I'll fold it there to keep bisection,
> > > > thanks for fixing it so fast, I'll double check on my rk3399 board and
> > > > on again on the cross-build container.
> > > 
> > > Nope, that is not what I reported yesterday, trying to build it on the
> > > rk3399 board:
> > 
> > Sorry, pulled the trigger too soon, this is _before_ applying your fix,
> > I should't multitask too much :-\
> > 
> > I'll double check now, 
> 
> Ok, now it is exploding at:
> 
> pmu-events/pmu-events.c: In function ‘decompress’:
> pmu-events/pmu-events.c:3598:11: error: ‘struct pmu_event’ has no member named ‘metric_name’
>  3598 |         pe->metric_name = (*p == '\0' ? NULL : p);
>       |           ^~
> pmu-events/pmu-events.c:3600:11: error: ‘struct pmu_event’ has no member named ‘metric_group’
>  3600 |         pe->metric_group = (*p == '\0' ? NULL : p);
>       |           ^~
> pmu-events/pmu-events.c:3614:11: error: ‘struct pmu_event’ has no member named ‘metric_constraint’
>  3614 |         pe->metric_constraint = (*p == '\0' ? NULL : p);
>       |           ^~
> pmu-events/pmu-events.c:3616:11: error: ‘struct pmu_event’ has no member named ‘metric_expr’
>  3616 |         pe->metric_expr = (*p == '\0' ? NULL : p);
>       |           ^~
> pmu-events/pmu-events.c: At top level:
> pmu-events/pmu-events.c:3637:32: error: no previous prototype for ‘perf_pmu__find_table’ [-Werror=missing-prototypes]
>  3637 | const struct pmu_events_table *perf_pmu__find_table(struct perf_pmu *pmu)
>       |                                ^~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:98: /tmp/build/perf/pmu-events/pmu-events.o] Error 1
> make[2]: *** [Makefile.perf:676: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2
> make[2]: *** Waiting for unfinished jobs....
>   CC      /tmp/build/perf/builtin-ftrace.o

I tried bisecting, but at this cset:

acme@roc-rk3399-pc:~/git/perf$ git log --oneline -1
d22e569cd33d (HEAD) perf pmu-events: Separate the metrics from events for no jevents
acme@roc-rk3399-pc:~/git/perf$

I'm getting this:

  CC      /tmp/build/perf/pmu-events/pmu-events.o
pmu-events/pmu-events.c:3637:32: error: no previous prototype for ‘perf_pmu__find_table’ [-Werror=missing-prototypes]
 3637 | const struct pmu_events_table *perf_pmu__find_table(struct perf_pmu *pmu)
      |                                ^~~~~~~~~~~~~~~~~~~~
  CC      /tmp/build/perf/builtin-ftrace.o
  CC      /tmp/build/perf/builtin-help.o
  CC      /tmp/build/perf/builtin-buildid-list.o
cc1: all warnings being treated as errors
make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:97: /tmp/build/perf/pmu-events/pmu-events.o] Error 1
make[2]: *** [Makefile.perf:676: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2
make[2]: *** Waiting for unfinished jobs....
  CC      /tmp/build/perf/builtin-buildid-cache.o

<SNIP>

  CC      /tmp/build/perf/tests/attr.o
arch/arm64/util/pmu.c: In function ‘pmu_events_table__find’:
arch/arm64/util/pmu.c:35:24: error: implicit declaration of function ‘perf_pmu__find_table’; did you mean ‘perf_pmu__find_by_type’? [-Werror=implicit-function-declaration]
   35 |                 return perf_pmu__find_table(pmu);
      |                        ^~~~~~~~~~~~~~~~~~~~
      |                        perf_pmu__find_by_type
arch/arm64/util/pmu.c:35:24: error: returning ‘int’ from a function with return type ‘const struct pmu_events_table *’ makes pointer from integer without a cast [-Werror=int-conversion]
   35 |                 return perf_pmu__find_table(pmu);
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[6]: *** [/home/acme/git/perf/tools/build/Makefile.build:97: /tmp/build/perf/arch/arm64/util/pmu.o] Error 1
make[5]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: util] Error 2
make[4]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: arm64] Error 2
make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: arch] Error 2
make[3]: *** Waiting for unfinished jobs....
  CC      /tmp/build/perf/tests/vmlinux-kallsyms.o

-----

I'm building with:


acme@roc-rk3399-pc:~/git/perf$ alias m
alias m='make -k BUILD_BPF_SKEL=1 CORESIGHT=1 O=/tmp/build/perf -C tools/perf install-bin && git status && perf test python'
acme@roc-rk3399-pc:~/git/perf$ rm -rf /tmp/build/$(basename $(pwd)) ; mkdir -p /tmp/build/$(basename $(pwd)) ; m


To then go back to:

> pmu-events/pmu-events.c:3616:11: error: ‘struct pmu_event’ has no member named ‘metric_expr’


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1] perf pmu: Fix aarch64 build
@ 2023-02-03 15:43             ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 30+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-02-03 15:43 UTC (permalink / raw)
  To: Ian Rogers
  Cc: John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, Adrian Hunter, Kan Liang, Kim Phillips,
	Florian Fischer, Ravi Bangoria, Xing Zhengjun, Rob Herring,
	Kang Minchul, linux-arm-kernel, linux-perf-users, linux-kernel,
	Sandipan Das, Jing Zhang, linuxppc-dev, Kajol Jain,
	Stephane Eranian, Perry Taylor, Caleb Biggers

Em Fri, Feb 03, 2023 at 11:43:23AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Feb 03, 2023 at 11:36:30AM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Fri, Feb 03, 2023 at 11:35:29AM -0300, Arnaldo Carvalho de Melo escreveu:
> > > Em Fri, Feb 03, 2023 at 11:17:38AM -0300, Arnaldo Carvalho de Melo escreveu:
> > > > Em Thu, Feb 02, 2023 at 05:41:22PM -0800, Ian Rogers escreveu:
> > > > > On Thu, Feb 2, 2023 at 5:40 PM Ian Rogers <irogers@google.com> wrote:
> > > > > >
> > > > > > ARM64 overrides a weak function but a previous change had broken the
> > > > > > build.
> > > > > >
> > > > > > Fixes: 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table")
> > > > > 
> > > > > As 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table") is
> > > > > only on tmp.perf/core then it may be best to just squash this fix into
> > > > > that.
> > > > 
> > > > Yeah, that was my intention, I'll fold it there to keep bisection,
> > > > thanks for fixing it so fast, I'll double check on my rk3399 board and
> > > > on again on the cross-build container.
> > > 
> > > Nope, that is not what I reported yesterday, trying to build it on the
> > > rk3399 board:
> > 
> > Sorry, pulled the trigger too soon, this is _before_ applying your fix,
> > I should't multitask too much :-\
> > 
> > I'll double check now, 
> 
> Ok, now it is exploding at:
> 
> pmu-events/pmu-events.c: In function ‘decompress’:
> pmu-events/pmu-events.c:3598:11: error: ‘struct pmu_event’ has no member named ‘metric_name’
>  3598 |         pe->metric_name = (*p == '\0' ? NULL : p);
>       |           ^~
> pmu-events/pmu-events.c:3600:11: error: ‘struct pmu_event’ has no member named ‘metric_group’
>  3600 |         pe->metric_group = (*p == '\0' ? NULL : p);
>       |           ^~
> pmu-events/pmu-events.c:3614:11: error: ‘struct pmu_event’ has no member named ‘metric_constraint’
>  3614 |         pe->metric_constraint = (*p == '\0' ? NULL : p);
>       |           ^~
> pmu-events/pmu-events.c:3616:11: error: ‘struct pmu_event’ has no member named ‘metric_expr’
>  3616 |         pe->metric_expr = (*p == '\0' ? NULL : p);
>       |           ^~
> pmu-events/pmu-events.c: At top level:
> pmu-events/pmu-events.c:3637:32: error: no previous prototype for ‘perf_pmu__find_table’ [-Werror=missing-prototypes]
>  3637 | const struct pmu_events_table *perf_pmu__find_table(struct perf_pmu *pmu)
>       |                                ^~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:98: /tmp/build/perf/pmu-events/pmu-events.o] Error 1
> make[2]: *** [Makefile.perf:676: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2
> make[2]: *** Waiting for unfinished jobs....
>   CC      /tmp/build/perf/builtin-ftrace.o

I tried bisecting, but at this cset:

acme@roc-rk3399-pc:~/git/perf$ git log --oneline -1
d22e569cd33d (HEAD) perf pmu-events: Separate the metrics from events for no jevents
acme@roc-rk3399-pc:~/git/perf$

I'm getting this:

  CC      /tmp/build/perf/pmu-events/pmu-events.o
pmu-events/pmu-events.c:3637:32: error: no previous prototype for ‘perf_pmu__find_table’ [-Werror=missing-prototypes]
 3637 | const struct pmu_events_table *perf_pmu__find_table(struct perf_pmu *pmu)
      |                                ^~~~~~~~~~~~~~~~~~~~
  CC      /tmp/build/perf/builtin-ftrace.o
  CC      /tmp/build/perf/builtin-help.o
  CC      /tmp/build/perf/builtin-buildid-list.o
cc1: all warnings being treated as errors
make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:97: /tmp/build/perf/pmu-events/pmu-events.o] Error 1
make[2]: *** [Makefile.perf:676: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2
make[2]: *** Waiting for unfinished jobs....
  CC      /tmp/build/perf/builtin-buildid-cache.o

<SNIP>

  CC      /tmp/build/perf/tests/attr.o
arch/arm64/util/pmu.c: In function ‘pmu_events_table__find’:
arch/arm64/util/pmu.c:35:24: error: implicit declaration of function ‘perf_pmu__find_table’; did you mean ‘perf_pmu__find_by_type’? [-Werror=implicit-function-declaration]
   35 |                 return perf_pmu__find_table(pmu);
      |                        ^~~~~~~~~~~~~~~~~~~~
      |                        perf_pmu__find_by_type
arch/arm64/util/pmu.c:35:24: error: returning ‘int’ from a function with return type ‘const struct pmu_events_table *’ makes pointer from integer without a cast [-Werror=int-conversion]
   35 |                 return perf_pmu__find_table(pmu);
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[6]: *** [/home/acme/git/perf/tools/build/Makefile.build:97: /tmp/build/perf/arch/arm64/util/pmu.o] Error 1
make[5]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: util] Error 2
make[4]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: arm64] Error 2
make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: arch] Error 2
make[3]: *** Waiting for unfinished jobs....
  CC      /tmp/build/perf/tests/vmlinux-kallsyms.o

-----

I'm building with:


acme@roc-rk3399-pc:~/git/perf$ alias m
alias m='make -k BUILD_BPF_SKEL=1 CORESIGHT=1 O=/tmp/build/perf -C tools/perf install-bin && git status && perf test python'
acme@roc-rk3399-pc:~/git/perf$ rm -rf /tmp/build/$(basename $(pwd)) ; mkdir -p /tmp/build/$(basename $(pwd)) ; m


To then go back to:

> pmu-events/pmu-events.c:3616:11: error: ‘struct pmu_event’ has no member named ‘metric_expr’


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1] perf pmu: Fix aarch64 build
@ 2023-02-03 15:43             ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 30+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-02-03 15:43 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Mark Rutland, Kang Minchul, Sandipan Das, Peter Zijlstra,
	Perry Taylor, Stephane Eranian, linux-kernel, James Clark,
	Kim Phillips, Will Deacon, Kan Liang, Rob Herring,
	Alexander Shishkin, Ingo Molnar, Xing Zhengjun, Mike Leach,
	John Garry, Kajol Jain, Namhyung Kim, Caleb Biggers,
	linux-arm-kernel, Ravi Bangoria, Florian Fischer, Adrian Hunter,
	linux-perf-users, Jiri Olsa, Leo Yan

Em Fri, Feb 03, 2023 at 11:43:23AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Feb 03, 2023 at 11:36:30AM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Fri, Feb 03, 2023 at 11:35:29AM -0300, Arnaldo Carvalho de Melo escreveu:
> > > Em Fri, Feb 03, 2023 at 11:17:38AM -0300, Arnaldo Carvalho de Melo escreveu:
> > > > Em Thu, Feb 02, 2023 at 05:41:22PM -0800, Ian Rogers escreveu:
> > > > > On Thu, Feb 2, 2023 at 5:40 PM Ian Rogers <irogers@google.com> wrote:
> > > > > >
> > > > > > ARM64 overrides a weak function but a previous change had broken the
> > > > > > build.
> > > > > >
> > > > > > Fixes: 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table")
> > > > > 
> > > > > As 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table") is
> > > > > only on tmp.perf/core then it may be best to just squash this fix into
> > > > > that.
> > > > 
> > > > Yeah, that was my intention, I'll fold it there to keep bisection,
> > > > thanks for fixing it so fast, I'll double check on my rk3399 board and
> > > > on again on the cross-build container.
> > > 
> > > Nope, that is not what I reported yesterday, trying to build it on the
> > > rk3399 board:
> > 
> > Sorry, pulled the trigger too soon, this is _before_ applying your fix,
> > I should't multitask too much :-\
> > 
> > I'll double check now, 
> 
> Ok, now it is exploding at:
> 
> pmu-events/pmu-events.c: In function ‘decompress’:
> pmu-events/pmu-events.c:3598:11: error: ‘struct pmu_event’ has no member named ‘metric_name’
>  3598 |         pe->metric_name = (*p == '\0' ? NULL : p);
>       |           ^~
> pmu-events/pmu-events.c:3600:11: error: ‘struct pmu_event’ has no member named ‘metric_group’
>  3600 |         pe->metric_group = (*p == '\0' ? NULL : p);
>       |           ^~
> pmu-events/pmu-events.c:3614:11: error: ‘struct pmu_event’ has no member named ‘metric_constraint’
>  3614 |         pe->metric_constraint = (*p == '\0' ? NULL : p);
>       |           ^~
> pmu-events/pmu-events.c:3616:11: error: ‘struct pmu_event’ has no member named ‘metric_expr’
>  3616 |         pe->metric_expr = (*p == '\0' ? NULL : p);
>       |           ^~
> pmu-events/pmu-events.c: At top level:
> pmu-events/pmu-events.c:3637:32: error: no previous prototype for ‘perf_pmu__find_table’ [-Werror=missing-prototypes]
>  3637 | const struct pmu_events_table *perf_pmu__find_table(struct perf_pmu *pmu)
>       |                                ^~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:98: /tmp/build/perf/pmu-events/pmu-events.o] Error 1
> make[2]: *** [Makefile.perf:676: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2
> make[2]: *** Waiting for unfinished jobs....
>   CC      /tmp/build/perf/builtin-ftrace.o

I tried bisecting, but at this cset:

acme@roc-rk3399-pc:~/git/perf$ git log --oneline -1
d22e569cd33d (HEAD) perf pmu-events: Separate the metrics from events for no jevents
acme@roc-rk3399-pc:~/git/perf$

I'm getting this:

  CC      /tmp/build/perf/pmu-events/pmu-events.o
pmu-events/pmu-events.c:3637:32: error: no previous prototype for ‘perf_pmu__find_table’ [-Werror=missing-prototypes]
 3637 | const struct pmu_events_table *perf_pmu__find_table(struct perf_pmu *pmu)
      |                                ^~~~~~~~~~~~~~~~~~~~
  CC      /tmp/build/perf/builtin-ftrace.o
  CC      /tmp/build/perf/builtin-help.o
  CC      /tmp/build/perf/builtin-buildid-list.o
cc1: all warnings being treated as errors
make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:97: /tmp/build/perf/pmu-events/pmu-events.o] Error 1
make[2]: *** [Makefile.perf:676: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2
make[2]: *** Waiting for unfinished jobs....
  CC      /tmp/build/perf/builtin-buildid-cache.o

<SNIP>

  CC      /tmp/build/perf/tests/attr.o
arch/arm64/util/pmu.c: In function ‘pmu_events_table__find’:
arch/arm64/util/pmu.c:35:24: error: implicit declaration of function ‘perf_pmu__find_table’; did you mean ‘perf_pmu__find_by_type’? [-Werror=implicit-function-declaration]
   35 |                 return perf_pmu__find_table(pmu);
      |                        ^~~~~~~~~~~~~~~~~~~~
      |                        perf_pmu__find_by_type
arch/arm64/util/pmu.c:35:24: error: returning ‘int’ from a function with return type ‘const struct pmu_events_table *’ makes pointer from integer without a cast [-Werror=int-conversion]
   35 |                 return perf_pmu__find_table(pmu);
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[6]: *** [/home/acme/git/perf/tools/build/Makefile.build:97: /tmp/build/perf/arch/arm64/util/pmu.o] Error 1
make[5]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: util] Error 2
make[4]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: arm64] Error 2
make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: arch] Error 2
make[3]: *** Waiting for unfinished jobs....
  CC      /tmp/build/perf/tests/vmlinux-kallsyms.o

-----

I'm building with:


acme@roc-rk3399-pc:~/git/perf$ alias m
alias m='make -k BUILD_BPF_SKEL=1 CORESIGHT=1 O=/tmp/build/perf -C tools/perf install-bin && git status && perf test python'
acme@roc-rk3399-pc:~/git/perf$ rm -rf /tmp/build/$(basename $(pwd)) ; mkdir -p /tmp/build/$(basename $(pwd)) ; m


To then go back to:

> pmu-events/pmu-events.c:3616:11: error: ‘struct pmu_event’ has no member named ‘metric_expr’


^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1] perf pmu: Fix aarch64 build
  2023-02-03 15:43             ` Arnaldo Carvalho de Melo
  (?)
@ 2023-02-03 16:02               ` Arnaldo Carvalho de Melo
  -1 siblings, 0 replies; 30+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-02-03 16:02 UTC (permalink / raw)
  To: Ian Rogers
  Cc: John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, Adrian Hunter, Kan Liang, Kim Phillips,
	Florian Fischer, Ravi Bangoria, Xing Zhengjun, Rob Herring,
	Kang Minchul, linux-arm-kernel, linux-perf-users, linux-kernel,
	Sandipan Das, Jing Zhang, linuxppc-dev, Kajol Jain,
	Stephane Eranian, Perry Taylor, Caleb Biggers

Em Fri, Feb 03, 2023 at 12:43:48PM -0300, Arnaldo Carvalho de Melo escreveu:
> I tried bisecting, but at this cset:
> 
> acme@roc-rk3399-pc:~/git/perf$ git log --oneline -1
> d22e569cd33d (HEAD) perf pmu-events: Separate the metrics from events for no jevents
> acme@roc-rk3399-pc:~/git/perf$
> 
> I'm getting this:
> 
>   CC      /tmp/build/perf/pmu-events/pmu-events.o
> pmu-events/pmu-events.c:3637:32: error: no previous prototype for ‘perf_pmu__find_table’ [-Werror=missing-prototypes]
>  3637 | const struct pmu_events_table *perf_pmu__find_table(struct perf_pmu *pmu)
>       |                                ^~~~~~~~~~~~~~~~~~~~
>   CC      /tmp/build/perf/builtin-ftrace.o
>   CC      /tmp/build/perf/builtin-help.o
>   CC      /tmp/build/perf/builtin-buildid-list.o
> cc1: all warnings being treated as errors
> make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:97: /tmp/build/perf/pmu-events/pmu-events.o] Error 1
> make[2]: *** [Makefile.perf:676: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2
> make[2]: *** Waiting for unfinished jobs....
>   CC      /tmp/build/perf/builtin-buildid-cache.o
> 
> <SNIP>
> 
>   CC      /tmp/build/perf/tests/attr.o
> arch/arm64/util/pmu.c: In function ‘pmu_events_table__find’:
> arch/arm64/util/pmu.c:35:24: error: implicit declaration of function ‘perf_pmu__find_table’; did you mean ‘perf_pmu__find_by_type’? [-Werror=implicit-function-declaration]
>    35 |                 return perf_pmu__find_table(pmu);
>       |                        ^~~~~~~~~~~~~~~~~~~~
>       |                        perf_pmu__find_by_type
> arch/arm64/util/pmu.c:35:24: error: returning ‘int’ from a function with return type ‘const struct pmu_events_table *’ makes pointer from integer without a cast [-Werror=int-conversion]
>    35 |                 return perf_pmu__find_table(pmu);
>       |                        ^~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> make[6]: *** [/home/acme/git/perf/tools/build/Makefile.build:97: /tmp/build/perf/arch/arm64/util/pmu.o] Error 1
> make[5]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: util] Error 2
> make[4]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: arm64] Error 2
> make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: arch] Error 2
> make[3]: *** Waiting for unfinished jobs....
>   CC      /tmp/build/perf/tests/vmlinux-kallsyms.o
> 
> -----
> 
> I'm building with:

So:

acme@roc-rk3399-pc:~/git/perf$ find tools/perf/ -name "*.[ch]" | xargs grep -w perf_pmu__find_table
tools/perf/arch/arm64/util/pmu.c:		return perf_pmu__find_table(pmu);
tools/perf/pmu-events/pmu-events.c:const struct pmu_events_table *perf_pmu__find_table(struct perf_pmu *pmu)
acme@roc-rk3399-pc:~/git/perf$
acme@roc-rk3399-pc:~/git/perf$ git log --oneline -1
d22e569cd33d (HEAD) perf pmu-events: Separate the metrics from events for no jevents
acme@roc-rk3399-pc:~/git/perf$

Tring to fix...
 
> 
> acme@roc-rk3399-pc:~/git/perf$ alias m
> alias m='make -k BUILD_BPF_SKEL=1 CORESIGHT=1 O=/tmp/build/perf -C tools/perf install-bin && git status && perf test python'
> acme@roc-rk3399-pc:~/git/perf$ rm -rf /tmp/build/$(basename $(pwd)) ; mkdir -p /tmp/build/$(basename $(pwd)) ; m
 
> 
> To then go back to:
> 
> > pmu-events/pmu-events.c:3616:11: error: ‘struct pmu_event’ has no member named ‘metric_expr’
> 

-- 

- Arnaldo

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1] perf pmu: Fix aarch64 build
@ 2023-02-03 16:02               ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 30+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-02-03 16:02 UTC (permalink / raw)
  To: Ian Rogers
  Cc: John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, Adrian Hunter, Kan Liang, Kim Phillips,
	Florian Fischer, Ravi Bangoria, Xing Zhengjun, Rob Herring,
	Kang Minchul, linux-arm-kernel, linux-perf-users, linux-kernel,
	Sandipan Das, Jing Zhang, linuxppc-dev, Kajol Jain,
	Stephane Eranian, Perry Taylor, Caleb Biggers

Em Fri, Feb 03, 2023 at 12:43:48PM -0300, Arnaldo Carvalho de Melo escreveu:
> I tried bisecting, but at this cset:
> 
> acme@roc-rk3399-pc:~/git/perf$ git log --oneline -1
> d22e569cd33d (HEAD) perf pmu-events: Separate the metrics from events for no jevents
> acme@roc-rk3399-pc:~/git/perf$
> 
> I'm getting this:
> 
>   CC      /tmp/build/perf/pmu-events/pmu-events.o
> pmu-events/pmu-events.c:3637:32: error: no previous prototype for ‘perf_pmu__find_table’ [-Werror=missing-prototypes]
>  3637 | const struct pmu_events_table *perf_pmu__find_table(struct perf_pmu *pmu)
>       |                                ^~~~~~~~~~~~~~~~~~~~
>   CC      /tmp/build/perf/builtin-ftrace.o
>   CC      /tmp/build/perf/builtin-help.o
>   CC      /tmp/build/perf/builtin-buildid-list.o
> cc1: all warnings being treated as errors
> make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:97: /tmp/build/perf/pmu-events/pmu-events.o] Error 1
> make[2]: *** [Makefile.perf:676: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2
> make[2]: *** Waiting for unfinished jobs....
>   CC      /tmp/build/perf/builtin-buildid-cache.o
> 
> <SNIP>
> 
>   CC      /tmp/build/perf/tests/attr.o
> arch/arm64/util/pmu.c: In function ‘pmu_events_table__find’:
> arch/arm64/util/pmu.c:35:24: error: implicit declaration of function ‘perf_pmu__find_table’; did you mean ‘perf_pmu__find_by_type’? [-Werror=implicit-function-declaration]
>    35 |                 return perf_pmu__find_table(pmu);
>       |                        ^~~~~~~~~~~~~~~~~~~~
>       |                        perf_pmu__find_by_type
> arch/arm64/util/pmu.c:35:24: error: returning ‘int’ from a function with return type ‘const struct pmu_events_table *’ makes pointer from integer without a cast [-Werror=int-conversion]
>    35 |                 return perf_pmu__find_table(pmu);
>       |                        ^~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> make[6]: *** [/home/acme/git/perf/tools/build/Makefile.build:97: /tmp/build/perf/arch/arm64/util/pmu.o] Error 1
> make[5]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: util] Error 2
> make[4]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: arm64] Error 2
> make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: arch] Error 2
> make[3]: *** Waiting for unfinished jobs....
>   CC      /tmp/build/perf/tests/vmlinux-kallsyms.o
> 
> -----
> 
> I'm building with:

So:

acme@roc-rk3399-pc:~/git/perf$ find tools/perf/ -name "*.[ch]" | xargs grep -w perf_pmu__find_table
tools/perf/arch/arm64/util/pmu.c:		return perf_pmu__find_table(pmu);
tools/perf/pmu-events/pmu-events.c:const struct pmu_events_table *perf_pmu__find_table(struct perf_pmu *pmu)
acme@roc-rk3399-pc:~/git/perf$
acme@roc-rk3399-pc:~/git/perf$ git log --oneline -1
d22e569cd33d (HEAD) perf pmu-events: Separate the metrics from events for no jevents
acme@roc-rk3399-pc:~/git/perf$

Tring to fix...
 
> 
> acme@roc-rk3399-pc:~/git/perf$ alias m
> alias m='make -k BUILD_BPF_SKEL=1 CORESIGHT=1 O=/tmp/build/perf -C tools/perf install-bin && git status && perf test python'
> acme@roc-rk3399-pc:~/git/perf$ rm -rf /tmp/build/$(basename $(pwd)) ; mkdir -p /tmp/build/$(basename $(pwd)) ; m
 
> 
> To then go back to:
> 
> > pmu-events/pmu-events.c:3616:11: error: ‘struct pmu_event’ has no member named ‘metric_expr’
> 

-- 

- Arnaldo

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1] perf pmu: Fix aarch64 build
@ 2023-02-03 16:02               ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 30+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-02-03 16:02 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Mark Rutland, Kang Minchul, Sandipan Das, Peter Zijlstra,
	Perry Taylor, Stephane Eranian, linux-kernel, James Clark,
	Kim Phillips, Will Deacon, Kan Liang, Rob Herring,
	Alexander Shishkin, Ingo Molnar, Xing Zhengjun, Mike Leach,
	John Garry, Kajol Jain, Namhyung Kim, Caleb Biggers,
	linux-arm-kernel, Ravi Bangoria, Florian Fischer, Adrian Hunter,
	linux-perf-users, Jiri Olsa, Leo Yan

Em Fri, Feb 03, 2023 at 12:43:48PM -0300, Arnaldo Carvalho de Melo escreveu:
> I tried bisecting, but at this cset:
> 
> acme@roc-rk3399-pc:~/git/perf$ git log --oneline -1
> d22e569cd33d (HEAD) perf pmu-events: Separate the metrics from events for no jevents
> acme@roc-rk3399-pc:~/git/perf$
> 
> I'm getting this:
> 
>   CC      /tmp/build/perf/pmu-events/pmu-events.o
> pmu-events/pmu-events.c:3637:32: error: no previous prototype for ‘perf_pmu__find_table’ [-Werror=missing-prototypes]
>  3637 | const struct pmu_events_table *perf_pmu__find_table(struct perf_pmu *pmu)
>       |                                ^~~~~~~~~~~~~~~~~~~~
>   CC      /tmp/build/perf/builtin-ftrace.o
>   CC      /tmp/build/perf/builtin-help.o
>   CC      /tmp/build/perf/builtin-buildid-list.o
> cc1: all warnings being treated as errors
> make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:97: /tmp/build/perf/pmu-events/pmu-events.o] Error 1
> make[2]: *** [Makefile.perf:676: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2
> make[2]: *** Waiting for unfinished jobs....
>   CC      /tmp/build/perf/builtin-buildid-cache.o
> 
> <SNIP>
> 
>   CC      /tmp/build/perf/tests/attr.o
> arch/arm64/util/pmu.c: In function ‘pmu_events_table__find’:
> arch/arm64/util/pmu.c:35:24: error: implicit declaration of function ‘perf_pmu__find_table’; did you mean ‘perf_pmu__find_by_type’? [-Werror=implicit-function-declaration]
>    35 |                 return perf_pmu__find_table(pmu);
>       |                        ^~~~~~~~~~~~~~~~~~~~
>       |                        perf_pmu__find_by_type
> arch/arm64/util/pmu.c:35:24: error: returning ‘int’ from a function with return type ‘const struct pmu_events_table *’ makes pointer from integer without a cast [-Werror=int-conversion]
>    35 |                 return perf_pmu__find_table(pmu);
>       |                        ^~~~~~~~~~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> make[6]: *** [/home/acme/git/perf/tools/build/Makefile.build:97: /tmp/build/perf/arch/arm64/util/pmu.o] Error 1
> make[5]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: util] Error 2
> make[4]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: arm64] Error 2
> make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: arch] Error 2
> make[3]: *** Waiting for unfinished jobs....
>   CC      /tmp/build/perf/tests/vmlinux-kallsyms.o
> 
> -----
> 
> I'm building with:

So:

acme@roc-rk3399-pc:~/git/perf$ find tools/perf/ -name "*.[ch]" | xargs grep -w perf_pmu__find_table
tools/perf/arch/arm64/util/pmu.c:		return perf_pmu__find_table(pmu);
tools/perf/pmu-events/pmu-events.c:const struct pmu_events_table *perf_pmu__find_table(struct perf_pmu *pmu)
acme@roc-rk3399-pc:~/git/perf$
acme@roc-rk3399-pc:~/git/perf$ git log --oneline -1
d22e569cd33d (HEAD) perf pmu-events: Separate the metrics from events for no jevents
acme@roc-rk3399-pc:~/git/perf$

Tring to fix...
 
> 
> acme@roc-rk3399-pc:~/git/perf$ alias m
> alias m='make -k BUILD_BPF_SKEL=1 CORESIGHT=1 O=/tmp/build/perf -C tools/perf install-bin && git status && perf test python'
> acme@roc-rk3399-pc:~/git/perf$ rm -rf /tmp/build/$(basename $(pwd)) ; mkdir -p /tmp/build/$(basename $(pwd)) ; m
 
> 
> To then go back to:
> 
> > pmu-events/pmu-events.c:3616:11: error: ‘struct pmu_event’ has no member named ‘metric_expr’
> 

-- 

- Arnaldo

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1] perf pmu: Fix aarch64 build
  2023-02-03 16:02               ` Arnaldo Carvalho de Melo
  (?)
@ 2023-02-03 16:56                 ` Arnaldo Carvalho de Melo
  -1 siblings, 0 replies; 30+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-02-03 16:56 UTC (permalink / raw)
  To: Ian Rogers
  Cc: John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, Adrian Hunter, Kan Liang, Kim Phillips,
	Florian Fischer, Ravi Bangoria, Xing Zhengjun, Rob Herring,
	Kang Minchul, linux-arm-kernel, linux-perf-users, linux-kernel,
	Sandipan Das, Jing Zhang, linuxppc-dev, Kajol Jain,
	Stephane Eranian, Perry Taylor, Caleb Biggers

Em Fri, Feb 03, 2023 at 01:02:02PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Feb 03, 2023 at 12:43:48PM -0300, Arnaldo Carvalho de Melo escreveu:
> > I tried bisecting, but at this cset:
> > 
> > acme@roc-rk3399-pc:~/git/perf$ git log --oneline -1
> > d22e569cd33d (HEAD) perf pmu-events: Separate the metrics from events for no jevents
> > acme@roc-rk3399-pc:~/git/perf$
> > 
> > I'm getting this:
> > 
> >   CC      /tmp/build/perf/pmu-events/pmu-events.o
> > pmu-events/pmu-events.c:3637:32: error: no previous prototype for ‘perf_pmu__find_table’ [-Werror=missing-prototypes]
> >  3637 | const struct pmu_events_table *perf_pmu__find_table(struct perf_pmu *pmu)
> >       |                                ^~~~~~~~~~~~~~~~~~~~
> >   CC      /tmp/build/perf/builtin-ftrace.o
> >   CC      /tmp/build/perf/builtin-help.o
> >   CC      /tmp/build/perf/builtin-buildid-list.o
> > cc1: all warnings being treated as errors
> > make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:97: /tmp/build/perf/pmu-events/pmu-events.o] Error 1
> > make[2]: *** [Makefile.perf:676: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2
> > make[2]: *** Waiting for unfinished jobs....
> >   CC      /tmp/build/perf/builtin-buildid-cache.o
> > 
> > <SNIP>
> > 
> >   CC      /tmp/build/perf/tests/attr.o
> > arch/arm64/util/pmu.c: In function ‘pmu_events_table__find’:
> > arch/arm64/util/pmu.c:35:24: error: implicit declaration of function ‘perf_pmu__find_table’; did you mean ‘perf_pmu__find_by_type’? [-Werror=implicit-function-declaration]
> >    35 |                 return perf_pmu__find_table(pmu);
> >       |                        ^~~~~~~~~~~~~~~~~~~~
> >       |                        perf_pmu__find_by_type
> > arch/arm64/util/pmu.c:35:24: error: returning ‘int’ from a function with return type ‘const struct pmu_events_table *’ makes pointer from integer without a cast [-Werror=int-conversion]
> >    35 |                 return perf_pmu__find_table(pmu);
> >       |                        ^~~~~~~~~~~~~~~~~~~~~~~~~
> > cc1: all warnings being treated as errors
> > make[6]: *** [/home/acme/git/perf/tools/build/Makefile.build:97: /tmp/build/perf/arch/arm64/util/pmu.o] Error 1
> > make[5]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: util] Error 2
> > make[4]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: arm64] Error 2
> > make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: arch] Error 2
> > make[3]: *** Waiting for unfinished jobs....
> >   CC      /tmp/build/perf/tests/vmlinux-kallsyms.o
> > 
> > -----
> > 
> > I'm building with:
> 
> So:
> 
> acme@roc-rk3399-pc:~/git/perf$ find tools/perf/ -name "*.[ch]" | xargs grep -w perf_pmu__find_table
> tools/perf/arch/arm64/util/pmu.c:		return perf_pmu__find_table(pmu);
> tools/perf/pmu-events/pmu-events.c:const struct pmu_events_table *perf_pmu__find_table(struct perf_pmu *pmu)
> acme@roc-rk3399-pc:~/git/perf$
> acme@roc-rk3399-pc:~/git/perf$ git log --oneline -1
> d22e569cd33d (HEAD) perf pmu-events: Separate the metrics from events for no jevents
> acme@roc-rk3399-pc:~/git/perf$
> 
> Tring to fix...

tools/perf/pmu-events/pmu-events.c was a leftover from a previous build,
strange as I build using O=, not to clutter the source dir, so perhaps
handling that is missing, I'll check.

Fixed aarch64 specific one with:

diff --git a/tools/perf/arch/arm64/util/pmu.c b/tools/perf/arch/arm64/util/pmu.c
index 801bf52e2ea6..b4eaf00ec5a8 100644
--- a/tools/perf/arch/arm64/util/pmu.c
+++ b/tools/perf/arch/arm64/util/pmu.c
@@ -32,7 +32,7 @@ const struct pmu_events_table *pmu_events_table__find(void)
 	struct perf_pmu *pmu = pmu__find_core_pmu();
 
 	if (pmu)
-		return perf_pmu__find_table(pmu);
+		return perf_pmu__find_events_table(pmu);
 
 	return NULL;
 }


---

Continuing...

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* Re: [PATCH v1] perf pmu: Fix aarch64 build
@ 2023-02-03 16:56                 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 30+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-02-03 16:56 UTC (permalink / raw)
  To: Ian Rogers
  Cc: John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, Adrian Hunter, Kan Liang, Kim Phillips,
	Florian Fischer, Ravi Bangoria, Xing Zhengjun, Rob Herring,
	Kang Minchul, linux-arm-kernel, linux-perf-users, linux-kernel,
	Sandipan Das, Jing Zhang, linuxppc-dev, Kajol Jain,
	Stephane Eranian, Perry Taylor, Caleb Biggers

Em Fri, Feb 03, 2023 at 01:02:02PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Feb 03, 2023 at 12:43:48PM -0300, Arnaldo Carvalho de Melo escreveu:
> > I tried bisecting, but at this cset:
> > 
> > acme@roc-rk3399-pc:~/git/perf$ git log --oneline -1
> > d22e569cd33d (HEAD) perf pmu-events: Separate the metrics from events for no jevents
> > acme@roc-rk3399-pc:~/git/perf$
> > 
> > I'm getting this:
> > 
> >   CC      /tmp/build/perf/pmu-events/pmu-events.o
> > pmu-events/pmu-events.c:3637:32: error: no previous prototype for ‘perf_pmu__find_table’ [-Werror=missing-prototypes]
> >  3637 | const struct pmu_events_table *perf_pmu__find_table(struct perf_pmu *pmu)
> >       |                                ^~~~~~~~~~~~~~~~~~~~
> >   CC      /tmp/build/perf/builtin-ftrace.o
> >   CC      /tmp/build/perf/builtin-help.o
> >   CC      /tmp/build/perf/builtin-buildid-list.o
> > cc1: all warnings being treated as errors
> > make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:97: /tmp/build/perf/pmu-events/pmu-events.o] Error 1
> > make[2]: *** [Makefile.perf:676: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2
> > make[2]: *** Waiting for unfinished jobs....
> >   CC      /tmp/build/perf/builtin-buildid-cache.o
> > 
> > <SNIP>
> > 
> >   CC      /tmp/build/perf/tests/attr.o
> > arch/arm64/util/pmu.c: In function ‘pmu_events_table__find’:
> > arch/arm64/util/pmu.c:35:24: error: implicit declaration of function ‘perf_pmu__find_table’; did you mean ‘perf_pmu__find_by_type’? [-Werror=implicit-function-declaration]
> >    35 |                 return perf_pmu__find_table(pmu);
> >       |                        ^~~~~~~~~~~~~~~~~~~~
> >       |                        perf_pmu__find_by_type
> > arch/arm64/util/pmu.c:35:24: error: returning ‘int’ from a function with return type ‘const struct pmu_events_table *’ makes pointer from integer without a cast [-Werror=int-conversion]
> >    35 |                 return perf_pmu__find_table(pmu);
> >       |                        ^~~~~~~~~~~~~~~~~~~~~~~~~
> > cc1: all warnings being treated as errors
> > make[6]: *** [/home/acme/git/perf/tools/build/Makefile.build:97: /tmp/build/perf/arch/arm64/util/pmu.o] Error 1
> > make[5]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: util] Error 2
> > make[4]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: arm64] Error 2
> > make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: arch] Error 2
> > make[3]: *** Waiting for unfinished jobs....
> >   CC      /tmp/build/perf/tests/vmlinux-kallsyms.o
> > 
> > -----
> > 
> > I'm building with:
> 
> So:
> 
> acme@roc-rk3399-pc:~/git/perf$ find tools/perf/ -name "*.[ch]" | xargs grep -w perf_pmu__find_table
> tools/perf/arch/arm64/util/pmu.c:		return perf_pmu__find_table(pmu);
> tools/perf/pmu-events/pmu-events.c:const struct pmu_events_table *perf_pmu__find_table(struct perf_pmu *pmu)
> acme@roc-rk3399-pc:~/git/perf$
> acme@roc-rk3399-pc:~/git/perf$ git log --oneline -1
> d22e569cd33d (HEAD) perf pmu-events: Separate the metrics from events for no jevents
> acme@roc-rk3399-pc:~/git/perf$
> 
> Tring to fix...

tools/perf/pmu-events/pmu-events.c was a leftover from a previous build,
strange as I build using O=, not to clutter the source dir, so perhaps
handling that is missing, I'll check.

Fixed aarch64 specific one with:

diff --git a/tools/perf/arch/arm64/util/pmu.c b/tools/perf/arch/arm64/util/pmu.c
index 801bf52e2ea6..b4eaf00ec5a8 100644
--- a/tools/perf/arch/arm64/util/pmu.c
+++ b/tools/perf/arch/arm64/util/pmu.c
@@ -32,7 +32,7 @@ const struct pmu_events_table *pmu_events_table__find(void)
 	struct perf_pmu *pmu = pmu__find_core_pmu();
 
 	if (pmu)
-		return perf_pmu__find_table(pmu);
+		return perf_pmu__find_events_table(pmu);
 
 	return NULL;
 }


---

Continuing...

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* Re: [PATCH v1] perf pmu: Fix aarch64 build
@ 2023-02-03 16:56                 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 30+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-02-03 16:56 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Mark Rutland, Kang Minchul, Sandipan Das, Peter Zijlstra,
	Perry Taylor, Stephane Eranian, linux-kernel, James Clark,
	Kim Phillips, Will Deacon, Kan Liang, Rob Herring,
	Alexander Shishkin, Ingo Molnar, Xing Zhengjun, Mike Leach,
	John Garry, Kajol Jain, Namhyung Kim, Caleb Biggers,
	linux-arm-kernel, Ravi Bangoria, Florian Fischer, Adrian Hunter,
	linux-perf-users, Jiri Olsa, Leo Yan

Em Fri, Feb 03, 2023 at 01:02:02PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Feb 03, 2023 at 12:43:48PM -0300, Arnaldo Carvalho de Melo escreveu:
> > I tried bisecting, but at this cset:
> > 
> > acme@roc-rk3399-pc:~/git/perf$ git log --oneline -1
> > d22e569cd33d (HEAD) perf pmu-events: Separate the metrics from events for no jevents
> > acme@roc-rk3399-pc:~/git/perf$
> > 
> > I'm getting this:
> > 
> >   CC      /tmp/build/perf/pmu-events/pmu-events.o
> > pmu-events/pmu-events.c:3637:32: error: no previous prototype for ‘perf_pmu__find_table’ [-Werror=missing-prototypes]
> >  3637 | const struct pmu_events_table *perf_pmu__find_table(struct perf_pmu *pmu)
> >       |                                ^~~~~~~~~~~~~~~~~~~~
> >   CC      /tmp/build/perf/builtin-ftrace.o
> >   CC      /tmp/build/perf/builtin-help.o
> >   CC      /tmp/build/perf/builtin-buildid-list.o
> > cc1: all warnings being treated as errors
> > make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:97: /tmp/build/perf/pmu-events/pmu-events.o] Error 1
> > make[2]: *** [Makefile.perf:676: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2
> > make[2]: *** Waiting for unfinished jobs....
> >   CC      /tmp/build/perf/builtin-buildid-cache.o
> > 
> > <SNIP>
> > 
> >   CC      /tmp/build/perf/tests/attr.o
> > arch/arm64/util/pmu.c: In function ‘pmu_events_table__find’:
> > arch/arm64/util/pmu.c:35:24: error: implicit declaration of function ‘perf_pmu__find_table’; did you mean ‘perf_pmu__find_by_type’? [-Werror=implicit-function-declaration]
> >    35 |                 return perf_pmu__find_table(pmu);
> >       |                        ^~~~~~~~~~~~~~~~~~~~
> >       |                        perf_pmu__find_by_type
> > arch/arm64/util/pmu.c:35:24: error: returning ‘int’ from a function with return type ‘const struct pmu_events_table *’ makes pointer from integer without a cast [-Werror=int-conversion]
> >    35 |                 return perf_pmu__find_table(pmu);
> >       |                        ^~~~~~~~~~~~~~~~~~~~~~~~~
> > cc1: all warnings being treated as errors
> > make[6]: *** [/home/acme/git/perf/tools/build/Makefile.build:97: /tmp/build/perf/arch/arm64/util/pmu.o] Error 1
> > make[5]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: util] Error 2
> > make[4]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: arm64] Error 2
> > make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: arch] Error 2
> > make[3]: *** Waiting for unfinished jobs....
> >   CC      /tmp/build/perf/tests/vmlinux-kallsyms.o
> > 
> > -----
> > 
> > I'm building with:
> 
> So:
> 
> acme@roc-rk3399-pc:~/git/perf$ find tools/perf/ -name "*.[ch]" | xargs grep -w perf_pmu__find_table
> tools/perf/arch/arm64/util/pmu.c:		return perf_pmu__find_table(pmu);
> tools/perf/pmu-events/pmu-events.c:const struct pmu_events_table *perf_pmu__find_table(struct perf_pmu *pmu)
> acme@roc-rk3399-pc:~/git/perf$
> acme@roc-rk3399-pc:~/git/perf$ git log --oneline -1
> d22e569cd33d (HEAD) perf pmu-events: Separate the metrics from events for no jevents
> acme@roc-rk3399-pc:~/git/perf$
> 
> Tring to fix...

tools/perf/pmu-events/pmu-events.c was a leftover from a previous build,
strange as I build using O=, not to clutter the source dir, so perhaps
handling that is missing, I'll check.

Fixed aarch64 specific one with:

diff --git a/tools/perf/arch/arm64/util/pmu.c b/tools/perf/arch/arm64/util/pmu.c
index 801bf52e2ea6..b4eaf00ec5a8 100644
--- a/tools/perf/arch/arm64/util/pmu.c
+++ b/tools/perf/arch/arm64/util/pmu.c
@@ -32,7 +32,7 @@ const struct pmu_events_table *pmu_events_table__find(void)
 	struct perf_pmu *pmu = pmu__find_core_pmu();
 
 	if (pmu)
-		return perf_pmu__find_table(pmu);
+		return perf_pmu__find_events_table(pmu);
 
 	return NULL;
 }


---

Continuing...

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* Re: [PATCH v1] perf pmu: Fix aarch64 build
  2023-02-03 16:56                 ` Arnaldo Carvalho de Melo
  (?)
@ 2023-02-04 21:23                   ` Ian Rogers
  -1 siblings, 0 replies; 30+ messages in thread
From: Ian Rogers @ 2023-02-04 21:23 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, Adrian Hunter, Kan Liang, Kim Phillips,
	Florian Fischer, Ravi Bangoria, Xing Zhengjun, Rob Herring,
	Kang Minchul, linux-arm-kernel, linux-perf-users, linux-kernel,
	Sandipan Das, Jing Zhang, linuxppc-dev, Kajol Jain,
	Stephane Eranian, Perry Taylor, Caleb Biggers

On Fri, Feb 3, 2023 at 8:56 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
>
> Em Fri, Feb 03, 2023 at 01:02:02PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Fri, Feb 03, 2023 at 12:43:48PM -0300, Arnaldo Carvalho de Melo escreveu:
> > > I tried bisecting, but at this cset:
> > >
> > > acme@roc-rk3399-pc:~/git/perf$ git log --oneline -1
> > > d22e569cd33d (HEAD) perf pmu-events: Separate the metrics from events for no jevents
> > > acme@roc-rk3399-pc:~/git/perf$
> > >
> > > I'm getting this:
> > >
> > >   CC      /tmp/build/perf/pmu-events/pmu-events.o
> > > pmu-events/pmu-events.c:3637:32: error: no previous prototype for ‘perf_pmu__find_table’ [-Werror=missing-prototypes]
> > >  3637 | const struct pmu_events_table *perf_pmu__find_table(struct perf_pmu *pmu)
> > >       |                                ^~~~~~~~~~~~~~~~~~~~
> > >   CC      /tmp/build/perf/builtin-ftrace.o
> > >   CC      /tmp/build/perf/builtin-help.o
> > >   CC      /tmp/build/perf/builtin-buildid-list.o
> > > cc1: all warnings being treated as errors
> > > make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:97: /tmp/build/perf/pmu-events/pmu-events.o] Error 1
> > > make[2]: *** [Makefile.perf:676: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2
> > > make[2]: *** Waiting for unfinished jobs....
> > >   CC      /tmp/build/perf/builtin-buildid-cache.o
> > >
> > > <SNIP>
> > >
> > >   CC      /tmp/build/perf/tests/attr.o
> > > arch/arm64/util/pmu.c: In function ‘pmu_events_table__find’:
> > > arch/arm64/util/pmu.c:35:24: error: implicit declaration of function ‘perf_pmu__find_table’; did you mean ‘perf_pmu__find_by_type’? [-Werror=implicit-function-declaration]
> > >    35 |                 return perf_pmu__find_table(pmu);
> > >       |                        ^~~~~~~~~~~~~~~~~~~~
> > >       |                        perf_pmu__find_by_type
> > > arch/arm64/util/pmu.c:35:24: error: returning ‘int’ from a function with return type ‘const struct pmu_events_table *’ makes pointer from integer without a cast [-Werror=int-conversion]
> > >    35 |                 return perf_pmu__find_table(pmu);
> > >       |                        ^~~~~~~~~~~~~~~~~~~~~~~~~
> > > cc1: all warnings being treated as errors
> > > make[6]: *** [/home/acme/git/perf/tools/build/Makefile.build:97: /tmp/build/perf/arch/arm64/util/pmu.o] Error 1
> > > make[5]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: util] Error 2
> > > make[4]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: arm64] Error 2
> > > make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: arch] Error 2
> > > make[3]: *** Waiting for unfinished jobs....
> > >   CC      /tmp/build/perf/tests/vmlinux-kallsyms.o
> > >
> > > -----
> > >
> > > I'm building with:
> >
> > So:
> >
> > acme@roc-rk3399-pc:~/git/perf$ find tools/perf/ -name "*.[ch]" | xargs grep -w perf_pmu__find_table
> > tools/perf/arch/arm64/util/pmu.c:             return perf_pmu__find_table(pmu);
> > tools/perf/pmu-events/pmu-events.c:const struct pmu_events_table *perf_pmu__find_table(struct perf_pmu *pmu)
> > acme@roc-rk3399-pc:~/git/perf$
> > acme@roc-rk3399-pc:~/git/perf$ git log --oneline -1
> > d22e569cd33d (HEAD) perf pmu-events: Separate the metrics from events for no jevents
> > acme@roc-rk3399-pc:~/git/perf$
> >
> > Tring to fix...
>
> tools/perf/pmu-events/pmu-events.c was a leftover from a previous build,
> strange as I build using O=, not to clutter the source dir, so perhaps
> handling that is missing, I'll check.
>
> Fixed aarch64 specific one with:
>
> diff --git a/tools/perf/arch/arm64/util/pmu.c b/tools/perf/arch/arm64/util/pmu.c
> index 801bf52e2ea6..b4eaf00ec5a8 100644
> --- a/tools/perf/arch/arm64/util/pmu.c
> +++ b/tools/perf/arch/arm64/util/pmu.c
> @@ -32,7 +32,7 @@ const struct pmu_events_table *pmu_events_table__find(void)
>         struct perf_pmu *pmu = pmu__find_core_pmu();
>
>         if (pmu)
> -               return perf_pmu__find_table(pmu);
> +               return perf_pmu__find_events_table(pmu);
>
>         return NULL;
>  }
>
>
> ---
>
> Continuing...

Thanks! Sorry for missing this one. Ideally we'd have less code under
arch/ . The previous error messages made me think you may need to
build clean.

Ian

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1] perf pmu: Fix aarch64 build
@ 2023-02-04 21:23                   ` Ian Rogers
  0 siblings, 0 replies; 30+ messages in thread
From: Ian Rogers @ 2023-02-04 21:23 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, Adrian Hunter, Kan Liang, Kim Phillips,
	Florian Fischer, Ravi Bangoria, Xing Zhengjun, Rob Herring,
	Kang Minchul, linux-arm-kernel, linux-perf-users, linux-kernel,
	Sandipan Das, Jing Zhang, linuxppc-dev, Kajol Jain,
	Stephane Eranian, Perry Taylor, Caleb Biggers

On Fri, Feb 3, 2023 at 8:56 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
>
> Em Fri, Feb 03, 2023 at 01:02:02PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Fri, Feb 03, 2023 at 12:43:48PM -0300, Arnaldo Carvalho de Melo escreveu:
> > > I tried bisecting, but at this cset:
> > >
> > > acme@roc-rk3399-pc:~/git/perf$ git log --oneline -1
> > > d22e569cd33d (HEAD) perf pmu-events: Separate the metrics from events for no jevents
> > > acme@roc-rk3399-pc:~/git/perf$
> > >
> > > I'm getting this:
> > >
> > >   CC      /tmp/build/perf/pmu-events/pmu-events.o
> > > pmu-events/pmu-events.c:3637:32: error: no previous prototype for ‘perf_pmu__find_table’ [-Werror=missing-prototypes]
> > >  3637 | const struct pmu_events_table *perf_pmu__find_table(struct perf_pmu *pmu)
> > >       |                                ^~~~~~~~~~~~~~~~~~~~
> > >   CC      /tmp/build/perf/builtin-ftrace.o
> > >   CC      /tmp/build/perf/builtin-help.o
> > >   CC      /tmp/build/perf/builtin-buildid-list.o
> > > cc1: all warnings being treated as errors
> > > make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:97: /tmp/build/perf/pmu-events/pmu-events.o] Error 1
> > > make[2]: *** [Makefile.perf:676: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2
> > > make[2]: *** Waiting for unfinished jobs....
> > >   CC      /tmp/build/perf/builtin-buildid-cache.o
> > >
> > > <SNIP>
> > >
> > >   CC      /tmp/build/perf/tests/attr.o
> > > arch/arm64/util/pmu.c: In function ‘pmu_events_table__find’:
> > > arch/arm64/util/pmu.c:35:24: error: implicit declaration of function ‘perf_pmu__find_table’; did you mean ‘perf_pmu__find_by_type’? [-Werror=implicit-function-declaration]
> > >    35 |                 return perf_pmu__find_table(pmu);
> > >       |                        ^~~~~~~~~~~~~~~~~~~~
> > >       |                        perf_pmu__find_by_type
> > > arch/arm64/util/pmu.c:35:24: error: returning ‘int’ from a function with return type ‘const struct pmu_events_table *’ makes pointer from integer without a cast [-Werror=int-conversion]
> > >    35 |                 return perf_pmu__find_table(pmu);
> > >       |                        ^~~~~~~~~~~~~~~~~~~~~~~~~
> > > cc1: all warnings being treated as errors
> > > make[6]: *** [/home/acme/git/perf/tools/build/Makefile.build:97: /tmp/build/perf/arch/arm64/util/pmu.o] Error 1
> > > make[5]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: util] Error 2
> > > make[4]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: arm64] Error 2
> > > make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: arch] Error 2
> > > make[3]: *** Waiting for unfinished jobs....
> > >   CC      /tmp/build/perf/tests/vmlinux-kallsyms.o
> > >
> > > -----
> > >
> > > I'm building with:
> >
> > So:
> >
> > acme@roc-rk3399-pc:~/git/perf$ find tools/perf/ -name "*.[ch]" | xargs grep -w perf_pmu__find_table
> > tools/perf/arch/arm64/util/pmu.c:             return perf_pmu__find_table(pmu);
> > tools/perf/pmu-events/pmu-events.c:const struct pmu_events_table *perf_pmu__find_table(struct perf_pmu *pmu)
> > acme@roc-rk3399-pc:~/git/perf$
> > acme@roc-rk3399-pc:~/git/perf$ git log --oneline -1
> > d22e569cd33d (HEAD) perf pmu-events: Separate the metrics from events for no jevents
> > acme@roc-rk3399-pc:~/git/perf$
> >
> > Tring to fix...
>
> tools/perf/pmu-events/pmu-events.c was a leftover from a previous build,
> strange as I build using O=, not to clutter the source dir, so perhaps
> handling that is missing, I'll check.
>
> Fixed aarch64 specific one with:
>
> diff --git a/tools/perf/arch/arm64/util/pmu.c b/tools/perf/arch/arm64/util/pmu.c
> index 801bf52e2ea6..b4eaf00ec5a8 100644
> --- a/tools/perf/arch/arm64/util/pmu.c
> +++ b/tools/perf/arch/arm64/util/pmu.c
> @@ -32,7 +32,7 @@ const struct pmu_events_table *pmu_events_table__find(void)
>         struct perf_pmu *pmu = pmu__find_core_pmu();
>
>         if (pmu)
> -               return perf_pmu__find_table(pmu);
> +               return perf_pmu__find_events_table(pmu);
>
>         return NULL;
>  }
>
>
> ---
>
> Continuing...

Thanks! Sorry for missing this one. Ideally we'd have less code under
arch/ . The previous error messages made me think you may need to
build clean.

Ian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [PATCH v1] perf pmu: Fix aarch64 build
@ 2023-02-04 21:23                   ` Ian Rogers
  0 siblings, 0 replies; 30+ messages in thread
From: Ian Rogers @ 2023-02-04 21:23 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Mark Rutland, Kang Minchul, Sandipan Das, Peter Zijlstra,
	Perry Taylor, Stephane Eranian, linux-kernel, James Clark,
	Kim Phillips, Will Deacon, Kan Liang, Rob Herring,
	Alexander Shishkin, Ingo Molnar, Xing Zhengjun, Mike Leach,
	John Garry, Kajol Jain, Namhyung Kim, Caleb Biggers,
	linux-arm-kernel, Ravi Bangoria, Florian Fischer, Adrian Hunter,
	linux-perf-users, Jiri Olsa, Leo Yan

On Fri, Feb 3, 2023 at 8:56 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
>
> Em Fri, Feb 03, 2023 at 01:02:02PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Fri, Feb 03, 2023 at 12:43:48PM -0300, Arnaldo Carvalho de Melo escreveu:
> > > I tried bisecting, but at this cset:
> > >
> > > acme@roc-rk3399-pc:~/git/perf$ git log --oneline -1
> > > d22e569cd33d (HEAD) perf pmu-events: Separate the metrics from events for no jevents
> > > acme@roc-rk3399-pc:~/git/perf$
> > >
> > > I'm getting this:
> > >
> > >   CC      /tmp/build/perf/pmu-events/pmu-events.o
> > > pmu-events/pmu-events.c:3637:32: error: no previous prototype for ‘perf_pmu__find_table’ [-Werror=missing-prototypes]
> > >  3637 | const struct pmu_events_table *perf_pmu__find_table(struct perf_pmu *pmu)
> > >       |                                ^~~~~~~~~~~~~~~~~~~~
> > >   CC      /tmp/build/perf/builtin-ftrace.o
> > >   CC      /tmp/build/perf/builtin-help.o
> > >   CC      /tmp/build/perf/builtin-buildid-list.o
> > > cc1: all warnings being treated as errors
> > > make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:97: /tmp/build/perf/pmu-events/pmu-events.o] Error 1
> > > make[2]: *** [Makefile.perf:676: /tmp/build/perf/pmu-events/pmu-events-in.o] Error 2
> > > make[2]: *** Waiting for unfinished jobs....
> > >   CC      /tmp/build/perf/builtin-buildid-cache.o
> > >
> > > <SNIP>
> > >
> > >   CC      /tmp/build/perf/tests/attr.o
> > > arch/arm64/util/pmu.c: In function ‘pmu_events_table__find’:
> > > arch/arm64/util/pmu.c:35:24: error: implicit declaration of function ‘perf_pmu__find_table’; did you mean ‘perf_pmu__find_by_type’? [-Werror=implicit-function-declaration]
> > >    35 |                 return perf_pmu__find_table(pmu);
> > >       |                        ^~~~~~~~~~~~~~~~~~~~
> > >       |                        perf_pmu__find_by_type
> > > arch/arm64/util/pmu.c:35:24: error: returning ‘int’ from a function with return type ‘const struct pmu_events_table *’ makes pointer from integer without a cast [-Werror=int-conversion]
> > >    35 |                 return perf_pmu__find_table(pmu);
> > >       |                        ^~~~~~~~~~~~~~~~~~~~~~~~~
> > > cc1: all warnings being treated as errors
> > > make[6]: *** [/home/acme/git/perf/tools/build/Makefile.build:97: /tmp/build/perf/arch/arm64/util/pmu.o] Error 1
> > > make[5]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: util] Error 2
> > > make[4]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: arm64] Error 2
> > > make[3]: *** [/home/acme/git/perf/tools/build/Makefile.build:139: arch] Error 2
> > > make[3]: *** Waiting for unfinished jobs....
> > >   CC      /tmp/build/perf/tests/vmlinux-kallsyms.o
> > >
> > > -----
> > >
> > > I'm building with:
> >
> > So:
> >
> > acme@roc-rk3399-pc:~/git/perf$ find tools/perf/ -name "*.[ch]" | xargs grep -w perf_pmu__find_table
> > tools/perf/arch/arm64/util/pmu.c:             return perf_pmu__find_table(pmu);
> > tools/perf/pmu-events/pmu-events.c:const struct pmu_events_table *perf_pmu__find_table(struct perf_pmu *pmu)
> > acme@roc-rk3399-pc:~/git/perf$
> > acme@roc-rk3399-pc:~/git/perf$ git log --oneline -1
> > d22e569cd33d (HEAD) perf pmu-events: Separate the metrics from events for no jevents
> > acme@roc-rk3399-pc:~/git/perf$
> >
> > Tring to fix...
>
> tools/perf/pmu-events/pmu-events.c was a leftover from a previous build,
> strange as I build using O=, not to clutter the source dir, so perhaps
> handling that is missing, I'll check.
>
> Fixed aarch64 specific one with:
>
> diff --git a/tools/perf/arch/arm64/util/pmu.c b/tools/perf/arch/arm64/util/pmu.c
> index 801bf52e2ea6..b4eaf00ec5a8 100644
> --- a/tools/perf/arch/arm64/util/pmu.c
> +++ b/tools/perf/arch/arm64/util/pmu.c
> @@ -32,7 +32,7 @@ const struct pmu_events_table *pmu_events_table__find(void)
>         struct perf_pmu *pmu = pmu__find_core_pmu();
>
>         if (pmu)
> -               return perf_pmu__find_table(pmu);
> +               return perf_pmu__find_events_table(pmu);
>
>         return NULL;
>  }
>
>
> ---
>
> Continuing...

Thanks! Sorry for missing this one. Ideally we'd have less code under
arch/ . The previous error messages made me think you may need to
build clean.

Ian

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2023-02-04 21:25 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-03  1:40 [PATCH v1] perf pmu: Fix aarch64 build Ian Rogers
2023-02-03  1:40 ` Ian Rogers
2023-02-03  1:40 ` Ian Rogers
2023-02-03  1:41 ` Ian Rogers
2023-02-03  1:41   ` Ian Rogers
2023-02-03  1:41   ` Ian Rogers
2023-02-03 14:17   ` Arnaldo Carvalho de Melo
2023-02-03 14:17     ` Arnaldo Carvalho de Melo
2023-02-03 14:17     ` Arnaldo Carvalho de Melo
2023-02-03 14:35     ` Arnaldo Carvalho de Melo
2023-02-03 14:35       ` Arnaldo Carvalho de Melo
2023-02-03 14:35       ` Arnaldo Carvalho de Melo
2023-02-03 14:36       ` Arnaldo Carvalho de Melo
2023-02-03 14:36         ` Arnaldo Carvalho de Melo
2023-02-03 14:36         ` Arnaldo Carvalho de Melo
2023-02-03 14:43         ` Arnaldo Carvalho de Melo
2023-02-03 14:43           ` Arnaldo Carvalho de Melo
2023-02-03 14:43           ` Arnaldo Carvalho de Melo
2023-02-03 15:43           ` Arnaldo Carvalho de Melo
2023-02-03 15:43             ` Arnaldo Carvalho de Melo
2023-02-03 15:43             ` Arnaldo Carvalho de Melo
2023-02-03 16:02             ` Arnaldo Carvalho de Melo
2023-02-03 16:02               ` Arnaldo Carvalho de Melo
2023-02-03 16:02               ` Arnaldo Carvalho de Melo
2023-02-03 16:56               ` Arnaldo Carvalho de Melo
2023-02-03 16:56                 ` Arnaldo Carvalho de Melo
2023-02-03 16:56                 ` Arnaldo Carvalho de Melo
2023-02-04 21:23                 ` Ian Rogers
2023-02-04 21:23                   ` Ian Rogers
2023-02-04 21:23                   ` Ian Rogers

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.