All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Rogers <irogers@google.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,
	Kan Liang <kan.liang@linux.intel.com>,
	Zhengjun Xing <zhengjun.xing@linux.intel.com>,
	Sandipan Das <sandipan.das@amd.com>,
	Claire Jensen <cjense@google.com>, Alyssa Ross <hi@alyssa.is>,
	Like Xu <likexu@tencent.com>, James Clark <james.clark@arm.com>,
	Florian Fischer <florian.fischer@muhq.space>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-perf-users <linux-perf-users@vger.kernel.org>,
	Claire Jensen <clairej735@gmail.com>,
	Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH v4 2/3] perf stat: Add JSON output option
Date: Tue, 31 May 2022 16:18:26 -0700	[thread overview]
Message-ID: <CAP-5=fXu5rSV6C=WCs3bkCuaXknoKZv6o0O5gGAJKeLcAFuVcA@mail.gmail.com> (raw)
In-Reply-To: <CAP-5=fXcskdtN_dz5jcVywq8S1=pC5TdEN25LcEXzd0Gyk+o+w@mail.gmail.com>

On Tue, May 31, 2022 at 4:13 PM Ian Rogers <irogers@google.com> wrote:
>
> On Tue, May 31, 2022 at 3:46 PM Namhyung Kim <namhyung@kernel.org> wrote:
> >
> > Hi Ian,
> >
> > On Tue, May 24, 2022 at 10:38 PM Ian Rogers <irogers@google.com> wrote:
> > >
> > > From: Claire Jensen <cjense@google.com>
> > >
> > > CSV output is tricky to format and column layout changes are susceptible
> > > to breaking parsers. New JSON-formatted output has variable names to
> > > identify fields that are consistent and informative, making
> > > the output parseable.
> > >
> > > CSV output example:
> > >
> > > 1.20,msec,task-clock:u,1204272,100.00,0.697,CPUs utilized
> > > 0,,context-switches:u,1204272,100.00,0.000,/sec
> > > 0,,cpu-migrations:u,1204272,100.00,0.000,/sec
> > > 70,,page-faults:u,1204272,100.00,58.126,K/sec
> > >
> > > JSON output example:
> > >
> > > {"counter-value" : "3805.723968", "unit" : "msec", "event" :
> > > "cpu-clock", "event-runtime" : 3805731510100.00, "pcnt-running"
> > > : 100.00, "metric-value" : 4.007571, "metric-unit" : "CPUs utilized"}
> > > {"counter-value" : "6166.000000", "unit" : "", "event" :
> > > "context-switches", "event-runtime" : 3805723045100.00, "pcnt-running"
> > > : 100.00, "metric-value" : 1.620191, "metric-unit" : "K/sec"}
> > > {"counter-value" : "466.000000", "unit" : "", "event" :
> > > "cpu-migrations", "event-runtime" : 3805727613100.00, "pcnt-running"
> > > : 100.00, "metric-value" : 122.447136, "metric-unit" : "/sec"}
> > > {"counter-value" : "208.000000", "unit" : "", "event" :
> > > "page-faults", "event-runtime" : 3805726799100.00, "pcnt-running"
> > > : 100.00, "metric-value" : 54.654516, "metric-unit" : "/sec"}
> > >
> > > Also added documentation for JSON option.
> > > There is some tidy up of CSV code including a potential memory over run
> > > in the os.nfields set up. To facilitate this an AGGR_MAX value is added.
> > >
> > > Signed-off-by: Claire Jensen <cjense@google.com>
> >
> > Your sign-off as well?
>
> Doh:
> Signed-off-by: Ian Rogers <irogers@google.com>
>
> Thanks,
> Ian

Actually, this was fixed in V5:
https://lore.kernel.org/lkml/20220526224515.4088240-1-irogers@google.com/

Thanks,
Ian

> > Anyway, I think there are places to clean up this part of code
> > more but that's not a part of the work.  Maybe I need to find
> > some time to do that later.
> >
> > Acked-by: Namhyung Kim <namhyung@kernel.org>
> >
> > Thanks,
> > Namhyung

  reply	other threads:[~2022-05-31 23:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-25  5:38 [PATCH v4 0/3] JSON output for perf stat Ian Rogers
2022-05-25  5:38 ` [PATCH v4 1/3] perf test: Add checking for perf stat CSV output Ian Rogers
2022-05-25 11:07   ` Arnaldo Carvalho de Melo
2022-05-25  5:38 ` [PATCH v4 2/3] perf stat: Add JSON output option Ian Rogers
2022-05-31 22:46   ` Namhyung Kim
2022-05-31 23:13     ` Ian Rogers
2022-05-31 23:18       ` Ian Rogers [this message]
2022-08-10 14:03       ` Arnaldo Carvalho de Melo
2022-05-25  5:38 ` [PATCH v4 3/3] perf test: Json format checking Ian Rogers
2022-05-25 11:18 ` [PATCH v4 0/3] JSON output for perf stat Arnaldo Carvalho de Melo
2022-05-25 11:21   ` 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='CAP-5=fXu5rSV6C=WCs3bkCuaXknoKZv6o0O5gGAJKeLcAFuVcA@mail.gmail.com' \
    --to=irogers@google.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=cjense@google.com \
    --cc=clairej735@gmail.com \
    --cc=eranian@google.com \
    --cc=florian.fischer@muhq.space \
    --cc=hi@alyssa.is \
    --cc=james.clark@arm.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=likexu@tencent.com \
    --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 \
    --cc=sandipan.das@amd.com \
    --cc=zhengjun.xing@linux.intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.