linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Kacur <jkacur@redhat.com>
To: Frank Rowand <frank.rowand@am.sony.com>,
	Thomas Gleixner <tglx@linutronix.de>
Cc: John Kacur <jkacur@redhat.com>,
	"Rowand, Frank" <Frank_Rowand@sonyusa.com>,
	"linux-rt-users@vger.kernel.org" <linux-rt-users@vger.kernel.org>,
	"williams@redhat.com" <williams@redhat.com>
Subject: Re: [PATCH] rt-tests: incorrect first latency value for --verbose option
Date: Tue, 8 May 2012 00:03:52 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.02.1205072353210.3886@tycho> (raw)
In-Reply-To: <4FA8428B.4050809@am.sony.com>



On Mon, 7 May 2012, Frank Rowand wrote:

> On 05/07/12 14:41, John Kacur wrote:
> > 
> > 
> > On Wed, 2 May 2012, Frank Rowand wrote:
> > 
> >>
> >> When the --verbose option is selected, the first value for each thread is
> >> incorrectly reported as zero.
> >>
> >> This is because when collecting the first value, the index into stat->values is
> >> incremented from zero to one before storing the value.  But when printing the
> >> values, the first value printed is stat->values[0], which has been initialized
> >> to zero.
> > 
> > Hi Frank
> > 
> > Ok, no more posting from me after winning a bottle of whiskey at the Irish 
> > Pub on quiz night. :)
> 
> Or if you do, you should share a bit of the whiskey with me.

You get the bottle and 30 shot glasses and share it with everyone at the 
pub, so if you want some you have to come, and then help my team win too 
:)

 > 
> > 
> > I've been looking at this one, and I'm not sure about it.
> > According to the help output, 
> > 
> > "-v       --verbose         output values on stdout for statistics
> >                            format: n:c:v n=tasknum c=count v=value in us"
> > 
> > ./cyclictest --verbose -p99 -t | awk '$2~/^0/{ print }' 
> > 
> >        0:       0:       0
> >        1:       0:       0
> >        2:       0:       0
> >        3:       0:       0
> >        4:       0:       0
> >        5:       0:       0
> >        6:       0:       0
> >        7:       0:       0
> > 
> > So, it looks like the values are 0 at count 0, doesn't that make sense?
> 
> Nope.  The event for count == 0 is the first event.  And the first event
> has an actual latency that is not zero on the system I tested it on.
> 

Hmmm, this may be a quibble about definitions. I know that in the c-world 
we're used to start counting at 0, but to me, count == 0 is before the 
first event. You're not losing any data here, it's just that the first 
event is stored in the first count. Or am I still missing something here? 

It looks like it was very deliberately programmed this way, unless Thomas 
tells us otherwise.

Thanks

John 

  reply	other threads:[~2012-05-07 22:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-03  0:02 [PATCH] rt-tests: incorrect first latency value for --verbose option Frank Rowand
2012-05-07 21:41 ` John Kacur
2012-05-07 21:45   ` Frank Rowand
2012-05-07 22:03     ` John Kacur [this message]
2012-05-07 22:13       ` Frank Rowand

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=alpine.LFD.2.02.1205072353210.3886@tycho \
    --to=jkacur@redhat.com \
    --cc=Frank_Rowand@sonyusa.com \
    --cc=frank.rowand@am.sony.com \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=williams@redhat.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 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).