mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Daniel Schultz <d.schultz@phytec.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v1] commands: Add dhrystone
Date: Fri, 24 Jul 2015 13:41:59 +0200	[thread overview]
Message-ID: <55B22487.3050001@phytec.de> (raw)
In-Reply-To: <20150724074135.GP18700@pengutronix.de>


Am 24.07.2015 um 09:41 schrieb Sascha Hauer:
> On Thu, Jul 23, 2015 at 10:01:32AM +0200, Daniel Schultz wrote:
>> This tool will help to measure the system performance.
>>
>> Some SoCs haven't the possibility to route their clocks to the output pins.
>> So you can use dhrystone to get a feedback about the clock speed.
>>
>> Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
>> ---
>>
>> Changes:
>> 	v1:
>> 	applied RFC suggestions:
>> 		-removed 'default n' in Kconfig
>> 		-refactored time defines with default time units
>> 		-only print variable values when values are wrong
>> 		-added units to printf
>> 		-the iteration parameter is now optional. The programm starts
>> 		with 10000 iterations and adjust higher, when execution time
>> 		is too short.
>
> I can see that the parameter is now optional, but I can't find the code
> which adjusts the number of iterations. Am I missing something?
>

At the end of the do_dhrystone function:

     if (user_time < TOO_SMALL_TIME) {
         number_of_runs = number_of_runs * 10;
         new_argv[0] = argv[0];
         sprintf(tmp_str, "%i", number_of_runs);
         new_argv[1] = tmp_str;
         printf("Measured time too small to obtain meaningful results\n");
         printf("or a timer wrap happend. I will increase the number\n");
         printf("of runs by *10 to %d\n", number_of_runs);
         printf("user_time: %llu ns\n", user_time);
         do_dhrystone(2, new_argv);
         ...

I'm sure there is a better solution.

Kind regards,
Daniel Schultz

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2015-07-24 11:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-23  8:01 Daniel Schultz
2015-07-24  7:41 ` Sascha Hauer
2015-07-24 11:41   ` Daniel Schultz [this message]
2015-07-27 10:32     ` Jan Lübbe

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=55B22487.3050001@phytec.de \
    --to=d.schultz@phytec.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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