Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'perf-tools-fixes-for-v6.1-2-2022-11-10' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux

Pull perf tools fixes from Arnaldo Carvalho de Melo:

- Fix 'perf stat' crash with --per-node --metric-only in CSV mode, due
to the AGGR_NODE slot in the 'aggr_header_csv' array not being set.

- Fix printing prefix in CSV output of 'perf stat' metrics in interval
mode (-I), where an extra separator was being added to the start of
some lines.

- Fix skipping branch stack sampling 'perf test' entry, that was using
both --branch-any and --branch-filter, which can't be used together.

* tag 'perf-tools-fixes-for-v6.1-2-2022-11-10' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
perf tools: Add the include/perf/ directory to .gitignore
perf test: Fix skipping branch stack sampling test
perf stat: Fix printing os->prefix in CSV metrics output
perf stat: Fix crash with --per-node --metric-only in CSV mode

+12 -4
+1
tools/perf/.gitignore
··· 4 4 PERF-VERSION-FILE 5 5 FEATURE-DUMP 6 6 perf 7 + !include/perf/ 7 8 perf-read-vdso32 8 9 perf-read-vdsox32 9 10 perf-help
+4 -1
tools/perf/tests/shell/test_brstack.sh
··· 13 13 14 14 # skip the test if the hardware doesn't support branch stack sampling 15 15 # and if the architecture doesn't support filter types: any,save_type,u 16 - perf record -b -o- -B --branch-filter any,save_type,u true > /dev/null 2>&1 || exit 2 16 + if ! perf record -o- --no-buildid --branch-filter any,save_type,u -- true > /dev/null 2>&1 ; then 17 + echo "skip: system doesn't support filter types: any,save_type,u" 18 + exit 2 19 + fi 17 20 18 21 TMPDIR=$(mktemp -d /tmp/__perf_test.program.XXXXX) 19 22
+3 -1
tools/perf/util/parse-branch-options.c
··· 102 102 /* 103 103 * cannot set it twice, -b + --branch-filter for instance 104 104 */ 105 - if (*mode) 105 + if (*mode) { 106 + pr_err("Error: Can't use --branch-any (-b) with --branch-filter (-j).\n"); 106 107 return -1; 108 + } 107 109 108 110 return parse_branch_str(str, mode); 109 111 }
+4 -2
tools/perf/util/stat-display.c
··· 273 273 274 274 fputc('\n', os->fh); 275 275 if (os->prefix) 276 - fprintf(os->fh, "%s%s", os->prefix, config->csv_sep); 276 + fprintf(os->fh, "%s", os->prefix); 277 277 aggr_printout(config, os->evsel, os->id, os->nr); 278 278 for (i = 0; i < os->nfields; i++) 279 279 fputs(config->csv_sep, os->fh); ··· 559 559 [AGGR_CORE] = 2, 560 560 [AGGR_THREAD] = 1, 561 561 [AGGR_UNSET] = 0, 562 - [AGGR_NODE] = 0, 562 + [AGGR_NODE] = 1, 563 563 }; 564 564 565 565 pm = config->metric_only ? print_metric_only_csv : print_metric_csv; ··· 1124 1124 [AGGR_SOCKET] = 12, 1125 1125 [AGGR_NONE] = 6, 1126 1126 [AGGR_THREAD] = 24, 1127 + [AGGR_NODE] = 6, 1127 1128 [AGGR_GLOBAL] = 0, 1128 1129 }; 1129 1130 ··· 1134 1133 [AGGR_SOCKET] = "socket,cpus", 1135 1134 [AGGR_NONE] = "cpu,", 1136 1135 [AGGR_THREAD] = "comm-pid,", 1136 + [AGGR_NODE] = "node,", 1137 1137 [AGGR_GLOBAL] = "" 1138 1138 }; 1139 1139