mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
To: James Clark <james.clark@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>,
	linux-perf-users@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>
Subject: Re: [PATCH 2/2] perf stat: Fix invalid output handle
Date: Sun, 4 Dec 2022 22:38:28 +0530	[thread overview]
Message-ID: <E93B2D0E-8862-4873-B49F-F74D83CEEDAD@linux.vnet.ibm.com> (raw)
In-Reply-To: <a0745ad9-c21e-2c93-9af4-46e60bc301fc@arm.com>



> On 01-Dec-2022, at 3:36 PM, James Clark <james.clark@arm.com> wrote:
> 
> 
> 
> On 30/11/2022 18:32, Namhyung Kim wrote:
>> On Wed, Nov 30, 2022 at 3:15 AM James Clark <james.clark@arm.com> wrote:
>>> 
>>> 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: e7f4da312259 ("perf stat: Pass struct outstate to printout()")
>>> Signed-off-by: James Clark <james.clark@arm.com>
>> 
>> Thanks for fixing this.  I'm not sure how I missed it.. :(
>> 
> 
> It seems to only go down that path on some configuration. At least on
> x86 the test was passing fine for me.
> 
>> Acked-by: Namhyung Kim <namhyung@kernel.org>
> 
> Thanks for the review!

Faced same issue on powerpc. Tested with this change and it works with this patch.

Tested-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>

Thanks
Athira
> 
>> 
>> Thanks,
>> Namhyung
>> 
>> 
>>> ---
>>> tools/perf/util/stat-display.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>> 
>>> diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c
>>> index 847acdb5dc40..eac5ac3a734c 100644
>>> --- a/tools/perf/util/stat-display.c
>>> +++ b/tools/perf/util/stat-display.c
>>> @@ -741,7 +741,7 @@ static void printout(struct perf_stat_config *config, struct outstate *os,
>>>                perf_stat__print_shadow_stats(config, counter, uval, map_idx,
>>>                                              &out, &config->metric_events, &rt_stat);
>>>        } else {
>>> -               pm(config, &os, /*color=*/NULL, /*format=*/NULL, /*unit=*/"", /*val=*/0);
>>> +               pm(config, os, /*color=*/NULL, /*format=*/NULL, /*unit=*/"", /*val=*/0);
>>>        }
>>> 
>>>        if (!config->metric_only) {
>>> --
>>> 2.25.1


  reply	other threads:[~2022-12-04 17:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-30 11:15 [PATCH 1/2] perf tests: Fix "perf stat JSON output linter" test for new output James Clark
2022-11-30 11:15 ` [PATCH 2/2] perf stat: Fix invalid output handle James Clark
2022-11-30 18:32   ` Namhyung Kim
2022-12-01 10:06     ` James Clark
2022-12-04 17:08       ` Athira Rajeev [this message]
2022-12-05 13:07         ` Arnaldo Carvalho de Melo
2022-11-30 18:18 ` [PATCH 1/2] perf tests: Fix "perf stat JSON output linter" test for new output Ian Rogers
2022-11-30 18:31   ` Namhyung Kim
2022-12-02 18:46   ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E93B2D0E-8862-4873-B49F-F74D83CEEDAD@linux.vnet.ibm.com \
    --to=atrajeev@linux.vnet.ibm.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=james.clark@arm.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®