From: Leo Yan Date: Thu, 2 Apr 2026 16:04:48 +0000 (+0100) Subject: perf expr: Add '\n' in literal parse errors X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d148934beeacaf074e1e6f00fae3be737bbc4089;p=thirdparty%2Flinux.git perf expr: Add '\n' in literal parse errors Add a trailing newline for logs. Before: perf stat -C 5 Failure to read '#slots'Cannot find metric or group `Default' After: perf stat -C 5 Failure to read '#slots' Cannot find metric or group `Default' Signed-off-by: Leo Yan Reviewed-by: Ian Rogers Signed-off-by: Namhyung Kim --- diff --git a/tools/perf/util/expr.c b/tools/perf/util/expr.c index b7664cb68554b..644769e927089 100644 --- a/tools/perf/util/expr.c +++ b/tools/perf/util/expr.c @@ -407,9 +407,9 @@ double expr__get_literal(const char *literal, const struct expr_scanner_ctx *ctx &count)) result = count; else - pr_err("Failure to read '%s'", literal); + pr_err("Failure to read '%s'\n", literal); } else { - pr_err("Unrecognized literal '%s'", literal); + pr_err("Unrecognized literal '%s'\n", literal); } pr_debug2("literal: %s = %f\n", literal, result);