linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/5] perf test: Add build test for JEVENTS_ARCH=all
@ 2024-08-05 19:44 Ian Rogers
  2024-08-05 19:44 ` [PATCH v1 2/5] perf pmu-events: Change dependencies for empty-pmu-events.c test Ian Rogers
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Ian Rogers @ 2024-08-05 19:44 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Ian Rogers, Adrian Hunter, Kan Liang, John Garry, Will Deacon,
	James Clark, Mike Leach, Leo Yan, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Samuel Holland, Charles Ci-Jyun Wu, Locus Wei-Han Chen,
	Atish Patra, Ji Sheng Teoh, Inochi Amaoto, Jing Zhang, Xu Yang,
	Sandipan Das, Guilherme Amadio, Changbin Du, linux-perf-users,
	linux-kernel, linux-arm-kernel, linux-riscv, vincent.chen,
	greentime.hu, Eric Lin

Building with JEVENTS_ARCH=all builds all CPU types and allows things
like assertions to check the validity of the input json.

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/tests/make | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/perf/tests/make b/tools/perf/tests/make
index a1f8adf85367..8a9edf758f10 100644
--- a/tools/perf/tests/make
+++ b/tools/perf/tests/make
@@ -70,6 +70,7 @@ make_python_perf_so := $(python_perf_so)
 make_debug          := DEBUG=1
 make_nondistro      := BUILD_NONDISTRO=1
 make_extra_tests    := EXTRA_TESTS=1
+make_jevents_all    := JEVENTS_ARCH=all
 make_no_bpf_skel    := BUILD_BPF_SKEL=0
 make_gen_vmlinux_h  := GEN_VMLINUX_H=1
 make_no_libperl     := NO_LIBPERL=1
@@ -140,6 +141,7 @@ run += make_python_perf_so
 run += make_debug
 run += make_nondistro
 run += make_extra_tests
+run += make_jevents_all
 run += make_no_bpf_skel
 run += make_gen_vmlinux_h
 run += make_no_libperl
-- 
2.46.0.rc2.264.g509ed76dc8-goog



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

* [PATCH v1 2/5] perf pmu-events: Change dependencies for empty-pmu-events.c test
  2024-08-05 19:44 [PATCH v1 1/5] perf test: Add build test for JEVENTS_ARCH=all Ian Rogers
@ 2024-08-05 19:44 ` Ian Rogers
  2024-08-05 20:03   ` Arnaldo Carvalho de Melo
  2024-08-05 19:44 ` [PATCH v1 3/5] perf pmu-events: Remove duplicated ampereone event Ian Rogers
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 13+ messages in thread
From: Ian Rogers @ 2024-08-05 19:44 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Ian Rogers, Adrian Hunter, Kan Liang, John Garry, Will Deacon,
	James Clark, Mike Leach, Leo Yan, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Samuel Holland, Charles Ci-Jyun Wu, Locus Wei-Han Chen,
	Atish Patra, Ji Sheng Teoh, Inochi Amaoto, Jing Zhang, Xu Yang,
	Sandipan Das, Guilherme Amadio, Changbin Du, linux-perf-users,
	linux-kernel, linux-arm-kernel, linux-riscv, vincent.chen,
	greentime.hu, Eric Lin

Switch from $? (all the prerequisites that are newer than the target)
to $^ (all the prerequisites) as touching jevents.py will mean that
empty-pmu-events.c won't be passed to the diff command breaking the
build.

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/pmu-events/Build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/pmu-events/Build b/tools/perf/pmu-events/Build
index c3fa43c49706..d941bc9d16e9 100644
--- a/tools/perf/pmu-events/Build
+++ b/tools/perf/pmu-events/Build
@@ -39,7 +39,7 @@ $(TEST_EMPTY_PMU_EVENTS_C): $(JSON) $(JSON_TEST) $(JEVENTS_PY) $(METRIC_PY) $(ME
 
 $(EMPTY_PMU_EVENTS_TEST_LOG): $(EMPTY_PMU_EVENTS_C) $(TEST_EMPTY_PMU_EVENTS_C)
 	$(call rule_mkdir)
-	$(Q)$(call echo-cmd,test)diff -u $? 2> $@ || (cat $@ && false)
+	$(Q)$(call echo-cmd,test)diff -u $^ 2> $@ || (cat $@ && false)
 
 $(PMU_EVENTS_C): $(JSON) $(JSON_TEST) $(JEVENTS_PY) $(METRIC_PY) $(METRIC_TEST_LOG) $(EMPTY_PMU_EVENTS_TEST_LOG)
 	$(call rule_mkdir)
-- 
2.46.0.rc2.264.g509ed76dc8-goog



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

* [PATCH v1 3/5] perf pmu-events: Remove duplicated ampereone event
  2024-08-05 19:44 [PATCH v1 1/5] perf test: Add build test for JEVENTS_ARCH=all Ian Rogers
  2024-08-05 19:44 ` [PATCH v1 2/5] perf pmu-events: Change dependencies for empty-pmu-events.c test Ian Rogers
@ 2024-08-05 19:44 ` Ian Rogers
  2024-08-05 19:44 ` [PATCH v1 4/5] perf pmu-events: Remove duplicated riscv firmware event Ian Rogers
  2024-08-05 19:44 ` [PATCH v1 5/5] perf jevents.py: Ensure event names aren't duplicated Ian Rogers
  3 siblings, 0 replies; 13+ messages in thread
From: Ian Rogers @ 2024-08-05 19:44 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Ian Rogers, Adrian Hunter, Kan Liang, John Garry, Will Deacon,
	James Clark, Mike Leach, Leo Yan, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Samuel Holland, Charles Ci-Jyun Wu, Locus Wei-Han Chen,
	Atish Patra, Ji Sheng Teoh, Inochi Amaoto, Jing Zhang, Xu Yang,
	Sandipan Das, Guilherme Amadio, Changbin Du, linux-perf-users,
	linux-kernel, linux-arm-kernel, linux-riscv, vincent.chen,
	greentime.hu, Eric Lin

OP_SPEC is repeated twice in the file which will break invariants in
perf list as discussed in this thread:
https://lore.kernel.org/linux-perf-users/20240719081651.24853-1-eric.lin@sifive.com/

Signed-off-by: Ian Rogers <irogers@google.com>
---
 .../pmu-events/arch/arm64/ampere/ampereone/instruction.json    | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/tools/perf/pmu-events/arch/arm64/ampere/ampereone/instruction.json b/tools/perf/pmu-events/arch/arm64/ampere/ampereone/instruction.json
index 18d1f2f76a23..9fe697d12fe0 100644
--- a/tools/perf/pmu-events/arch/arm64/ampere/ampereone/instruction.json
+++ b/tools/perf/pmu-events/arch/arm64/ampere/ampereone/instruction.json
@@ -77,9 +77,6 @@
     {
         "ArchStdEvent": "OP_RETIRED"
     },
-    {
-        "ArchStdEvent": "OP_SPEC"
-    },
     {
         "PublicDescription": "Operation speculatively executed, NOP",
         "EventCode": "0x100",
-- 
2.46.0.rc2.264.g509ed76dc8-goog



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

* [PATCH v1 4/5] perf pmu-events: Remove duplicated riscv firmware event
  2024-08-05 19:44 [PATCH v1 1/5] perf test: Add build test for JEVENTS_ARCH=all Ian Rogers
  2024-08-05 19:44 ` [PATCH v1 2/5] perf pmu-events: Change dependencies for empty-pmu-events.c test Ian Rogers
  2024-08-05 19:44 ` [PATCH v1 3/5] perf pmu-events: Remove duplicated ampereone event Ian Rogers
@ 2024-08-05 19:44 ` Ian Rogers
  2024-08-06  3:54   ` Eric Lin
  2024-08-05 19:44 ` [PATCH v1 5/5] perf jevents.py: Ensure event names aren't duplicated Ian Rogers
  3 siblings, 1 reply; 13+ messages in thread
From: Ian Rogers @ 2024-08-05 19:44 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Ian Rogers, Adrian Hunter, Kan Liang, John Garry, Will Deacon,
	James Clark, Mike Leach, Leo Yan, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Samuel Holland, Charles Ci-Jyun Wu, Locus Wei-Han Chen,
	Atish Patra, Ji Sheng Teoh, Inochi Amaoto, Jing Zhang, Xu Yang,
	Sandipan Das, Guilherme Amadio, Changbin Du, linux-perf-users,
	linux-kernel, linux-arm-kernel, linux-riscv, vincent.chen,
	greentime.hu, Eric Lin

FW_SFENCE_VMA_RECEIVED is repeated twice in the file which will break
invariants in perf list as discussed in this thread:
https://lore.kernel.org/linux-perf-users/20240719081651.24853-1-eric.lin@sifive.com/

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/pmu-events/arch/riscv/andes/ax45/firmware.json      | 3 ---
 tools/perf/pmu-events/arch/riscv/sifive/u74/firmware.json      | 3 ---
 .../perf/pmu-events/arch/riscv/starfive/dubhe-80/firmware.json | 3 ---
 .../perf/pmu-events/arch/riscv/thead/c900-legacy/firmware.json | 3 ---
 4 files changed, 12 deletions(-)

diff --git a/tools/perf/pmu-events/arch/riscv/andes/ax45/firmware.json b/tools/perf/pmu-events/arch/riscv/andes/ax45/firmware.json
index 9b4a032186a7..5a996fa4b837 100644
--- a/tools/perf/pmu-events/arch/riscv/andes/ax45/firmware.json
+++ b/tools/perf/pmu-events/arch/riscv/andes/ax45/firmware.json
@@ -35,9 +35,6 @@
   {
     "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED"
   },
-  {
-    "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED"
-  },
   {
     "ArchStdEvent": "FW_SFENCE_VMA_ASID_RECEIVED"
   },
diff --git a/tools/perf/pmu-events/arch/riscv/sifive/u74/firmware.json b/tools/perf/pmu-events/arch/riscv/sifive/u74/firmware.json
index 9b4a032186a7..5a996fa4b837 100644
--- a/tools/perf/pmu-events/arch/riscv/sifive/u74/firmware.json
+++ b/tools/perf/pmu-events/arch/riscv/sifive/u74/firmware.json
@@ -35,9 +35,6 @@
   {
     "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED"
   },
-  {
-    "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED"
-  },
   {
     "ArchStdEvent": "FW_SFENCE_VMA_ASID_RECEIVED"
   },
diff --git a/tools/perf/pmu-events/arch/riscv/starfive/dubhe-80/firmware.json b/tools/perf/pmu-events/arch/riscv/starfive/dubhe-80/firmware.json
index 9b4a032186a7..5a996fa4b837 100644
--- a/tools/perf/pmu-events/arch/riscv/starfive/dubhe-80/firmware.json
+++ b/tools/perf/pmu-events/arch/riscv/starfive/dubhe-80/firmware.json
@@ -35,9 +35,6 @@
   {
     "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED"
   },
-  {
-    "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED"
-  },
   {
     "ArchStdEvent": "FW_SFENCE_VMA_ASID_RECEIVED"
   },
diff --git a/tools/perf/pmu-events/arch/riscv/thead/c900-legacy/firmware.json b/tools/perf/pmu-events/arch/riscv/thead/c900-legacy/firmware.json
index 9b4a032186a7..5a996fa4b837 100644
--- a/tools/perf/pmu-events/arch/riscv/thead/c900-legacy/firmware.json
+++ b/tools/perf/pmu-events/arch/riscv/thead/c900-legacy/firmware.json
@@ -35,9 +35,6 @@
   {
     "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED"
   },
-  {
-    "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED"
-  },
   {
     "ArchStdEvent": "FW_SFENCE_VMA_ASID_RECEIVED"
   },
-- 
2.46.0.rc2.264.g509ed76dc8-goog



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

* [PATCH v1 5/5] perf jevents.py: Ensure event names aren't duplicated
  2024-08-05 19:44 [PATCH v1 1/5] perf test: Add build test for JEVENTS_ARCH=all Ian Rogers
                   ` (2 preceding siblings ...)
  2024-08-05 19:44 ` [PATCH v1 4/5] perf pmu-events: Remove duplicated riscv firmware event Ian Rogers
@ 2024-08-05 19:44 ` Ian Rogers
  3 siblings, 0 replies; 13+ messages in thread
From: Ian Rogers @ 2024-08-05 19:44 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Ian Rogers, Adrian Hunter, Kan Liang, John Garry, Will Deacon,
	James Clark, Mike Leach, Leo Yan, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Samuel Holland, Charles Ci-Jyun Wu, Locus Wei-Han Chen,
	Atish Patra, Ji Sheng Teoh, Inochi Amaoto, Jing Zhang, Xu Yang,
	Sandipan Das, Guilherme Amadio, Changbin Du, linux-perf-users,
	linux-kernel, linux-arm-kernel, linux-riscv, vincent.chen,
	greentime.hu, Eric Lin

Duplicate event names break invariants in perf list. Assert that an
event name isn't duplicated so that broken json won't build.

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/pmu-events/jevents.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jevents.py
index fcf0158438b5..1d96b2204e52 100755
--- a/tools/perf/pmu-events/jevents.py
+++ b/tools/perf/pmu-events/jevents.py
@@ -503,8 +503,11 @@ def print_pending_events() -> None:
 
   first = True
   last_pmu = None
+  last_name = None
   pmus = set()
   for event in sorted(_pending_events, key=event_cmp_key):
+    if last_pmu and last_pmu == event.pmu:
+      assert event.name != last_name, f"Duplicate event: {last_pmu}/{last_name}/ in {_pending_events_tblname}"
     if event.pmu != last_pmu:
       if not first:
         _args.output_file.write('};\n')
@@ -516,6 +519,7 @@ def print_pending_events() -> None:
       pmus.add((event.pmu, pmu_name))
 
     _args.output_file.write(event.to_c_string(metric=False))
+    last_name = event.name
   _pending_events = []
 
   _args.output_file.write(f"""
-- 
2.46.0.rc2.264.g509ed76dc8-goog



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

* Re: [PATCH v1 2/5] perf pmu-events: Change dependencies for empty-pmu-events.c test
  2024-08-05 19:44 ` [PATCH v1 2/5] perf pmu-events: Change dependencies for empty-pmu-events.c test Ian Rogers
@ 2024-08-05 20:03   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 13+ messages in thread
From: Arnaldo Carvalho de Melo @ 2024-08-05 20:03 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Peter Zijlstra, Ingo Molnar, Namhyung Kim, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Adrian Hunter, Kan Liang,
	John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Samuel Holland,
	Charles Ci-Jyun Wu, Locus Wei-Han Chen, Atish Patra,
	Ji Sheng Teoh, Inochi Amaoto, Jing Zhang, Xu Yang, Sandipan Das,
	Guilherme Amadio, Changbin Du, linux-perf-users, linux-kernel,
	linux-arm-kernel, linux-riscv, vincent.chen, greentime.hu,
	Eric Lin

On Mon, Aug 05, 2024 at 12:44:21PM -0700, Ian Rogers wrote:
> Switch from $? (all the prerequisites that are newer than the target)
> to $^ (all the prerequisites) as touching jevents.py will mean that
> empty-pmu-events.c won't be passed to the diff command breaking the
> build.

Thanks, added:

Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
 
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
>  tools/perf/pmu-events/Build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/pmu-events/Build b/tools/perf/pmu-events/Build
> index c3fa43c49706..d941bc9d16e9 100644
> --- a/tools/perf/pmu-events/Build
> +++ b/tools/perf/pmu-events/Build
> @@ -39,7 +39,7 @@ $(TEST_EMPTY_PMU_EVENTS_C): $(JSON) $(JSON_TEST) $(JEVENTS_PY) $(METRIC_PY) $(ME
>  
>  $(EMPTY_PMU_EVENTS_TEST_LOG): $(EMPTY_PMU_EVENTS_C) $(TEST_EMPTY_PMU_EVENTS_C)
>  	$(call rule_mkdir)
> -	$(Q)$(call echo-cmd,test)diff -u $? 2> $@ || (cat $@ && false)
> +	$(Q)$(call echo-cmd,test)diff -u $^ 2> $@ || (cat $@ && false)
>  
>  $(PMU_EVENTS_C): $(JSON) $(JSON_TEST) $(JEVENTS_PY) $(METRIC_PY) $(METRIC_TEST_LOG) $(EMPTY_PMU_EVENTS_TEST_LOG)
>  	$(call rule_mkdir)
> -- 
> 2.46.0.rc2.264.g509ed76dc8-goog
> 


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

* Re: [PATCH v1 4/5] perf pmu-events: Remove duplicated riscv firmware event
  2024-08-05 19:44 ` [PATCH v1 4/5] perf pmu-events: Remove duplicated riscv firmware event Ian Rogers
@ 2024-08-06  3:54   ` Eric Lin
  2024-08-06  4:05     ` Ian Rogers
  0 siblings, 1 reply; 13+ messages in thread
From: Eric Lin @ 2024-08-06  3:54 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Adrian Hunter, Kan Liang, John Garry, Will Deacon, James Clark,
	Mike Leach, Leo Yan, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Samuel Holland, Charles Ci-Jyun Wu, Locus Wei-Han Chen,
	Atish Patra, Ji Sheng Teoh, Inochi Amaoto, Jing Zhang, Xu Yang,
	Sandipan Das, Guilherme Amadio, Changbin Du, linux-perf-users,
	linux-kernel, linux-arm-kernel, linux-riscv, vincent.chen,
	greentime.hu

Hi Ian,

I've sent a patch to fix it and the patch already merged. Thanks.
https://lore.kernel.org/all/20240719115018.27356-1-eric.lin@sifive.com/

Best regards,
Eric Lin


On Tue, Aug 6, 2024 at 3:44 AM Ian Rogers <irogers@google.com> wrote:
>
> FW_SFENCE_VMA_RECEIVED is repeated twice in the file which will break
> invariants in perf list as discussed in this thread:
> https://lore.kernel.org/linux-perf-users/20240719081651.24853-1-eric.lin@sifive.com/
>
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
>  tools/perf/pmu-events/arch/riscv/andes/ax45/firmware.json      | 3 ---
>  tools/perf/pmu-events/arch/riscv/sifive/u74/firmware.json      | 3 ---
>  .../perf/pmu-events/arch/riscv/starfive/dubhe-80/firmware.json | 3 ---
>  .../perf/pmu-events/arch/riscv/thead/c900-legacy/firmware.json | 3 ---
>  4 files changed, 12 deletions(-)
>
> diff --git a/tools/perf/pmu-events/arch/riscv/andes/ax45/firmware.json b/tools/perf/pmu-events/arch/riscv/andes/ax45/firmware.json
> index 9b4a032186a7..5a996fa4b837 100644
> --- a/tools/perf/pmu-events/arch/riscv/andes/ax45/firmware.json
> +++ b/tools/perf/pmu-events/arch/riscv/andes/ax45/firmware.json
> @@ -35,9 +35,6 @@
>    {
>      "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED"
>    },
> -  {
> -    "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED"
> -  },
>    {
>      "ArchStdEvent": "FW_SFENCE_VMA_ASID_RECEIVED"
>    },
> diff --git a/tools/perf/pmu-events/arch/riscv/sifive/u74/firmware.json b/tools/perf/pmu-events/arch/riscv/sifive/u74/firmware.json
> index 9b4a032186a7..5a996fa4b837 100644
> --- a/tools/perf/pmu-events/arch/riscv/sifive/u74/firmware.json
> +++ b/tools/perf/pmu-events/arch/riscv/sifive/u74/firmware.json
> @@ -35,9 +35,6 @@
>    {
>      "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED"
>    },
> -  {
> -    "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED"
> -  },
>    {
>      "ArchStdEvent": "FW_SFENCE_VMA_ASID_RECEIVED"
>    },
> diff --git a/tools/perf/pmu-events/arch/riscv/starfive/dubhe-80/firmware.json b/tools/perf/pmu-events/arch/riscv/starfive/dubhe-80/firmware.json
> index 9b4a032186a7..5a996fa4b837 100644
> --- a/tools/perf/pmu-events/arch/riscv/starfive/dubhe-80/firmware.json
> +++ b/tools/perf/pmu-events/arch/riscv/starfive/dubhe-80/firmware.json
> @@ -35,9 +35,6 @@
>    {
>      "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED"
>    },
> -  {
> -    "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED"
> -  },
>    {
>      "ArchStdEvent": "FW_SFENCE_VMA_ASID_RECEIVED"
>    },
> diff --git a/tools/perf/pmu-events/arch/riscv/thead/c900-legacy/firmware.json b/tools/perf/pmu-events/arch/riscv/thead/c900-legacy/firmware.json
> index 9b4a032186a7..5a996fa4b837 100644
> --- a/tools/perf/pmu-events/arch/riscv/thead/c900-legacy/firmware.json
> +++ b/tools/perf/pmu-events/arch/riscv/thead/c900-legacy/firmware.json
> @@ -35,9 +35,6 @@
>    {
>      "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED"
>    },
> -  {
> -    "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED"
> -  },
>    {
>      "ArchStdEvent": "FW_SFENCE_VMA_ASID_RECEIVED"
>    },
> --
> 2.46.0.rc2.264.g509ed76dc8-goog
>


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

* Re: [PATCH v1 4/5] perf pmu-events: Remove duplicated riscv firmware event
  2024-08-06  3:54   ` Eric Lin
@ 2024-08-06  4:05     ` Ian Rogers
  2024-08-06 13:38       ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 13+ messages in thread
From: Ian Rogers @ 2024-08-06  4:05 UTC (permalink / raw)
  To: Eric Lin, Arnaldo Carvalho de Melo
  Cc: Peter Zijlstra, Ingo Molnar, Namhyung Kim, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Adrian Hunter, Kan Liang,
	John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Samuel Holland,
	Charles Ci-Jyun Wu, Locus Wei-Han Chen, Atish Patra,
	Ji Sheng Teoh, Inochi Amaoto, Jing Zhang, Xu Yang, Sandipan Das,
	Guilherme Amadio, Changbin Du, linux-perf-users, linux-kernel,
	linux-arm-kernel, linux-riscv, vincent.chen, greentime.hu

On Mon, Aug 5, 2024 at 8:54 PM Eric Lin <eric.lin@sifive.com> wrote:
>
> Hi Ian,
>
> I've sent a patch to fix it and the patch already merged. Thanks.
> https://lore.kernel.org/all/20240719115018.27356-1-eric.lin@sifive.com/

Hi Eric/Arnaldo,

Right, I already commented this should have gone through the
perf-tools-next tree:
https://lore.kernel.org/all/CAP-5=fV3NXkKsCP1WH0_qLRNpL+WuP8S3h1=cHaUMH5MFkVHQg@mail.gmail.com/
Arnaldo, please take Eric's patch in preference to this one.

Thanks,
Ian


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

* Re: [PATCH v1 4/5] perf pmu-events: Remove duplicated riscv firmware event
  2024-08-06  4:05     ` Ian Rogers
@ 2024-08-06 13:38       ` Arnaldo Carvalho de Melo
  2024-08-06 13:50         ` Arnaldo Carvalho de Melo
  2024-08-06 13:51         ` Arnaldo Carvalho de Melo
  0 siblings, 2 replies; 13+ messages in thread
From: Arnaldo Carvalho de Melo @ 2024-08-06 13:38 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Eric Lin, Peter Zijlstra, Ingo Molnar, Namhyung Kim, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Adrian Hunter, Kan Liang,
	John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Samuel Holland,
	Charles Ci-Jyun Wu, Locus Wei-Han Chen, Atish Patra,
	Ji Sheng Teoh, Inochi Amaoto, Jing Zhang, Xu Yang, Sandipan Das,
	Guilherme Amadio, Changbin Du, linux-perf-users, linux-kernel,
	linux-arm-kernel, linux-riscv, vincent.chen, greentime.hu

On Mon, Aug 05, 2024 at 09:05:26PM -0700, Ian Rogers wrote:
> On Mon, Aug 5, 2024 at 8:54 PM Eric Lin <eric.lin@sifive.com> wrote:
> >
> > Hi Ian,
> >
> > I've sent a patch to fix it and the patch already merged. Thanks.
> > https://lore.kernel.org/all/20240719115018.27356-1-eric.lin@sifive.com/
> 
> Hi Eric/Arnaldo,
> 
> Right, I already commented this should have gone through the
> perf-tools-next tree:
> https://lore.kernel.org/all/CAP-5=fV3NXkKsCP1WH0_qLRNpL+WuP8S3h1=cHaUMH5MFkVHQg@mail.gmail.com/
> Arnaldo, please take Eric's patch in preference to this one.

So I removed your version from perf-tools-next, eventually we'll get
this merged upstream, I'm just checking this isn't going to get in our
way of testing what we have in perf-tools-next...


- Arnaldo


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

* Re: [PATCH v1 4/5] perf pmu-events: Remove duplicated riscv firmware event
  2024-08-06 13:38       ` Arnaldo Carvalho de Melo
@ 2024-08-06 13:50         ` Arnaldo Carvalho de Melo
  2024-08-06 13:51         ` Arnaldo Carvalho de Melo
  1 sibling, 0 replies; 13+ messages in thread
From: Arnaldo Carvalho de Melo @ 2024-08-06 13:50 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Eric Lin, Peter Zijlstra, Ingo Molnar, Namhyung Kim, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Adrian Hunter, Kan Liang,
	John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Samuel Holland,
	Charles Ci-Jyun Wu, Locus Wei-Han Chen, Atish Patra,
	Ji Sheng Teoh, Inochi Amaoto, Jing Zhang, Xu Yang, Sandipan Das,
	Guilherme Amadio, Changbin Du, linux-perf-users, linux-kernel,
	linux-arm-kernel, linux-riscv, vincent.chen, greentime.hu

On Tue, Aug 06, 2024 at 10:38:07AM -0300, Arnaldo Carvalho de Melo wrote:
> On Mon, Aug 05, 2024 at 09:05:26PM -0700, Ian Rogers wrote:
> > On Mon, Aug 5, 2024 at 8:54 PM Eric Lin <eric.lin@sifive.com> wrote:
> > > I've sent a patch to fix it and the patch already merged. Thanks.
> > > https://lore.kernel.org/all/20240719115018.27356-1-eric.lin@sifive.com/

> > Right, I already commented this should have gone through the
> > perf-tools-next tree:
> > https://lore.kernel.org/all/CAP-5=fV3NXkKsCP1WH0_qLRNpL+WuP8S3h1=cHaUMH5MFkVHQg@mail.gmail.com/
> > Arnaldo, please take Eric's patch in preference to this one.

> So I removed your version from perf-tools-next, eventually we'll get
> this merged upstream, I'm just checking this isn't going to get in our
> way of testing what we have in perf-tools-next...

As expected:

⬢[acme@toolbox perf-tools-next]$ git log --oneline -1 ; time make -C tools/perf build-test
<SNIP>
make_no_libdw_dwarf_unwind_O: cd . && make NO_LIBDW_DWARF_UNWIND=1 FEATURES_DUMP=/home/acme/git/perf-tools-next/tools/perf/BUILD_TEST_FEATURE_DUMP -j28 O=/tmp/tmp.1xBTPCPJh1 DESTDIR=/tmp/tmp.6upZRBhUpN
          make_jevents_all_O: cd . && make JEVENTS_ARCH=all FEATURES_DUMP=/home/acme/git/perf-tools-next/tools/perf/BUILD_TEST_FEATURE_DUMP -j28 O=/tmp/tmp.ncjKsS9Ddm DESTDIR=/tmp/tmp.z2lxV44jzL
cd . && make JEVENTS_ARCH=all FEATURES_DUMP=/home/acme/git/perf-tools-next/tools/perf/BUILD_TEST_FEATURE_DUMP -j28 O=/tmp/tmp.ncjKsS9Ddm DESTDIR=/tmp/tmp.z2lxV44jzL
  BUILD:   Doing 'make -j28' parallel build
Warning: Kernel ABI header differences:
  diff -u tools/include/uapi/drm/i915_drm.h include/uapi/drm/i915_drm.h
<SNIP>
  LD      /tmp/tmp.ncjKsS9Ddm/util/perf-util-in.o
  LD      /tmp/tmp.ncjKsS9Ddm/perf-util-in.o
  AR      /tmp/tmp.ncjKsS9Ddm/libperf-util.a
Traceback (most recent call last):
  File "/home/acme/git/perf-tools-next/tools/perf/pmu-events/jevents.py", line 1317, in <module>
    main()
  File "/home/acme/git/perf-tools-next/tools/perf/pmu-events/jevents.py", line 1308, in main
    ftw(arch_path, [], process_one_file)
  File "/home/acme/git/perf-tools-next/tools/perf/pmu-events/jevents.py", line 1245, in ftw
    ftw(item.path, parents + [item.name], action)
  File "/home/acme/git/perf-tools-next/tools/perf/pmu-events/jevents.py", line 1243, in ftw
    action(parents, item)
  File "/home/acme/git/perf-tools-next/tools/perf/pmu-events/jevents.py", line 646, in process_one_file
    print_pending_events()
  File "/home/acme/git/perf-tools-next/tools/perf/pmu-events/jevents.py", line 510, in print_pending_events
    assert event.name != last_name, f"Duplicate event: {last_pmu}/{last_name}/ in {_pending_events_tblname}"
           ^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Duplicate event: default_core/fw_sfence_vma_received/ in pmu_events__andes_ax45
make[5]: *** [pmu-events/Build:46: /tmp/tmp.ncjKsS9Ddm/pmu-events/pmu-events.c] Error 1
make[5]: *** Deleting file '/tmp/tmp.ncjKsS9Ddm/pmu-events/pmu-events.c'
make[4]: *** [Makefile.perf:763: /tmp/tmp.ncjKsS9Ddm/pmu-events/pmu-events-in.o] Error 2

So I'll have to cherry pick that patch and have it in perf-tools-next,
we'll get notified at some point that linux-next has the same patch,
will ack that, etc.

Please send patches for this area in the future to the perf-tools-next
tree.

- Arnaldo


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

* Re: [PATCH v1 4/5] perf pmu-events: Remove duplicated riscv firmware event
  2024-08-06 13:38       ` Arnaldo Carvalho de Melo
  2024-08-06 13:50         ` Arnaldo Carvalho de Melo
@ 2024-08-06 13:51         ` Arnaldo Carvalho de Melo
  2024-08-06 15:50           ` Eric Lin
  1 sibling, 1 reply; 13+ messages in thread
From: Arnaldo Carvalho de Melo @ 2024-08-06 13:51 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Eric Lin, Peter Zijlstra, Ingo Molnar, Namhyung Kim, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Adrian Hunter, Kan Liang,
	John Garry, Will Deacon, James Clark, Mike Leach, Leo Yan,
	Paul Walmsley, Palmer Dabbelt, Albert Ou, Samuel Holland,
	Charles Ci-Jyun Wu, Locus Wei-Han Chen, Atish Patra,
	Ji Sheng Teoh, Inochi Amaoto, Jing Zhang, Xu Yang, Sandipan Das,
	Guilherme Amadio, Changbin Du, linux-perf-users, linux-kernel,
	linux-arm-kernel, linux-riscv, vincent.chen, greentime.hu

On Tue, Aug 06, 2024 at 10:38:07AM -0300, Arnaldo Carvalho de Melo wrote:
> On Mon, Aug 05, 2024 at 09:05:26PM -0700, Ian Rogers wrote:
> > On Mon, Aug 5, 2024 at 8:54 PM Eric Lin <eric.lin@sifive.com> wrote:
> > >
> > > Hi Ian,
> > >
> > > I've sent a patch to fix it and the patch already merged. Thanks.

Also, already merged where? Upstream? In the riscv kernel tree? where?

- Arnaldo

> > > https://lore.kernel.org/all/20240719115018.27356-1-eric.lin@sifive.com/
> > 
> > Hi Eric/Arnaldo,
> > 
> > Right, I already commented this should have gone through the
> > perf-tools-next tree:
> > https://lore.kernel.org/all/CAP-5=fV3NXkKsCP1WH0_qLRNpL+WuP8S3h1=cHaUMH5MFkVHQg@mail.gmail.com/
> > Arnaldo, please take Eric's patch in preference to this one.
> 
> So I removed your version from perf-tools-next, eventually we'll get
> this merged upstream, I'm just checking this isn't going to get in our
> way of testing what we have in perf-tools-next...
> 
> 
> - Arnaldo


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

* Re: [PATCH v1 4/5] perf pmu-events: Remove duplicated riscv firmware event
  2024-08-06 13:51         ` Arnaldo Carvalho de Melo
@ 2024-08-06 15:50           ` Eric Lin
  2024-08-06 17:04             ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 13+ messages in thread
From: Eric Lin @ 2024-08-06 15:50 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Ian Rogers, Peter Zijlstra, Ingo Molnar, Namhyung Kim,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Adrian Hunter,
	Kan Liang, John Garry, Will Deacon, James Clark, Mike Leach,
	Leo Yan, Paul Walmsley, Palmer Dabbelt, Albert Ou, Samuel Holland,
	Charles Ci-Jyun Wu, Locus Wei-Han Chen, Atish Patra,
	Ji Sheng Teoh, Inochi Amaoto, Jing Zhang, Xu Yang, Sandipan Das,
	Guilherme Amadio, Changbin Du, linux-perf-users, linux-kernel,
	linux-arm-kernel, linux-riscv, vincent.chen, greentime.hu

Hi Arnaldo,

On Tue, Aug 6, 2024 at 9:51 PM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
>
> On Tue, Aug 06, 2024 at 10:38:07AM -0300, Arnaldo Carvalho de Melo wrote:
> > On Mon, Aug 05, 2024 at 09:05:26PM -0700, Ian Rogers wrote:
> > > On Mon, Aug 5, 2024 at 8:54 PM Eric Lin <eric.lin@sifive.com> wrote:
> > > >
> > > > Hi Ian,
> > > >
> > > > I've sent a patch to fix it and the patch already merged. Thanks.
>
> Also, already merged where? Upstream? In the riscv kernel tree? where?
>

The patch already merged to Linux upstream:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=63ba5b0fb4f54db256ec43b3062b2606b383055d

Thanks.

Best regards,
Eric Lin

> - Arnaldo
>
> > > > https://lore.kernel.org/all/20240719115018.27356-1-eric.lin@sifive.com/
> > >
> > > Hi Eric/Arnaldo,
> > >
> > > Right, I already commented this should have gone through the
> > > perf-tools-next tree:
> > > https://lore.kernel.org/all/CAP-5=fV3NXkKsCP1WH0_qLRNpL+WuP8S3h1=cHaUMH5MFkVHQg@mail.gmail.com/
> > > Arnaldo, please take Eric's patch in preference to this one.
> >
> > So I removed your version from perf-tools-next, eventually we'll get
> > this merged upstream, I'm just checking this isn't going to get in our
> > way of testing what we have in perf-tools-next...
> >
> >
> > - Arnaldo


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

* Re: [PATCH v1 4/5] perf pmu-events: Remove duplicated riscv firmware event
  2024-08-06 15:50           ` Eric Lin
@ 2024-08-06 17:04             ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 13+ messages in thread
From: Arnaldo Carvalho de Melo @ 2024-08-06 17:04 UTC (permalink / raw)
  To: Eric Lin
  Cc: Ian Rogers, Peter Zijlstra, Ingo Molnar, Namhyung Kim,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Adrian Hunter,
	Kan Liang, John Garry, Will Deacon, James Clark, Mike Leach,
	Leo Yan, Paul Walmsley, Palmer Dabbelt, Albert Ou, Samuel Holland,
	Charles Ci-Jyun Wu, Locus Wei-Han Chen, Atish Patra,
	Ji Sheng Teoh, Inochi Amaoto, Jing Zhang, Xu Yang, Sandipan Das,
	Guilherme Amadio, Changbin Du, linux-perf-users, linux-kernel,
	linux-arm-kernel, linux-riscv, vincent.chen, greentime.hu

On Tue, Aug 06, 2024 at 11:50:01PM +0800, Eric Lin wrote:
> On Tue, Aug 6, 2024 at 9:51 PM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> > On Tue, Aug 06, 2024 at 10:38:07AM -0300, Arnaldo Carvalho de Melo wrote:
> > > On Mon, Aug 05, 2024 at 09:05:26PM -0700, Ian Rogers wrote:
> > > > On Mon, Aug 5, 2024 at 8:54 PM Eric Lin <eric.lin@sifive.com> wrote:

> > > > > I've sent a patch to fix it and the patch already merged. Thanks.

> > Also, already merged where? Upstream? In the riscv kernel tree? where?

> The patch already merged to Linux upstream:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=63ba5b0fb4f54db256ec43b3062b2606b383055d

Ok, I'm resolving this with removing Ian's patch and doing a merge with
upstream to pick this patch and keep perf-tools-next building.

- Arnaldo


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

end of thread, other threads:[~2024-08-06 17:05 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-05 19:44 [PATCH v1 1/5] perf test: Add build test for JEVENTS_ARCH=all Ian Rogers
2024-08-05 19:44 ` [PATCH v1 2/5] perf pmu-events: Change dependencies for empty-pmu-events.c test Ian Rogers
2024-08-05 20:03   ` Arnaldo Carvalho de Melo
2024-08-05 19:44 ` [PATCH v1 3/5] perf pmu-events: Remove duplicated ampereone event Ian Rogers
2024-08-05 19:44 ` [PATCH v1 4/5] perf pmu-events: Remove duplicated riscv firmware event Ian Rogers
2024-08-06  3:54   ` Eric Lin
2024-08-06  4:05     ` Ian Rogers
2024-08-06 13:38       ` Arnaldo Carvalho de Melo
2024-08-06 13:50         ` Arnaldo Carvalho de Melo
2024-08-06 13:51         ` Arnaldo Carvalho de Melo
2024-08-06 15:50           ` Eric Lin
2024-08-06 17:04             ` Arnaldo Carvalho de Melo
2024-08-05 19:44 ` [PATCH v1 5/5] perf jevents.py: Ensure event names aren't duplicated Ian Rogers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).