perf stat: Fix invalid output handle
authorJames Clark <james.clark@arm.com>
Wed, 30 Nov 2022 11:15:21 +0000 (11:15 +0000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 14 Dec 2022 14:16:12 +0000 (11:16 -0300)
commit3f81f72d30b46efb614d93f430684c0deb8439b7
treeb169322dff18eb65912cd8c2801a9e1b38d5b9a0
parent117195d9f8af74c65bf57d9b56f496b5b3655bcb
perf stat: Fix invalid output handle

In this context, 'os' is already a pointer so the extra dereference
isn't required. This fixes the following test failure on aarch64:

  $ ./perf test "json output" -vvv
  92: perf stat JSON output linter                                    :
  --- start ---
  Checking json output: no args Test failed for input:
  ...
  Fatal error: glibc detected an invalid stdio handle
  ---- end ----
  perf stat JSON output linter: FAILED!

Fixes: e7f4da312259e618 ("perf stat: Pass struct outstate to printout()")
Signed-off-by: James Clark <james.clark@arm.com>
Tested-by: Athira Jajeev <atrajeev@linux.vnet.ibm.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.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>
Link: https://lore.kernel.org/r/20221130111521.334152-2-james.clark@arm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/stat-display.c