public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Clint Bauer <CLBAUER@INTELECTINC.COM>
To: "'ecos-discuss@sourceware.cygnus.com'"
	<ecos-discuss@sourceware.cygnus.com>
Subject: [ECOS] bogus clock interrupt handling numbers?
Date: Mon, 01 Nov 1999 13:51:00 -0000	[thread overview]
Message-ID: <56F9E4591D75D211885500600865B506753659@MAIL.INTELECTINC.com> (raw)

I was trying to confirm/duplicate the numbers from the tests run from
tm_basic.cxx.  In looking at the code, the following looks really suspicious
--

(from run_all_tests())

    // Try and measure how long the clock interrupt handling takes
    for (i = 0;  i < nsamples;  i++) {
        tick0 = cyg_current_time();
        while (true) {
            tick1 = cyg_current_time();
            if (tick0 != tick1) break;
        }
        HAL_CLOCK_READ(&tv[i]);
    }
    tv1 = 0;
    for (i = 0;  i < nsamples;  i++) {
        tv1 += tv[i] * 1000;
    }
    tv1 = tv1 / nsamples;
    tv1 -= overhead;  // Adjust out the cost of getting the timer value
    diag_printf("Clock interrupt took");
    show_ticks_in_us(tv1);
    diag_printf(" microseconds (%d raw clock ticks)\n", tv1/1000);


Granted, the comment does say _Try_.  But for those targets that can read
the hardware clock with 0 ticks of latency (the Toshiba JMR3904 Evaluation
Board, for instance), the above code reduces to just computing the median of
the 
clock samples.  

No account is made of the start of the test run, as is done in the
computation of tv0, immediately before the code segment copied above.

Am I missing something obvious, or is this a feature?


----
Clint Bauer - 972 367 2216 clbauer@intelectinc.com 
Intelect Network Technologies
 

             reply	other threads:[~1999-11-01 13:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-01 13:51 Clint Bauer [this message]
1999-11-01 14:08 ` Gary Thomas
1999-11-01 15:54 Clint Bauer
1999-11-03  9:15 ` Gary Thomas

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=56F9E4591D75D211885500600865B506753659@MAIL.INTELECTINC.com \
    --to=clbauer@intelectinc.com \
    --cc=ecos-discuss@sourceware.cygnus.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 read-only IMAP folder(s) and NNTP newsgroup(s).