mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
perf expr: Allow exponents on floating point values
Pass the optional exponent component through to strtod that already supports it. We already have exponents in ScaleUnit and so this adds uniformity. Reported-by: Zhengjun Xing <zhengjun.xing@linux.intel.com> Reviewed-By: Kajol Jain <kjain@linux.ibm.com> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Richter <tmricht@linux.ibm.com> Link: https://lore.kernel.org/r/20220527020653.4160884-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
b236371421
commit
e5287e6dd3
2 changed files with 3 additions and 1 deletions
|
@ -97,6 +97,8 @@ static int test__expr(struct test_suite *t __maybe_unused, int subtest __maybe_u
|
|||
ret |= test(ctx, "2.2 > 2.2", 0);
|
||||
ret |= test(ctx, "2.2 < 1.1", 0);
|
||||
ret |= test(ctx, "1.1 > 2.2", 0);
|
||||
ret |= test(ctx, "1.1e10 < 1.1e100", 1);
|
||||
ret |= test(ctx, "1.1e2 > 1.1e-2", 1);
|
||||
|
||||
if (ret) {
|
||||
expr__ctx_free(ctx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue