Patch "perf list: Fix topic and pmu_name argument order" has been added to the 6.12-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    perf list: Fix topic and pmu_name argument order

to the 6.12-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     perf-list-fix-topic-and-pmu_name-argument-order.patch
and it can be found in the queue-6.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 99b970bb3e7bae5fcd37966b0b0b42a28d416ca2
Author: Jean-Philippe Romain <jean-philippe.romain@xxxxxxxxxxx>
Date:   Fri Nov 8 18:58:01 2024 -0800

    perf list: Fix topic and pmu_name argument order
    
    [ Upstream commit d99b3125726aade4f5ec4aae04805134ab4b0abd ]
    
    Fix function definitions to match header file declaration. Fix two
    callers to pass the arguments in the right order.
    
    On Intel Tigerlake, before:
    ```
    $ perf list -j|grep "\"Topic\""|sort|uniq
            "Topic": "cache",
            "Topic": "cpu",
            "Topic": "floating point",
            "Topic": "frontend",
            "Topic": "memory",
            "Topic": "other",
            "Topic": "pfm icl",
            "Topic": "pfm ix86arch",
            "Topic": "pfm perf_raw",
            "Topic": "pipeline",
            "Topic": "tool",
            "Topic": "uncore interconnect",
            "Topic": "uncore memory",
            "Topic": "uncore other",
            "Topic": "virtual memory",
    $ perf list -j|grep "\"Unit\""|sort|uniq
            "Unit": "cache",
            "Unit": "cpu",
            "Unit": "cstate_core",
            "Unit": "cstate_pkg",
            "Unit": "i915",
            "Unit": "icl",
            "Unit": "intel_bts",
            "Unit": "intel_pt",
            "Unit": "ix86arch",
            "Unit": "msr",
            "Unit": "perf_raw",
            "Unit": "power",
            "Unit": "tool",
            "Unit": "uncore_arb",
            "Unit": "uncore_clock",
            "Unit": "uncore_imc_free_running_0",
            "Unit": "uncore_imc_free_running_1",
    ```
    
    After:
    ```
    $ perf list -j|grep "\"Topic\""|sort|uniq
            "Topic": "cache",
            "Topic": "floating point",
            "Topic": "frontend",
            "Topic": "memory",
            "Topic": "other",
            "Topic": "pfm icl",
            "Topic": "pfm ix86arch",
            "Topic": "pfm perf_raw",
            "Topic": "pipeline",
            "Topic": "tool",
            "Topic": "uncore interconnect",
            "Topic": "uncore memory",
            "Topic": "uncore other",
            "Topic": "virtual memory",
    $ perf list -j|grep "\"Unit\""|sort|uniq
            "Unit": "cpu",
            "Unit": "cstate_core",
            "Unit": "cstate_pkg",
            "Unit": "i915",
            "Unit": "icl",
            "Unit": "intel_bts",
            "Unit": "intel_pt",
            "Unit": "ix86arch",
            "Unit": "msr",
            "Unit": "perf_raw",
            "Unit": "power",
            "Unit": "tool",
            "Unit": "uncore_arb",
            "Unit": "uncore_clock",
            "Unit": "uncore_imc_free_running_0",
            "Unit": "uncore_imc_free_running_1",
    ```
    
    Fixes: e5c6109f4813246a ("perf list: Reorganize to use callbacks to allow honouring command line options")
    Reviewed-by: Kan Liang <kan.liang@xxxxxxxxxxxxxxx>
    Signed-off-by: Jean-Philippe Romain <jean-philippe.romain@xxxxxxxxxxx>
    Tested-by: Ian Rogers <irogers@xxxxxxxxxx>
    Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
    Cc: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>
    Cc: Ingo Molnar <mingo@xxxxxxxxxx>
    Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
    Cc: Junhao He <hejunhao3@xxxxxxxxxx>
    Cc: Mark Rutland <mark.rutland@xxxxxxx>
    Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
    Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20241109025801.560378-1-irogers@xxxxxxxxxx
    [ I fixed the two callers and added it to Jean-Phillippe's original change. ]
    Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
    Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c
index 65b8cba324be4..c5331721dfee9 100644
--- a/tools/perf/builtin-list.c
+++ b/tools/perf/builtin-list.c
@@ -112,7 +112,7 @@ static void wordwrap(FILE *fp, const char *s, int start, int max, int corr)
 	}
 }
 
-static void default_print_event(void *ps, const char *pmu_name, const char *topic,
+static void default_print_event(void *ps, const char *topic, const char *pmu_name,
 				const char *event_name, const char *event_alias,
 				const char *scale_unit __maybe_unused,
 				bool deprecated, const char *event_type_desc,
@@ -353,7 +353,7 @@ static void fix_escape_fprintf(FILE *fp, struct strbuf *buf, const char *fmt, ..
 	fputs(buf->buf, fp);
 }
 
-static void json_print_event(void *ps, const char *pmu_name, const char *topic,
+static void json_print_event(void *ps, const char *topic, const char *pmu_name,
 			     const char *event_name, const char *event_alias,
 			     const char *scale_unit,
 			     bool deprecated, const char *event_type_desc,
diff --git a/tools/perf/util/pfm.c b/tools/perf/util/pfm.c
index 5ccfe4b64cdfe..0dacc133ed396 100644
--- a/tools/perf/util/pfm.c
+++ b/tools/perf/util/pfm.c
@@ -233,7 +233,7 @@ print_libpfm_event(const struct print_callbacks *print_cb, void *print_state,
 	}
 
 	if (is_libpfm_event_supported(name, cpus, threads)) {
-		print_cb->print_event(print_state, pinfo->name, topic,
+		print_cb->print_event(print_state, topic, pinfo->name,
 				      name, info->equiv,
 				      /*scale_unit=*/NULL,
 				      /*deprecated=*/NULL, "PFM event",
@@ -267,8 +267,8 @@ print_libpfm_event(const struct print_callbacks *print_cb, void *print_state,
 				continue;
 
 			print_cb->print_event(print_state,
-					pinfo->name,
 					topic,
+					pinfo->name,
 					name, /*alias=*/NULL,
 					/*scale_unit=*/NULL,
 					/*deprecated=*/NULL, "PFM event",
diff --git a/tools/perf/util/pmus.c b/tools/perf/util/pmus.c
index 52109af5f2f12..d7d67e09d759b 100644
--- a/tools/perf/util/pmus.c
+++ b/tools/perf/util/pmus.c
@@ -494,8 +494,8 @@ void perf_pmus__print_pmu_events(const struct print_callbacks *print_cb, void *p
 			goto free;
 
 		print_cb->print_event(print_state,
-				aliases[j].pmu_name,
 				aliases[j].topic,
+				aliases[j].pmu_name,
 				aliases[j].name,
 				aliases[j].alias,
 				aliases[j].scale_unit,




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux