]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
perf expr: Add '\n' in literal parse errors
authorLeo Yan <leo.yan@arm.com>
Thu, 2 Apr 2026 16:04:48 +0000 (17:04 +0100)
committerNamhyung Kim <namhyung@kernel.org>
Fri, 3 Apr 2026 01:10:59 +0000 (18:10 -0700)
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 <leo.yan@arm.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/util/expr.c

index b7664cb68554b284c2b64ca750bdfb114fa5515e..644769e927089ea1dd2f9252078c35a69fa48dce 100644 (file)
@@ -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);