Skip to content

Commit db1f5f1

Browse files
Yang Jihongnamhyung
authored andcommitted
perf stat: Add missing newline in pr_err messages
The newline is missing for error messages in add_default_attributes() Before: # perf stat --topdown Topdown requested but the topdown metric groups aren't present. (See perf list the metric groups have names like TopdownL1)# After: # perf stat --topdown Topdown requested but the topdown metric groups aren't present. (See perf list the metric groups have names like TopdownL1) # In addition, perf_stat_init_aggr_mode() and perf_stat_init_aggr_mode_file() have the same problem, fixed by the way. Signed-off-by: Yang Jihong <[email protected]> Acked-by: Ian Rogers <[email protected]> Reviewed-by: James Clark <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]>
1 parent 82fe2e4 commit db1f5f1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tools/perf/builtin-stat.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1596,7 +1596,7 @@ static int perf_stat_init_aggr_mode(void)
15961596
stat_config.aggr_map = cpu_aggr_map__new(evsel_list->core.user_requested_cpus,
15971597
get_id, /*data=*/NULL, needs_sort);
15981598
if (!stat_config.aggr_map) {
1599-
pr_err("cannot build %s map", aggr_mode__string[stat_config.aggr_mode]);
1599+
pr_err("cannot build %s map\n", aggr_mode__string[stat_config.aggr_mode]);
16001600
return -1;
16011601
}
16021602
stat_config.aggr_get_id = aggr_mode__get_id(stat_config.aggr_mode);
@@ -1912,7 +1912,7 @@ static int perf_stat_init_aggr_mode_file(struct perf_stat *st)
19121912
stat_config.aggr_map = cpu_aggr_map__new(evsel_list->core.user_requested_cpus,
19131913
get_id, env, needs_sort);
19141914
if (!stat_config.aggr_map) {
1915-
pr_err("cannot build %s map", aggr_mode__string[stat_config.aggr_mode]);
1915+
pr_err("cannot build %s map\n", aggr_mode__string[stat_config.aggr_mode]);
19161916
return -1;
19171917
}
19181918
stat_config.aggr_get_id = aggr_mode__get_id_file(stat_config.aggr_mode);
@@ -2052,7 +2052,7 @@ static int add_default_attributes(void)
20522052
* on an architecture test for such a metric name.
20532053
*/
20542054
if (!metricgroup__has_metric(pmu, "transaction")) {
2055-
pr_err("Missing transaction metrics");
2055+
pr_err("Missing transaction metrics\n");
20562056
return -1;
20572057
}
20582058
return metricgroup__parse_groups(evsel_list, pmu, "transaction",
@@ -2068,7 +2068,7 @@ static int add_default_attributes(void)
20682068
int smi;
20692069

20702070
if (sysfs__read_int(FREEZE_ON_SMI_PATH, &smi) < 0) {
2071-
pr_err("freeze_on_smi is not supported.");
2071+
pr_err("freeze_on_smi is not supported.\n");
20722072
return -1;
20732073
}
20742074

@@ -2081,7 +2081,7 @@ static int add_default_attributes(void)
20812081
}
20822082

20832083
if (!metricgroup__has_metric(pmu, "smi")) {
2084-
pr_err("Missing smi metrics");
2084+
pr_err("Missing smi metrics\n");
20852085
return -1;
20862086
}
20872087

@@ -2106,7 +2106,7 @@ static int add_default_attributes(void)
21062106

21072107
if (!max_level) {
21082108
pr_err("Topdown requested but the topdown metric groups aren't present.\n"
2109-
"(See perf list the metric groups have names like TopdownL1)");
2109+
"(See perf list the metric groups have names like TopdownL1)\n");
21102110
return -1;
21112111
}
21122112
if (stat_config.topdown_level > max_level) {

0 commit comments

Comments
 (0)