[Intel-gfx] [PATCH 2/6] intel_gpu_top: suport command line parameters and variable samples per second

Chris Wilson chris at chris-wilson.co.uk
Mon Sep 5 23:44:27 CEST 2011


On Mon,  5 Sep 2011 17:19:29 -0300, Eugeni Dodonov <eugeni at dodonov.net> wrote:
> From: Eugeni Dodonov <eugeni.dodonov at intel.com>
> 
> This patch adds support for getopt, and adds two default parameters to it:
> -h to show usage notes; and -s to allow user to define number of samples
> to acquire per second.

Just a minor style issue, otherwise it looks good. All I need is
someway to correlate GPU activity with batches (and especially the
contents of those batches) and with even higher level code and then I'd
be happy. Oh, and integrated with a timeline of CPU activity, of course.
:-)
 
> +	/* Parse options? */
> +	while ((ch = getopt(argc, argv, "s:h")) != -1)
> +	{
> +		switch (ch)
> +		{
> +			case 's': samples_per_sec = atoi(optarg);

In the modules we own, we have adopted the kernel CODING_STYLE as our
standard. 8 space indents, 80 cols line (except where readibility is
improved by going over), braces on the same line as the control flow,
/*
 * This style of long comments.
 */
and case statements should being at the same indentation as the switch
and so should the parameters of a multiline function...
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list