All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eero Tamminen <eero.t.tamminen@intel.com>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
	igt-dev@lists.freedesktop.org
Cc: Intel-gfx@lists.freedesktop.org, 3.14pi@ukr.net
Subject: Re: [IGT 1/2] tools/intel_gpu_top: Add support for stdout logging
Date: Tue, 12 Feb 2019 11:31:18 +0200	[thread overview]
Message-ID: <97e1f448-9599-560f-c271-7db1394eb820@intel.com> (raw)
In-Reply-To: <9cdcbecc-63a7-eb87-c7c3-4dc941553741@linux.intel.com>

Hi,

On 11.2.2019 11.49, Tvrtko Ursulin wrote:
> On 08/02/2019 13:58, Eero Tamminen wrote:
>> On 8.2.2019 14.03, Tvrtko Ursulin wrote:
>>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>
>>> Two new output modes are added: listing of text data to standard out (-l
>>> on the command line), and dumping of JSON formatted records (-J), 
>>> also to
>>> standard out.
>>>
>>> The first mode is selected automatically when non-interactive 
>>> standard out
>>> is detected.
>>>
>>> Example of text output:
>>>
>>>   Freq MHz      IRQ RC6 Power     IMC MiB/s           RCS/0 
>>> BCS/0           VCS/0           VCS/1          VECS/0
>>>   req  act       /s   %     W     rd     wr       %  se  wa       % 
>>> se  wa       %  se  wa       %  se  wa       %  se  wa
>>>     0    0        0   0  0.00    360      0    0.00   0   0    0.00 
>>> 0   0    0.00   0   0    0.00   0   0    0.00   0   0
>>>   350  350        0 100  0.00     35      2    0.00   0   0    0.00 
>>> 0   0    0.00   0   0    0.00   0   0    0.00   0   0
>>>   350  350        0 100  0.00     34      2    0.00   0   0    0.00 
>>> 0   0    0.00   0   0    0.00   0   0    0.00   0   0
>>>   350  350        0 100  0.00    143      6    0.00   0   0    0.00 
>>> 0   0    0.00   0   0    0.00   0   0    0.00   0   0
>>>   350  350        0 100  0.00    169      7    0.00   0   0    0.00 
>>> 0   0    0.00   0   0    0.00   0   0    0.00   0   0
>>>   350  350        0 100  0.00    169      7    0.00   0   0    0.00 
>>> 0   0    0.00   0   0    0.00   0   0    0.00   0   0
>>
>> Looks nice!
>>
>> If you add '#' to the start of the header lines, one could use 
>> something like the attached shell script to convert the saved output 
>> to SVG graphs with GnuPlot.
>>
>> Before including the script to igt, it would need to be modified to 
>> adapt to the number of engines, but maybe intel_gpu_top itself could 
>> generate the gnuplot control file when it exits, if given e.g. 
>> --gnuplot argument?
> 
> Hello feature creep! :D
> 
> I could add gnuplot output mode later, just to keep this stage simpler. 
> In that case I would prefer that this mode outputs a single file (or 
> stdout stream) which could be fed to gnuplot directly. Eg. intel_gpu_top 
> -g -o file.out && gnuplot file.out, or even, intel_gpu_top -g | gnuplot. 
> Quick googling shows it should be possible to embed the data in the 
> "control file",

I didn't know that, but it seems simple.  One just uses variable $name 
for the data part instead of headers, and uses that variable name 
instead of file name in plot commands after the data.

New enough GnuPlot version is in all distros which have new enough kernel.


> I am only not sure about the output filename in the 
> second example. But anyway, first example should definitely work.

Gnuplot doesn't care about the control file name extension, and it can 
read it from stdin.  Both of these seem to work fine:
	gnuplot - < plot.gnu
	gnuplot < plot.gnu


	- Eero
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

WARNING: multiple messages have this Message-ID (diff)
From: Eero Tamminen via igt-dev <igt-dev@lists.freedesktop.org>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
	igt-dev@lists.freedesktop.org
Cc: Intel-gfx@lists.freedesktop.org, 3.14pi@ukr.net,
	Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Subject: Re: [igt-dev] [IGT 1/2] tools/intel_gpu_top: Add support for stdout logging
Date: Tue, 12 Feb 2019 11:31:18 +0200	[thread overview]
Message-ID: <97e1f448-9599-560f-c271-7db1394eb820@intel.com> (raw)
In-Reply-To: <9cdcbecc-63a7-eb87-c7c3-4dc941553741@linux.intel.com>

Hi,

On 11.2.2019 11.49, Tvrtko Ursulin wrote:
> On 08/02/2019 13:58, Eero Tamminen wrote:
>> On 8.2.2019 14.03, Tvrtko Ursulin wrote:
>>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>>
>>> Two new output modes are added: listing of text data to standard out (-l
>>> on the command line), and dumping of JSON formatted records (-J), 
>>> also to
>>> standard out.
>>>
>>> The first mode is selected automatically when non-interactive 
>>> standard out
>>> is detected.
>>>
>>> Example of text output:
>>>
>>>   Freq MHz      IRQ RC6 Power     IMC MiB/s           RCS/0 
>>> BCS/0           VCS/0           VCS/1          VECS/0
>>>   req  act       /s   %     W     rd     wr       %  se  wa       % 
>>> se  wa       %  se  wa       %  se  wa       %  se  wa
>>>     0    0        0   0  0.00    360      0    0.00   0   0    0.00 
>>> 0   0    0.00   0   0    0.00   0   0    0.00   0   0
>>>   350  350        0 100  0.00     35      2    0.00   0   0    0.00 
>>> 0   0    0.00   0   0    0.00   0   0    0.00   0   0
>>>   350  350        0 100  0.00     34      2    0.00   0   0    0.00 
>>> 0   0    0.00   0   0    0.00   0   0    0.00   0   0
>>>   350  350        0 100  0.00    143      6    0.00   0   0    0.00 
>>> 0   0    0.00   0   0    0.00   0   0    0.00   0   0
>>>   350  350        0 100  0.00    169      7    0.00   0   0    0.00 
>>> 0   0    0.00   0   0    0.00   0   0    0.00   0   0
>>>   350  350        0 100  0.00    169      7    0.00   0   0    0.00 
>>> 0   0    0.00   0   0    0.00   0   0    0.00   0   0
>>
>> Looks nice!
>>
>> If you add '#' to the start of the header lines, one could use 
>> something like the attached shell script to convert the saved output 
>> to SVG graphs with GnuPlot.
>>
>> Before including the script to igt, it would need to be modified to 
>> adapt to the number of engines, but maybe intel_gpu_top itself could 
>> generate the gnuplot control file when it exits, if given e.g. 
>> --gnuplot argument?
> 
> Hello feature creep! :D
> 
> I could add gnuplot output mode later, just to keep this stage simpler. 
> In that case I would prefer that this mode outputs a single file (or 
> stdout stream) which could be fed to gnuplot directly. Eg. intel_gpu_top 
> -g -o file.out && gnuplot file.out, or even, intel_gpu_top -g | gnuplot. 
> Quick googling shows it should be possible to embed the data in the 
> "control file",

I didn't know that, but it seems simple.  One just uses variable $name 
for the data part instead of headers, and uses that variable name 
instead of file name in plot commands after the data.

New enough GnuPlot version is in all distros which have new enough kernel.


> I am only not sure about the output filename in the 
> second example. But anyway, first example should definitely work.

Gnuplot doesn't care about the control file name extension, and it can 
read it from stdin.  Both of these seem to work fine:
	gnuplot - < plot.gnu
	gnuplot < plot.gnu


	- Eero
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2019-02-12  9:31 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-08 12:03 [IGT 1/2] tools/intel_gpu_top: Add support for stdout logging Tvrtko Ursulin
2019-02-08 12:03 ` [igt-dev] " Tvrtko Ursulin
2019-02-08 12:03 ` [IGT 2/2] tools/intel_gpu_top: Add file output capability Tvrtko Ursulin
2019-02-08 12:03   ` [igt-dev] " Tvrtko Ursulin
2019-02-08 12:14   ` Chris Wilson
2019-02-08 12:14     ` [igt-dev] " Chris Wilson
2019-02-08 12:10 ` [IGT 1/2] tools/intel_gpu_top: Add support for stdout logging Chris Wilson
2019-02-08 12:10   ` [igt-dev] " Chris Wilson
2019-02-08 12:29 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [1/2] " Patchwork
2019-02-25 10:04   ` Tvrtko Ursulin
2019-02-08 13:58 ` [IGT 1/2] " Eero Tamminen
2019-02-08 13:58   ` [igt-dev] " Eero Tamminen
2019-02-11  9:49   ` Tvrtko Ursulin
2019-02-11  9:49     ` [igt-dev] " Tvrtko Ursulin
2019-02-12  9:31     ` Eero Tamminen [this message]
2019-02-12  9:31       ` Eero Tamminen via igt-dev
2019-02-08 14:11 ` [igt-dev] ✓ Fi.CI.IGT: success for series starting with [1/2] " Patchwork
2019-02-11 11:45 [IGT 1/2] " Tvrtko Ursulin
2019-02-11 12:21 ` Chris Wilson
2019-02-11 17:08   ` Tvrtko Ursulin

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=97e1f448-9599-560f-c271-7db1394eb820@intel.com \
    --to=eero.t.tamminen@intel.com \
    --cc=3.14pi@ukr.net \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=tvrtko.ursulin@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.