All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicholas Fraser <nfraser@codeweavers.com>
To: Jiri Olsa <jolsa@redhat.com>
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>,
	Namhyung Kim <namhyung@kernel.org>,
	Ian Rogers <irogers@google.com>,
	Stephane Eranian <eranian@google.com>,
	Tan Xiaojun <tanxiaojun@huawei.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf data: export to JSON
Date: Wed, 31 Mar 2021 06:38:16 -0400	[thread overview]
Message-ID: <2d78b018-df5a-36cb-2f78-d3ca11bf9513@codeweavers.com> (raw)
In-Reply-To: <YFuC5ONRvAPKwtKX@krava>

Hi Jiri,

Thanks for the review. I've addressed your suggestions; some notes are
below. I'll send a new patch.


On 2021-03-24 2:20 p.m., Jiri Olsa wrote:
> On Wed, Mar 24, 2021 at 09:06:50AM -0400, Nicholas Fraser wrote:
>> [...] We use this to import the data into a tool on Windows
>> where integrating perf or libbabeltrace is impractical.
> 
> hi,
> exciting ;-) and curious, which tool is that?
> 

The tool is called gpuvis. The perf JSON parsing support is here:

https://github.com/ludocode/gpuvis

The idea is to be able to line up samples from perf with GPU trace events, so
you can do things like timebox all perf samples in a particular frame of
rendering.


> we already have zstd support compiled in for compressing samples,
> should be easy to use it for compressing the output of this right
> away

This would require that apps that consume this integrate zstd as well. It's
simpler (both conceptually and from an integration standpoint) to just compress
on command-line if you need with whatever compressor you want. You can even do
this inline by writing to /dev/stdout, e.g.:

    perf data convert --to-json /dev/stdout --force | zstd > out.json.zstd

Since we're transferring to Windows, more likely we'd output the JSON and then
put it in a .zip container.


> I understand not supporting opts.all or opts.tod, but 'force'
> support means just assigning 'force' to struct perf_data

It's not clear to me what 'force' does on 'struct perf_data' since we're only
reading it. I assumed for data export it meant the output file should be
overwritten. I've made it do both in the replacement patch.


Nick

  reply	other threads:[~2021-03-31 10:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-24 13:06 [PATCH] perf data: export to JSON Nicholas Fraser
2021-03-24 13:30 ` Arnaldo Carvalho de Melo
2021-03-31 10:32   ` Nicholas Fraser
2021-03-24 18:20 ` Jiri Olsa
2021-03-31 10:38   ` Nicholas Fraser [this message]
2021-04-01 12:15     ` Jiri Olsa

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=2d78b018-df5a-36cb-2f78-d3ca11bf9513@codeweavers.com \
    --to=nfraser@codeweavers.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=eranian@google.com \
    --cc=irogers@google.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tanxiaojun@huawei.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.