intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Eugeni Dodonov <eugeni@dodonov.net>, intel-gfx@lists.freedesktop.org
Cc: Eugeni Dodonov <eugeni.dodonov@intel.com>
Subject: Re: [PATCH 2/6] intel_gpu_top: suport command line parameters and variable samples per second
Date: Mon, 05 Sep 2011 22:44:27 +0100	[thread overview]
Message-ID: <e0d58a$1b5ndg@orsmga002.jf.intel.com> (raw)
In-Reply-To: <1315253973-18950-3-git-send-email-eugeni@dodonov.net>

On Mon,  5 Sep 2011 17:19:29 -0300, Eugeni Dodonov <eugeni@dodonov.net> wrote:
> From: Eugeni Dodonov <eugeni.dodonov@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

  reply	other threads:[~2011-09-05 21:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-05 20:19 [PATCH 0/6] additional intel_gpu_top profiling features Eugeni Dodonov
2011-09-05 20:19 ` [PATCH 1/6] intel_gpu_top: account for time spent in syscalls Eugeni Dodonov
2011-09-05 20:19 ` [PATCH 2/6] intel_gpu_top: suport command line parameters and variable samples per second Eugeni Dodonov
2011-09-05 21:44   ` Chris Wilson [this message]
2011-09-05 22:16     ` Eugeni Dodonov
2011-09-05 20:19 ` [PATCH 3/6] intel_gpu_tool: initial support for non-screen output Eugeni Dodonov
2011-09-05 22:56   ` Łukasz Kuryło
2011-09-05 23:48     ` Łukasz Kuryło
2011-09-06  0:05     ` Eugeni Dodonov
2011-09-05 20:19 ` [PATCH 4/6] intel_gpu_top: initialize monitoring statistics at startup Eugeni Dodonov
2011-09-05 20:19 ` [PATCH 5/6] intel_gpu_top: support non-interactive mode Eugeni Dodonov
2011-09-05 20:19 ` [PATCH 6/6] intel_gpu_top: support profiling user-specified commands Eugeni Dodonov

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='e0d58a$1b5ndg@orsmga002.jf.intel.com' \
    --to=chris@chris-wilson.co.uk \
    --cc=eugeni.dodonov@intel.com \
    --cc=eugeni@dodonov.net \
    --cc=intel-gfx@lists.freedesktop.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).