]> www.infradead.org Git - users/jedix/linux-maple.git/commit
perf stat: Display "none" for NaN with metric only json
authorIan Rogers <irogers@google.com>
Thu, 17 Oct 2024 17:53:52 +0000 (10:53 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Thu, 17 Oct 2024 19:44:26 +0000 (12:44 -0700)
commit1133e7f7dc53edcb26c0e07d345f7285c3246efa
tree57b9c65a17455b3f5ea11f2acdc06be8396dda00
parent9809b2b1f23d0b7e0c6154ee0e94445e584435d4
perf stat: Display "none" for NaN with metric only json

Return earlier for an empty unit case. If snprintf of the fmt doesn't
produce digits between vals and ends, as happens with NaN, make the
value "none" as happens in print_metric_end.

Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Yicong Yang <yangyicong@hisilicon.com>
Cc: Weilin Wang <weilin.wang@intel.com>
Cc: Will Deacon <will@kernel.org>
Cc: James Clark <james.clark@linaro.org>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Leo Yan <leo.yan@linux.dev>
Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Cc: John Garry <john.g.garry@oracle.com>
Link: https://lore.kernel.org/r/20241017175356.783793-4-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/util/stat-display.c