[igt-dev] [IGT 1/2] tools/intel_gpu_top: Add support for stdout logging

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Mon Feb 11 09:49:12 UTC 2019


On 08/02/2019 13:58, Eero Tamminen wrote:
> Hi,
> 
> On 8.2.2019 14.03, Tvrtko Ursulin wrote:
>> From: Tvrtko Ursulin <tvrtko.ursulin at 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 am only not sure about the output filename in the 
second example. But anyway, first example should definitely work.

Regards,

Tvrtko




More information about the igt-dev mailing list