Skip to contentSkip to conversation

Revert "perf stat: Rename "aggregate-number" to "cpu-count" in JSON"

PATCH In review Namhyung Kim 2 participants 2 messages Nov 30, 2022 – Dec 5, 2022 perf events

lore
Share & tools
lore

Namhyung Kim

author maintainer
#0 lore raw

PATCH 1/1 Revert "perf stat: Rename "aggregate-number" to "cpu-count" in JSON"

This reverts commit c4b41b83c25073c09bfcc4e5ec496c9dd316656b.

As Ian said, the "cpu-count" is not appropriate for uncore events, also it caused a perf test failure.

---
 tools/perf/util/stat-display.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
tools/perf/util/stat-display.c +4 -4
index 847acdb5dc40..f1ee4b052198 100644
@@ -281,19 +281,19 @@ static void print_aggr_id_json(struct perf_stat_config *config,
 
 	switch (config->aggr_mode) {
 	case AGGR_CORE:
-		fprintf(output, "\"core\" : \"S%d-D%d-C%d\", \"cpu-count\" : %d, ",
+		fprintf(output, "\"core\" : \"S%d-D%d-C%d\", \"aggregate-number\" : %d, ",
 			id.socket, id.die, id.core, nr);
 		break;
 	case AGGR_DIE:
-		fprintf(output, "\"die\" : \"S%d-D%d\", \"cpu-count\" : %d, ",
+		fprintf(output, "\"die\" : \"S%d-D%d\", \"aggregate-number\" : %d, ",
 			id.socket, id.die, nr);
 		break;
 	case AGGR_SOCKET:
-		fprintf(output, "\"socket\" : \"S%d\", \"cpu-count\" : %d, ",
+		fprintf(output, "\"socket\" : \"S%d\", \"aggregate-number\" : %d, ",
 			id.socket, nr);
 		break;
 	case AGGR_NODE:
-		fprintf(output, "\"node\" : \"N%d\", \"cpu-count\" : %d, ",
+		fprintf(output, "\"node\" : \"N%d\", \"aggregate-number\" : %d, ",
 			id.node, nr);
 		break;
 	case AGGR_NONE:
Signature · 1 line
2.38.1.584.g0f3c55d4c2-goog
#1 lore raw

Em Wed, Nov 30, 2022 at 11:36:13AM -0800, Namhyung Kim escreveu:

Quoted 4 lines

This reverts commit c4b41b83c25073c09bfcc4e5ec496c9dd316656b.

As Ian said, the "cpu-count" is not appropriate for uncore events, also it caused a perf test failure.

This was applied, thanks.

- Arnaldo

Quoted 35 lines
---
 tools/perf/util/stat-display.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
tools/perf/util/stat-display.c +4 -4
index 847acdb5dc40..f1ee4b052198 100644
@@ -281,19 +281,19 @@ static void print_aggr_id_json(struct perf_stat_config *config,
 
 	switch (config->aggr_mode) {
 	case AGGR_CORE:
-		fprintf(output, "\"core\" : \"S%d-D%d-C%d\", \"cpu-count\" : %d, ",
+		fprintf(output, "\"core\" : \"S%d-D%d-C%d\", \"aggregate-number\" : %d, ",
 			id.socket, id.die, id.core, nr);
 		break;
 	case AGGR_DIE:
-		fprintf(output, "\"die\" : \"S%d-D%d\", \"cpu-count\" : %d, ",
+		fprintf(output, "\"die\" : \"S%d-D%d\", \"aggregate-number\" : %d, ",
 			id.socket, id.die, nr);
 		break;
 	case AGGR_SOCKET:
-		fprintf(output, "\"socket\" : \"S%d\", \"cpu-count\" : %d, ",
+		fprintf(output, "\"socket\" : \"S%d\", \"aggregate-number\" : %d, ",
 			id.socket, nr);
 		break;
 	case AGGR_NODE:
-		fprintf(output, "\"node\" : \"N%d\", \"cpu-count\" : %d, ",
+		fprintf(output, "\"node\" : \"N%d\", \"aggregate-number\" : %d, ",
 			id.node, nr);
 		break;
 	case AGGR_NONE:
Signature · 1 line
2.38.1.584.g0f3c55d4c2-goog
Signature · 1 line
- Arnaldo